docs: merge guidance + per-host shapes for MCP install snippets#282
Conversation
Real-world failure mode: users paste the README's universal mcpServers
JSON into an existing config file (e.g. ~/.cursor/mcp.json with
firecrawl/linear/drawio already wired) and end up with two top-level
objects, breaking the host's MCP loader with "Expected double-quoted
property name in JSON at position 386". Plus the README doesn't tell
them where each host actually reads its config from, doesn't include
the AGENTMEMORY_URL env block that the website snippet ships, and
quotes a stale "43 memory tools" count in the OpenClaw and Hermes
paste-prompts (the server has been at 51 since the v0.7 essential-set
expansion).
This commit fixes the install copy on README and website together so
the two don't drift again.
README:
- Replace per-host table with a single canonical agentmemory block
that includes the AGENTMEMORY_URL env (matches the website's
UNIVERSAL_JSON), plus an explicit "merge into existing mcpServers,
do not replace the file" line.
- Per-host table now lists exact config file path per host (e.g.
~/.cursor/mcp.json, claude_desktop_config.json,
~/.codeium/windsurf/mcp_config.json, ~/.gemini/settings.json)
and flags the non-mcpServers shapes (OpenCode uses mcp + array
command; Codex uses TOML).
- Adds Roo Code and Windsurf (previously absent), keeps Cline /
Goose / Kilo Code / pi / Hermes / OpenClaw / Aider.
- Adds sandboxed-client paragraph pointing AGENTMEMORY_FORCE_PROXY=1
+ AGENTMEMORY_URL=<LAN-IP> at the v0.9.7 escape hatch (closes the
Flatpak / Snap repro from #234).
- Stale "43 memory tools" -> "51 memory tools" in the OpenClaw and
Hermes paste-prompt blocks.
- OpenClaw paste-prompt JSON now ships the env block too.
- The "Standalone MCP" section's universal JSON ships AGENTMEMORY_URL
and lists Roo Code + Windsurf + Gemini CLI alongside Cursor /
Claude Desktop / Cline.
Website (AgentInstall.tsx):
- "WORKS FOR CLAUDE DESKTOP · CURSOR · CLINE · WINDSURF · GEMINI CLI
· OPENCODE" -> "CLAUDE DESKTOP · CURSOR · CLINE · ROO CODE ·
WINDSURF · GEMINI CLI — MERGE INTO EXISTING mcpServers". OpenCode
does NOT use mcpServers (top-level `mcp` key, command-as-array,
`environment` rather than `env`), so removing it from the
universal label.
- Adds an OPENCODE snippet with the correct `mcp` shape and
`environment.AGENTMEMORY_URL`.
- Adds a VS CODE (mcp.json) snippet — VS Code's .vscode/mcp.json
uses `servers` (not `mcpServers`), `type: "stdio"`, and the
standard `env`. The vscode:mcp/install deeplink already worked
via its own flat config shape; this snippet covers the copy-JSON
path for VS Code users editing mcp.json by hand.
- "+ HERMES · OPENCLAW · MORE" toggle relabeled to "+ OPENCODE ·
VS CODE · CODEX · HERMES · OPENCLAW" so the catalog is visible
before opening it.
No new dependencies. Website typechecks and builds clean (Next 16
App Router, static export). Repo tests 859/859.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughUpdates README and AgentInstall component to standardize MCP configuration with environment variables ( ChangesMCP Configuration & Agent Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 417: The OpenCode example JSON in the README (opencode.json) is missing
the environment.AGENTMEMORY_URL entry; update the inline OpenCode example that
defines the top-level "mcp" key (and nested "agentmemory") to include an
"environment" object with "AGENTMEMORY_URL" set (e.g., environment:
{"AGENTMEMORY_URL": "<your-url>"}) so the example matches the surrounding
guidance and prevents inconsistent copy/paste across hosts.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 32ae8b8b-0f37-4421-b256-8756c0200d4a
📒 Files selected for processing (3)
README.mdwebsite/components/AgentInstall.tsxwebsite/lib/generated-meta.json
| | **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** | `.codex/config.toml` | TOML shape: `codex mcp add agentmemory -- npx -y @agentmemory/mcp`, or add `[mcp_servers.agentmemory]` manually. | | ||
| | **OpenCode** | `opencode.json` | Different shape — top-level `mcp` key, command as array: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true}}}`. | |
There was a problem hiding this comment.
Add environment.AGENTMEMORY_URL to the OpenCode example for consistency.
Line 417’s inline OpenCode JSON omits the URL env while the surrounding guidance standardizes it; this can lead to inconsistent copy/paste outcomes across hosts.
🛠️ Suggested doc patch
-| **OpenCode** | `opencode.json` | Different shape — top-level `mcp` key, command as array: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true}}}`. |
+| **OpenCode** | `opencode.json` | Different shape — top-level `mcp` key, command as array: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true, "environment": {"AGENTMEMORY_URL": "http://localhost:3111"}}}}`. |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | **OpenCode** | `opencode.json` | Different shape — top-level `mcp` key, command as array: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true}}}`. | | |
| | **OpenCode** | `opencode.json` | Different shape — top-level `mcp` key, command as array: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true, "environment": {"AGENTMEMORY_URL": "http://localhost:3111"}}}}`. | |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` at line 417, The OpenCode example JSON in the README
(opencode.json) is missing the environment.AGENTMEMORY_URL entry; update the
inline OpenCode example that defines the top-level "mcp" key (and nested
"agentmemory") to include an "environment" object with "AGENTMEMORY_URL" set
(e.g., environment: {"AGENTMEMORY_URL": "<your-url>"}) so the example matches
the surrounding guidance and prevents inconsistent copy/paste across hosts.
Why
Real-world failure: paste the README universal
mcpServersJSON into an existing~/.cursor/mcp.jsonthat already has firecrawl / linear / drawio wired, end up with two top-level objects, host's MCP loader explodes withExpected double-quoted property name in JSON at position 386.Also caught while diagnosing:
AGENTMEMORY_URLenv that the website's universal snippet ships → host inconsistency.mcp(notmcpServers),commandas an array, andenvironment(notenv). Universal pasted intoopencode.jsondoesn't work..vscode/mcp.jsonusesservers(notmcpServers) withtype: "stdio"— the existing one-click deeplink covers VS Code, but the copy-JSON path didn't.What
README
UNIVERSAL_JSONincludingAGENTMEMORY_URL), then a per-host table that lists the exact config file path per host and flags non-mcpServersshapes (OpenCode + Codex).AGENTMEMORY_FORCE_PROXY=1+AGENTMEMORY_URL=<LAN-IP>at the v0.9.7 escape hatch (closes the Flatpak / Snap repro from MCP shim: --tools all returns only 7 tools due to IMPLEMENTED_TOOLS hardcode #234).AGENTMEMORY_URLand lists Roo Code + Windsurf + Gemini CLI alongside Cursor / Claude Desktop / Cline. Added explicit merge guidance.Website (
website/components/AgentInstall.tsx)mcpshape, command-as-array, andenvironment.AGENTMEMORY_URL.serverskey,type: "stdio", standardenv. Thevscode:mcp/installdeeplink already worked via its own flat shape; this covers the copy-JSON path.Auto-derived meta (
website/lib/generated-meta.json)Rebuild bumped the auto-derived numbers (
version: 0.9.3 → 0.9.7,restEndpoints: 120 → 121,testsPassing: 848 → 880). No hand-editing — this is the standard prebuild side effect.Test plan
npm test— 859/859 in the agentmemory repo.cd website && npm run build— Next 16 static export clean, no type errors.~/.cursor/mcp.jsonthat already has firecrawl + linear + drawio entries (merging into the existingmcpServersmap) — confirm Cursor sees 51 tools after reload.claude mcp add agentmemory -- npx -y @agentmemory/mcp— confirm Claude Code still wires it correctly.Summary by CodeRabbit
New Features
Documentation
Chores