Skip to content

feat(github-copilot): add GitHub Copilot (VS Code) integration via MCP#2299

Open
DK09876 wants to merge 1 commit into
mainfrom
feat/github-copilot-integration
Open

feat(github-copilot): add GitHub Copilot (VS Code) integration via MCP#2299
DK09876 wants to merge 1 commit into
mainfrom
feat/github-copilot-integration

Conversation

@DK09876

@DK09876 DK09876 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a first-party GitHub Copilot (VS Code) integration for Hindsight, using Copilot agent mode's native MCP support (HTTP servers) — so Hindsight connects directly, no bridge.

hindsight-copilot init:

  • merges a Hindsight HTTP MCP server into .vscode/mcp.json (servers.hindsight), and
  • writes a recall/retain rule into .github/copilot-instructions.md, which Copilot applies to every chat in the workspace.
{ "servers": { "hindsight": { "type": "http", "url": "https://api.hindsight.vectorize.io/mcp/my-project/", "headers": { "Authorization": "Bearer hsk_..." } } } }

Resolves the ask in #1588 ("Vscode/GitHub Copilot Integration"). Mirrors the Zed/OpenHands MCP-config pattern.

What's included

  • hindsight_copilot package: config, mcp_config (.vscode/mcp.json writer — JSON round-trip, prints a snippet for JSONC files), instructions (fenced-block rule writer), cli (init/status/uninstall).
  • 25 deterministic tests: .vscode/mcp.json merge (preserving other servers + inputs, JSONC → manual fallback, dedup) and the copilot-instructions.md rule block. Plus a gated requires_real_llm E2E doing the real MCP initialize handshake against a live server.
  • CI job test-github-copilot-integration + detect-changes + aggregation.
  • Release registration in VALID_INTEGRATIONS and the changelog generator.
  • Docs page, registry entry, icon (octicons), README row.

Testing

  • 25 deterministic tests pass; ruff check/format clean (repo ruff.toml); uv build + uv lock --check consistent.
  • Gated E2E verified against a live local Hindsight (MCP handshake → tools/list returns recall/retain/reflect).

🤖 Generated with Claude Code

Adds hindsight-copilot: long-term memory for GitHub Copilot in VS Code, using
Copilot agent mode's native MCP support (HTTP servers) — no bridge.

`hindsight-copilot init`:
- merges a Hindsight HTTP MCP server into .vscode/mcp.json (servers.hindsight),
  JSON-safe (prints a snippet if the file is JSONC), and
- writes a recall/retain rule into .github/copilot-instructions.md, which
  Copilot applies to every chat in the workspace.

Resolves the ask in #1588. Mirrors the Zed/OpenHands MCP-config pattern.

- hindsight_copilot package: config, mcp_config (.vscode/mcp.json writer),
  instructions (copilot-instructions.md rule), cli (init/status/uninstall)
- 25 deterministic tests (mcp.json merge incl. preserving servers/inputs +
  JSONC fallback, instructions rule block) + gated requires_real_llm MCP
  handshake E2E
- CI job, release registration (VALID_INTEGRATIONS + changelog generator),
  docs page, registry entry, icon (octicons), README row

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@benfrank241

Copy link
Copy Markdown
Member

@DK09876 nice work, this one's clean. addresses #1588 — going native MCP HTTP over the hooks approach scott suggested is the right call (cleaner, fewer moving parts, matches the zed/openhands pattern).

two things before merging:

needs a rebase — github shows CONFLICTING. main moved since you opened it.
Build Docker (control-plane) failed but it's unrelated to this python-only integration. should clear on the rebase re-run; if not, re-run that job.
the jsonc → manual-snippet fallback and the fenced HINDSIGHT:BEGIN/END rule block are both nice touches — preserves user content on uninstall and won't clobber commented .vscode/mcp.json files. static "copilot" bank default matches the existing zed/openhands pattern so that's consistent (--bank-id override is documented).

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