fix: correct standalone MCP invocation to use --package flag#121
Conversation
npx agentmemory-mcp fails because there is no standalone npm package named 'agentmemory-mcp'. The binary is registered inside the @agentmemory/agentmemory package and must be invoked with: npx --package @agentmemory/agentmemory agentmemory-mcp Updated all documentation examples across README.md and integration guides (openclaw, hermes) to use the correct invocation. This fixes MCP clients that followed the docs and got an npm 404 error.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated README.md to document new OpenCode MCP server configuration examples. Changed the configuration schema from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
OpenCode uses a different MCP config format than other tools: - Config file is opencode.json (not .opencode/config.json) - Uses "type": "local" with "command" array (not mcpServers format) - Does not use separate "command"/"args" fields Also added an OpenCode-specific config block in the Standalone MCP section alongside the generic JSON example so it's easy to find.
…x-command # Conflicts: # README.md # integrations/hermes/README.md # integrations/openclaw/README.md # src/cli.ts
|
Thanks for catching this + the research on OpenCode's config format — that was the valuable bit I missed in #123. Merging with a small conflict resolution: #123 landed first with a structurally different fix for the same 404 (published a real Your OpenCode correction is preserved, though — the row in the agents table and the dedicated OpenCode block you added in the Standalone MCP section both stay, with only the command swapped to Landing in the next patch bump alongside #122. |
Two community contributions on top of 0.8.3 land as a patch release so they reach users immediately and so `npx agentmemory-mcp` ships to the npm registry for the first time (closing out #120 on the live release). - #122 (Jason Landbridge): memory_save persists to disk immediately after every call, not just on SIGINT/SIGTERM, so memories survive SIGKILL from agent sessions ending forcefully - #121 (Jason Landbridge): OpenCode MCP config format corrected — opencode.json with mcp/type:local/command array instead of the wrong .opencode/config.json with mcpServers Version bumped across package.json, src/version.ts, types.ts, export-import supportedVersions, plugin.json, shim package.json and its dependency on the main package (~0.8.4). package-lock.json regenerated. 684 tests passing, clean build.
|
Yes great compromise on getting this in. thank you! |
Problem
npx agentmemory-mcpfails with a 404 from the npm registry because there is no standalone npm package namedagentmemory-mcp. Theagentmemory-mcpbinary is registered inside the@agentmemory/agentmemorypackage (dist/standalone.mjs).Running
npx agentmemory-mcpas documented causes:Fix
The correct invocation is:
And in MCP config JSON:
{ "mcpServers": { "agentmemory": { "command": "npx", "args": ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"] } } }Changes
Updated all documentation examples to use the correct
--packageflag:README.md— standalone MCP section, quick-start table, and agent-specific prompts (OpenClaw, Hermes, Cursor, OpenCode, Gemini CLI, Codex CLI, Claude Desktop)integrations/openclaw/README.mdintegrations/hermes/README.mdVerification
Confirmed working locally:
closes #120
Summary by CodeRabbit