copilot-vscode installer connects Claude-Mem to it. This guide covers search, selected observation retrieval and explicit save. It adds no automatic capture and no context injection.
Checked on VS Code 1.146.0 on Windows 11: Copilot’s agent loaded claude-mem from ~/.copilot/mcp-config.json without a trust prompt in the logs, and called search and get_observations. Not yet checked: the minimum VS Code version, macOS and Linux, and the content of the returned results. The entry must contain "tools": ["*"], which the installer writes. Without it the server connects but Copilot never offers its tools to the model.
Official references: MCP servers in VS Code and MCP configuration reference.
Requirements
- VS Code with GitHub Copilot Chat and agent mode, signed in to a Copilot plan that allows MCP servers (organization policy can disable MCP).
- A running Claude-Mem worker and Node.js.
- Neither the
copilotcommand nor GitHub CLI (gh) is required. The VS Code check in the intro ran with nocopilotcommand on the PATH.
Connect
claude-mem under mcpServers in ~/.copilot/mcp-config.json (or $COPILOT_HOME/mcp-config.json), keeping any other servers in that file. That is the file VS Code’s Copilot harness reads. copilot-vscode writes exactly what copilot-cli writes, because Copilot CLI and VS Code share this one file. Restart VS Code afterwards.
Do not create .vscode/mcp.json for this. That file uses a different servers key and belongs to VS Code’s older local harness.
Save and recall
Open Copilot Chat in Agent mode and confirmclaude-mem appears in the tools list. Then ask:
Use claude-memVS Code asks “Allow tool from claude-mem?” before a call runs, and that prompt is VS Code’s, not Claude-Mem’s. In testing,searchfor “restore” in project “memory-practice”, thenget_observationsfor the IDs you pick.
save_memory waited on it and, once allowed, was stored in the worker database with the project and text we gave it. A following search appeared to run without a second prompt after Allow in this Session. Skip means the tool does not run, so nothing is saved; this was not tested. Read each call before approving it. Inspect the tool result itself; a fluent reply does not prove the call succeeded. To store something, ask for save_memory with an explicit project name.
What works
VS Code does expose hook events (
sessionStart, postToolUse, agentStop), but their payloads have not been verified for capture, so none are installed.
Troubleshooting
- No
claude-memtools: restart VS Code, then check~/.copilot/mcp-config.json(or$COPILOT_HOME) containsmcpServers.claude-mem. - Install fails with “Corrupt JSON file”: the existing file is not valid JSON. The installer refuses to overwrite it; fix or move it, then rerun.
- Tool errors: start the worker (
npx claude-mem start) and read the tool’s error text. - MCP unavailable: your organization’s Copilot policy may disable MCP servers.
Disconnect
claude-mem entry from the Copilot MCP file and leaves other servers alone. It is part of the full Claude-Mem uninstall, which also removes other integrations. To disconnect only Copilot, delete the claude-mem key under mcpServers in the file by hand. Saved memories remain in the worker.
