Skip to content

feat(cli): add GitHub Copilot CLI as an MCP install target + project skill#374

Draft
psoulos wants to merge 1 commit into
inkeep:mainfrom
psoulos:paulsoulos-microsoft/explain-llm-integrations
Draft

feat(cli): add GitHub Copilot CLI as an MCP install target + project skill#374
psoulos wants to merge 1 commit into
inkeep:mainfrom
psoulos:paulsoulos-microsoft/explain-llm-integrations

Conversation

@psoulos

@psoulos psoulos commented Jun 29, 2026

Copy link
Copy Markdown

What & why

OpenKnowledge wired up MCP install targets and project skills for Claude Code, Cursor, and Codex, but not GitHub Copilot CLI, even though Copilot CLI speaks MCP and supports skills. This adds copilot (label "Copilot CLI") as a first-class editor target so Copilot users get the same out-of-the-box integration: ok init registers the OpenKnowledge MCP server and installs the in-repo project skill, and ok start keeps the skill refreshed.

The change leans on the existing data-driven EDITOR_TARGETS registry, so most of it is one new target plus registration in the skill-repair sweeps.

  • MCP target: writes a local server entry to the global ~/.copilot/mcp-config.json (honoring COPILOT_HOME) with tools: ["*"] so the agent can call the OpenKnowledge exec tool without a per-tool prompt.
  • Project skill: installs at .github/skills/open-knowledge/SKILL.md (the same skill Claude Code gets at .claude/skills/), registered in both the CLI (repair-skills.ts) and Desktop (skill-reclaim.ts) sweeps so ok start reclaims/refreshes it.

Follows the claude-code pattern, not claude-desktop. Copilot gets the project skill like claude-code, but intentionally has no projectConfigPath because Copilot CLI's MCP config is authoritatively global-only (there is no repo-local .mcp.json equivalent). That is a real Copilot capability difference, not the global-everything claude-desktop model.

A couple of non-obvious points worth a reviewer's eye:

  • Project/user skill dir asymmetry: Copilot reads project skills from .github/skills but personal skills from ~/.copilot or ~/.agents. The user-level discovery skill is already served by the central ~/.agents/skills/open-knowledge-discovery/ write (Copilot reads .agents), so no dedicated ~/.copilot discovery skill is written, deliberately avoiding a duplicate skill name.
  • Cross-dir duplication is expected/harmless: if a user selects both Claude and Copilot, the project skill lands in .claude/skills and .github/skills, both of which Copilot reads. Documented as such in copilot.mdx.

The outbound "Open with AI" / "Edit with AI" handoff launcher is not part of this PR (still claude/cursor/codex only); this is inbound MCP + skill only.

How this was verified

  • bun run check (lint, build, typecheck, tests) run locally. All suites pass except two pre-existing/unrelated desktop failures confirmed on main as well (an IPC channel-count ratchet marker and a PTY-flood stress test that only times out under full parallel load and passes in isolation).
  • Updated the enumeration-driven tests that assert per-editor behavior: editors.test.ts, write-project-ai-integrations.test.ts (copilot writes the project skill, skips MCP config; only claude-desktop skips both), git-exclude.test.ts (canonical artifact set 9 -> 10), and desktop create-new-project.test.ts (skill writes now include copilot).
  • Rebuilt the CLI dist that Desktop consumes.

Checklist

  • Ran bun run check (lint, typecheck, tests) locally
  • Added a changeset (bun run changeset) if this changes behavior
  • Updated docs if this changes a user-facing surface
  • I have read CONTRIBUTING.md and agree to license my contribution under the project's terms (CLA)

Register `copilot` (label "Copilot CLI") as a first-class editor target so
`ok init` installs the OpenKnowledge MCP server into `~/.copilot/mcp-config.json`
(honoring COPILOT_HOME) with all tools pre-approved.

Copilot follows the claude-code pattern: it also installs the project skill at
`.github/skills/open-knowledge/SKILL.md`, and `ok start` keeps it refreshed via
the repair sweeps (CLI repair-skills + Desktop skill-reclaim). It intentionally
has no projectConfigPath because Copilot CLI's MCP config is global-only.

Updates enumeration tests, integration docs, and the changeset.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Paul Soulos seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

Copy link
Copy Markdown

Thanks for the contribution! Your PR could not be merged automatically: it overlaps other changes that aren't visible here, so a maintainer needs to reconcile it by hand.

No action is needed from you. Your PR is already based on the latest inkeep/open-knowledge main; the overlap is on our side, not something to fix from your branch. Your commit attribution is preserved as @psoulos.

A maintainer will resolve it and land your change; this PR will close automatically once it merges. This comment will be updated as the status changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants