Skip to content

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

fix: correct OpenCode MCP config format and add dedicated example

JasonLandbridgee83bb112fff5
diff --git a/README.md b/README.md
index ff75779e..7b422f83 100644
--- a/README.md
+++ b/README.md
@@ -359,7 +359,7 @@ Then add the MCP config for your agent:
| **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"]}}}` |
+| **OpenCode** | Add to `opencode.json`: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "--package", "@agentmemory/agentmemory", "agentmemory-mcp"], "enabled": true}}}` |
| **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": ["--package", "@agentmemory/agentmemory", "agentmemory-mcp"]}}}` |
@@ -594,6 +594,7 @@ npx --package @agentmemory/agentmemory agentmemory-mcp
Or add to your agent's MCP config:
+Most agents (Cursor, Claude Desktop, Cline, etc.):
```json
{
"mcpServers": {
@@ -605,6 +606,19 @@ Or add to your agent's MCP config:
}
```
+OpenCode (`opencode.json`):
+```json
+{
+ "mcp": {
+ "agentmemory": {
+ "type": "local",
+ "command": ["npx", "--package", "@agentmemory/agentmemory", "agentmemory-mcp"],
+ "enabled": true
+ }
+ }
+}
+```
+
---
<h2 id="real-time-viewer"><picture><source media="(prefers-color-scheme: dark)" srcset="assets/tags/light/section-viewer.svg"><img src="assets/tags/section-viewer.svg" alt="Real-Time Viewer" height="32" /></picture></h2>