Skip to main content

Setup

1

Start agentmemory

2

Wire MCP

The adapter detects ~/.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

Run one prompt and check the Sessions tab at http://localhost:3113.

What connect writes

The Copilot entry extends the standard block with type and a tools allowlist:
~/.copilot/mcp-config.json
On Windows the adapter writes 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 bundled hooks.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

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.
That is expected with MCP-only wiring. Install the plugin (copilot plugin install rohitg00/agentmemory:plugin) to get the 11 lifecycle events.
Adapter source: src/cli/connect/copilot-cli.ts. Hook manifest: plugin/hooks/hooks.copilot.json.
Last modified on August 15, 2026