Setup
1
Start agentmemory
2
Wire MCP
~/.copilot/ (or $COPILOT_HOME when set), backs up mcp-config.json, merges the entry, and verifies it after writing. This is the only connect adapter that runs on Windows; every other adapter requires manual setup there.3
Install the plugin for hooks and skills
4
Restart Copilot
Copilot picks up MCP servers on next launch or after running
/mcp inside a session.5
Verify
http://localhost:3113.What connect writes
The Copilot entry extends the standard block withtype and a tools allowlist:
~/.copilot/mcp-config.json
cmd.exe with ["/d", "/s", "/c", "npx", "-y", "@agentmemory/mcp"] as the command, since Copilot spawns the server without a shell.
connect also writes a memory-usage guideline block into ~/.copilot/copilot-instructions.md so the agent calls memory_recall and memory_save on its own. Skip with --no-guidelines.
Capture model
MCP wiring alone gives the 54 tools but no automatic capture. The plugin adds it: the bundledhooks.copilot.json manifest registers 11 events in Copilot’s camelCase scheme, sessionStart, userPromptSubmitted, preToolUse, postToolUse, postToolUseFailure, preCompact, agentStop, sessionEnd, subagentStart, subagentStop, and notification, each posting to the REST API on 3111.
Troubleshooting
Server wired but tools not listed
Server wired but tools not listed
Copilot loads
mcp-config.json at launch. Run /mcp inside the session or restart the CLI. If COPILOT_HOME is set, confirm the adapter wrote to $COPILOT_HOME/mcp-config.json rather than ~/.copilot/; the summary line prints the exact path.Tools available but nothing captured
Tools available but nothing captured
That is expected with MCP-only wiring. Install the plugin (
copilot plugin install rohitg00/agentmemory:plugin) to get the 11 lifecycle events.src/cli/connect/copilot-cli.ts. Hook manifest: plugin/hooks/hooks.copilot.json.