From d2acca2158810e267f364f5f64c1f50758c39085 Mon Sep 17 00:00:00 2001 From: Vivaan Dhawan Date: Sun, 24 May 2026 10:32:12 +0530 Subject: [PATCH] docs: add VS Code Copilot MCP config --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index e84183b61c..1768c57645 100644 --- a/README.md +++ b/README.md @@ -530,6 +530,7 @@ The agentmemory entry is the **same MCP server block** across every host that us | **Claude Desktop** | `claude_desktop_config.json` (Application Support) | Merge into `mcpServers`. Restart Claude Desktop after editing. | | **Cline / Roo Code / Kilo Code** | Cline MCP settings (Settings UI → MCP Servers → Edit) | Same `mcpServers` block. | | **Windsurf** | `~/.codeium/windsurf/mcp_config.json` | Same `mcpServers` block. | +| **GitHub Copilot / VS Code** | `.vscode/mcp.json` or VS Code user MCP settings | Uses VS Code's `servers` shape, not `mcpServers`; see the block below. | | **Gemini CLI** | `~/.gemini/settings.json` | `gemini mcp add agentmemory npx -y @agentmemory/mcp --scope user` (auto-merges). | | **OpenClaw** | OpenClaw MCP config | Same `mcpServers` block, or use the deeper [memory plugin](integrations/openclaw/). | | **Codex CLI (MCP only)** | `.codex/config.toml` | TOML shape: `codex mcp add agentmemory -- npx -y @agentmemory/mcp`, or add `[mcp_servers.agentmemory]` manually. | @@ -544,6 +545,26 @@ The agentmemory entry is the **same MCP server block** across every host that us **Sandboxed MCP clients** (Flatpak / Snap / restrictive containers) that can't reach the host's `localhost`: also set `"AGENTMEMORY_FORCE_PROXY": "1"` in the `env` block, and point `AGENTMEMORY_URL` at a route the sandbox can actually reach (e.g. your LAN IP). See [#234](https://github.com/rohitg00/agentmemory/issues/234) for the diagnostic walkthrough. +GitHub Copilot in VS Code uses a different MCP JSON shape: + +```json +{ + "servers": { + "agentmemory": { + "type": "stdio", + "command": "npx", + "args": ["-y", "@agentmemory/mcp"], + "env": { + "AGENTMEMORY_URL": "http://localhost:3111", + "AGENTMEMORY_SECRET": "${AGENTMEMORY_SECRET}" + } + } + } +} +``` + +Start `npx @agentmemory/agentmemory` in another terminal first if you want the MCP shim to proxy to the persistent server instead of using its local fallback. The `env` block is optional; keep it when proxying to a protected or remote server, and omit it for the local fallback. + ### Programmatic access (Python / Rust / Node) agentmemory registers its core operations as iii functions (`mem::remember`, `mem::observe`, `mem::context`, `mem::smart-search`, `mem::forget`). Any language with an iii SDK can call them directly over `ws://localhost:49134` — no separate REST client per language.