Skip to content

#1 Persistent memory for AI coding agents based on real-world benchmarks

fix: correct standalone MCP invocation to use --package flag

JasonLandbridge401666a8b62b
diff --git a/README.md b/README.md
index 27469e85..ff75779e 100644
--- a/README.md
+++ b/README.md
@@ -317,7 +317,7 @@ Install agentmemory for OpenClaw. Run `npx @agentmemory/agentmemory` in a separa
"mcpServers": {
"agentmemory": {
"command": "npx",
- "args": ["agentmemory-mcp"]
+ "args": ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]
}
}
}
@@ -338,7 +338,7 @@ Install agentmemory for Hermes. Run `npx @agentmemory/agentmemory` in a separate
mcp_servers:
agentmemory:
command: npx
- args: ["agentmemory-mcp"]
+ args: ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]
Verify with `curl http://localhost:3111/agentmemory/health`. Open http://localhost:3113 for the real-time viewer. For deeper 6-hook memory provider integration (pre-LLM context injection, turn capture, MEMORY.md mirroring, system prompt block), copy integrations/hermes from the agentmemory repo to ~/.hermes/plugins/memory/agentmemory.
```
@@ -355,14 +355,14 @@ Then add the MCP config for your agent:
| Agent | Setup |
|---|---|
-| **Cursor** | Add to `~/.cursor/mcp.json`: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["agentmemory-mcp"]}}}` |
-| **OpenClaw** | Add to MCP config: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["agentmemory-mcp"]}}}` or use the [gateway plugin](integrations/openclaw/) |
-| **Gemini CLI** | `gemini mcp add agentmemory -- npx agentmemory-mcp` |
-| **Codex CLI** | Add to `.codex/config.yaml`: `mcp_servers: {agentmemory: {command: npx, args: ["agentmemory-mcp"]}}` |
-| **OpenCode** | Add to `.opencode/config.json`: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["agentmemory-mcp"]}}}` |
+| **Cursor** | Add to `~/.cursor/mcp.json`: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]}}}` |
+| **OpenClaw** | Add to MCP config: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]}}}` or use the [gateway plugin](integrations/openclaw/) |
+| **Gemini CLI** | `gemini mcp add agentmemory -- npx --package @agentmemory/agentmemory agentmemory-mcp` |
+| **Codex CLI** | Add to `.codex/config.yaml`: `mcp_servers: {agentmemory: {command: npx, args: ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]}}` |
+| **OpenCode** | Add to `.opencode/config.json`: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]}}}` |
| **Hermes Agent** | Add to `~/.hermes/config.yaml` or use the [memory provider plugin](integrations/hermes/) |
| **Cline / Goose / Kilo Code** | Add MCP server in settings |
-| **Claude Desktop** | Add to `claude_desktop_config.json`: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["agentmemory-mcp"]}}}` |
+| **Claude Desktop** | Add to `claude_desktop_config.json`: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]}}}` |
| **Aider** | REST API: `curl -X POST http://localhost:3111/agentmemory/smart-search -d '{"query": "auth"}'` |
| **Any agent (32+)** | `npx skillkit install agentmemory` |
@@ -589,7 +589,7 @@ npm install @xenova/transformers
Run without the full server — for any MCP client:
```bash
-npx agentmemory-mcp
+npx --package @agentmemory/agentmemory agentmemory-mcp
```
Or add to your agent's MCP config:
@@ -599,7 +599,7 @@ Or add to your agent's MCP config:
"mcpServers": {
"agentmemory": {
"command": "npx",
- "args": ["agentmemory-mcp"]
+ "args": ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]
}
}
}
diff --git a/integrations/hermes/README.md b/integrations/hermes/README.md
index dcec3646..85d08012 100644
--- a/integrations/hermes/README.md
+++ b/integrations/hermes/README.md
@@ -35,7 +35,7 @@ an MCP server with all 43 memory tools:
mcp_servers:
agentmemory:
command: npx
- args: ["agentmemory-mcp"]
+ args: ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]
Verify it's working with
`curl http://localhost:3111/agentmemory/health` — it should return
@@ -61,7 +61,7 @@ Add to `~/.hermes/config.yaml`:
mcp_servers:
agentmemory:
command: npx
- args: ["agentmemory-mcp"]
+ args: ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]
```
This gives Hermes access to all 43 MCP tools. Start the server separately:
diff --git a/integrations/openclaw/README.md b/integrations/openclaw/README.md
index 83947af7..4a240487 100644
--- a/integrations/openclaw/README.md
+++ b/integrations/openclaw/README.md
@@ -37,7 +37,7 @@ memory_smart_search, memory_timeline, memory_profile, etc.):
"mcpServers": {
"agentmemory": {
"command": "npx",
- "args": ["agentmemory-mcp"]
+ "args": ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]
}
}
}
@@ -81,7 +81,7 @@ Then add to your OpenClaw MCP config:
"mcpServers": {
"agentmemory": {
"command": "npx",
- "args": ["agentmemory-mcp"]
+ "args": ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]
}
}
}