Skip to content

docs: merge guidance + per-host shapes for MCP install snippets#282

Merged
rohitg00 merged 1 commit into
mainfrom
fix/install-snippets-merge-guidance
May 11, 2026
Merged

docs: merge guidance + per-host shapes for MCP install snippets#282
rohitg00 merged 1 commit into
mainfrom
fix/install-snippets-merge-guidance

Conversation

@rohitg00
Copy link
Copy Markdown
Owner

@rohitg00 rohitg00 commented May 11, 2026

Why

Real-world failure: paste the README universal mcpServers JSON into an existing ~/.cursor/mcp.json that already has firecrawl / linear / drawio wired, end up with two top-level objects, host's MCP loader explodes with Expected double-quoted property name in JSON at position 386.

Also caught while diagnosing:

  • README's per-host rows omit AGENTMEMORY_URL env that the website's universal snippet ships → host inconsistency.
  • README doesn't say where each host actually reads its config from.
  • "43 memory tools" still in the OpenClaw + Hermes paste-prompts (server has been at 51 since v0.7).
  • Website hint groups OpenCode under "universal mcpServers JSON" — but OpenCode uses mcp (not mcpServers), command as an array, and environment (not env). Universal pasted into opencode.json doesn't work.
  • VS Code's .vscode/mcp.json uses servers (not mcpServers) with type: "stdio" — the existing one-click deeplink covers VS Code, but the copy-JSON path didn't.

What

README

  • Replaced the per-host one-liner table with a canonical agentmemory block (matches the website's UNIVERSAL_JSON including AGENTMEMORY_URL), then a per-host table that lists the exact config file path per host and flags non-mcpServers shapes (OpenCode + Codex).
  • Added Roo Code + Windsurf (previously absent). Kept Cline / Goose / Kilo Code / pi / Hermes / OpenClaw / Aider / Gemini CLI.
  • Added a sandboxed-clients paragraph pointing 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).
  • Stale "43 memory tools" → "51 memory tools" in the OpenClaw + 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. Added explicit merge guidance.

Website (website/components/AgentInstall.tsx)

  • Universal-JSON hint: "WORKS FOR CLAUDE DESKTOP · CURSOR · CLINE · WINDSURF · GEMINI CLI · OPENCODE" → "CLAUDE DESKTOP · CURSOR · CLINE · ROO CODE · WINDSURF · GEMINI CLI — MERGE INTO EXISTING mcpServers". OpenCode removed from universal (different shape).
  • Added OPENCODE snippet with the correct mcp shape, command-as-array, and environment.AGENTMEMORY_URL.
  • Added VS CODE (mcp.json) snippet — servers key, type: "stdio", standard env. The vscode:mcp/install deeplink already worked via its own flat shape; this covers the copy-JSON path.
  • "+ HERMES · OPENCLAW · MORE" toggle relabeled to "+ OPENCODE · VS CODE · CODEX · HERMES · OPENCLAW" so the catalog is visible before opening it.

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.
  • Hand-paste the new canonical block into a fresh ~/.cursor/mcp.json that already has firecrawl + linear + drawio entries (merging into the existing mcpServers map) — 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

    • Added configuration snippets for OPENCODE and VS Code integration.
  • Documentation

    • Updated configuration examples with environment setup guidance.
    • Expanded memory tools reference (now 51 tools available).
    • Improved compatibility guidance for multiple client types.
  • Chores

    • Version bump to 0.9.7 with updated metrics.

Review Change Stack

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.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agentmemory Ready Ready Preview, Comment May 11, 2026 1:25pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 11, 2026

📝 Walkthrough

Walkthrough

Updates README and AgentInstall component to standardize MCP configuration with environment variables (AGENTMEMORY_URL, AGENTMEMORY_FORCE_PROXY) across agents, expands tool count from 43 to 51, adds OPENCODE and VS CODE snippet examples, and bumps version to 0.9.7 with updated test/endpoint counts.

Changes

MCP Configuration & Agent Integration

Layer / File(s) Summary
README MCP Configuration Documentation
README.md
OpenClaw and Hermes prompts now reference 51 memory tools (from 43). "Other agents" and "Standalone MCP" sections add env blocks with AGENTMEMORY_URL, explicit merge instructions for existing mcpServers, and sandboxed-client guidance using AGENTMEMORY_FORCE_PROXY.
Configuration Constants
website/components/AgentInstall.tsx
New OPENCODE_JSON and VSCODE_MCP_JSON constants define configuration shapes with environment variable blocks.
AgentInstall Component Integration
website/components/AgentInstall.tsx
Universal snippet hint text updated (removed OPENCODE, added CLINE/ROO CODE/WINDSURF); expanded grid now includes OPENCODE and VS CODE (mcp.json) snippets before CODEX CLI, wired to new constants.
Version & Metadata Update
website/lib/generated-meta.json
Version bumped from 0.9.3 to 0.9.7; restEndpoints incremented from 120 to 121; testsPassing increased from 848 to 880; generatedAt timestamp refreshed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • rohitg00/agentmemory#280: Introduces AGENTMEMORY_URL and AGENTMEMORY_FORCE_PROXY environment variables and version 0.9.7 that this PR documents and references in UI snippets.
  • rohitg00/agentmemory#121: Modifies README and config examples for agent MCP setup, updating per-agent MCP invocation snippets.
  • rohitg00/agentmemory#114: Updates README "paste-this-prompt" setup blocks for OpenClaw/Hermes with MCP config changes.

Poem

🐰 The configs now flow with variables clear,
Fifty-one tools, and a URL sincere—
OPENCODE joins the fold, with VS Code in sight,
Environment paths, keeping sandboxes tight! 🎯

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: documentation updates for MCP installation snippets with merge guidance and per-host configuration shapes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/install-snippets-merge-guidance

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 1813d08 and c5c8a06.

📒 Files selected for processing (3)
  • README.md
  • website/components/AgentInstall.tsx
  • website/lib/generated-meta.json

Comment thread README.md
| **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}}}`. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

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.

Suggested change
| **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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant