Skip to content
MCP server

Open Agent Memory

Thin stdio MCP wrapper for citing recall from your own self-hosted Open Agent Memory

Runs locally

Open Agent Memory is an open-source MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted
Runs
Locally
What it can do
Can delete data (1 tool)
Access
Needs a secret key or token

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add oam --env OAM_BASE_URL='<OAM_BASE_URL>' --env OAM_USER_ID='<OAM_USER_ID>' --env OAM_USER_API_KEY='<OAM_USER_API_KEY>' -- npx -y @rocke-dong/oam-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "oam": {
      "command": "npx",
      "args": [
        "-y",
        "@rocke-dong/oam-mcp"
      ],
      "env": {
        "OAM_BASE_URL": "<OAM_BASE_URL>",
        "OAM_USER_ID": "<OAM_USER_ID>",
        "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "oam": {
      "command": "npx",
      "args": [
        "-y",
        "@rocke-dong/oam-mcp"
      ],
      "env": {
        "OAM_BASE_URL": "<OAM_BASE_URL>",
        "OAM_USER_ID": "<OAM_USER_ID>",
        "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "oam": {
      "command": "npx",
      "args": [
        "-y",
        "@rocke-dong/oam-mcp"
      ],
      "env": {
        "OAM_BASE_URL": "<OAM_BASE_URL>",
        "OAM_USER_ID": "<OAM_USER_ID>",
        "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "oam": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@rocke-dong/oam-mcp"
      ],
      "env": {
        "OAM_BASE_URL": "<OAM_BASE_URL>",
        "OAM_USER_ID": "<OAM_USER_ID>",
        "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add oam --env OAM_BASE_URL='<OAM_BASE_URL>' --env OAM_USER_ID='<OAM_USER_ID>' --env OAM_USER_API_KEY='<OAM_USER_API_KEY>' -- npx -y @rocke-dong/oam-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.oam]
command = "npx"
args = ["-y", "@rocke-dong/oam-mcp"]
env = { OAM_BASE_URL = "<OAM_BASE_URL>", OAM_USER_ID = "<OAM_USER_ID>", OAM_USER_API_KEY = "<OAM_USER_API_KEY>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "oam": {
      "command": "npx",
      "args": [
        "-y",
        "@rocke-dong/oam-mcp"
      ],
      "env": {
        "OAM_BASE_URL": "<OAM_BASE_URL>",
        "OAM_USER_ID": "<OAM_USER_ID>",
        "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "oam": {
          "command": "npx",
          "args": [
            "-y",
            "@rocke-dong/oam-mcp"
          ],
          "env": {
            "OAM_BASE_URL": "<OAM_BASE_URL>",
            "OAM_USER_ID": "<OAM_USER_ID>",
            "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e OAM_BASE_URL='<OAM_BASE_URL>' -e OAM_USER_ID='<OAM_USER_ID>' -e OAM_USER_API_KEY='<OAM_USER_API_KEY>' oam npx -- -y @rocke-dong/oam-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "oam": {
          "command": "npx",
          "args": [
            "-y",
            "@rocke-dong/oam-mcp"
          ],
          "env": {
            "OAM_BASE_URL": "<OAM_BASE_URL>",
            "OAM_USER_ID": "<OAM_USER_ID>",
            "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "oam": {
          "command": "npx",
          "args": [
            "-y",
            "@rocke-dong/oam-mcp"
          ],
          "env": {
            "OAM_BASE_URL": "<OAM_BASE_URL>",
            "OAM_USER_ID": "<OAM_USER_ID>",
            "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "oam": {
          "command": "npx",
          "args": [
            "-y",
            "@rocke-dong/oam-mcp"
          ],
          "env": {
            "OAM_BASE_URL": "<OAM_BASE_URL>",
            "OAM_USER_ID": "<OAM_USER_ID>",
            "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "oam": {
          "command": "npx",
          "args": [
            "-y",
            "@rocke-dong/oam-mcp"
          ],
          "env": {
            "OAM_BASE_URL": "<OAM_BASE_URL>",
            "OAM_USER_ID": "<OAM_USER_ID>",
            "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "oam": {
          "command": "npx",
          "args": [
            "-y",
            "@rocke-dong/oam-mcp"
          ],
          "env": {
            "OAM_BASE_URL": "<OAM_BASE_URL>",
            "OAM_USER_ID": "<OAM_USER_ID>",
            "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "oam": {
          "command": "npx",
          "args": [
            "-y",
            "@rocke-dong/oam-mcp"
          ],
          "env": {
            "OAM_BASE_URL": "<OAM_BASE_URL>",
            "OAM_USER_ID": "<OAM_USER_ID>",
            "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "oam": {
          "command": "npx",
          "args": [
            "-y",
            "@rocke-dong/oam-mcp"
          ],
          "env": {
            "OAM_BASE_URL": "<OAM_BASE_URL>",
            "OAM_USER_ID": "<OAM_USER_ID>",
            "OAM_USER_API_KEY": "<OAM_USER_API_KEY>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • OAM_BASE_URLURL of your existing OAM deployment, for example http://127.0.0.1:17333Required
  • OAM_USER_IDYour authorized OAM user IDRequired
  • OAM_USER_API_KEYUser-scoped API key for your OAM deploymentRequired

About Open Agent Memory

It adds no hosted service, database or port. Instead it calls the HTTP API of an Open Agent Memory (OAM) deployment you already run, in api_key mode with a user-scoped key. OAM handles authentication, retention, indexing, retrieval and citations; the wrapper only passes them through and labels recalled text as untrusted evidence rather than instructions.

Six tools cover recall with citations, adding a memory, adding a document by text or HTTPS URL, checking operation state, reading the stored profile and removing a memory. Writes accept an idempotency key so retries reuse the original receipt. Requests time out after 60 seconds, redirects are refused so the key cannot leak, and no memory content is written to disk.

Limits are stated plainly: stdio only, one OAM user per process, no file upload, no profile refresh and no generated answers or reranking. Node.js 22 or later is required, and it is Apache-2.0 licensed.

Tools this server provides (6)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 1 of 6 tools deletes data and 2 change data; 3 names don't say.

From the server's own tool labels and tool names; not verified by us.

memory_recall
Recalls memory with citations.
memory_addName suggests: changes
Stores one explicit user message.
memory_add_documentName suggests: changes
Adds a document by text or URL.
memory_operation
Checks the state of an operation.
memory_profile
Reads stored profile content.
memory_removeName suggests: deletes
Removes a memory or insight.

What it does

Cited recall
memory_recall returns context with citations and a trace id.
Explicit memory writes
memory_add stores a message only when the user asks.
Document ingestion
Adds text or HTTPS URL documents.
Operation status
Checks readiness and stage state of writes.
Safe wrapper
Refuses redirects and never logs keys or memory text.

Good for

  • Give a coding agent recall over your own memory store
  • Store a preference the user asked to remember
  • Index a document by URL for later recall
  • Remove an outdated memory

Pricing

Open source

Apache-2.0; requires your own OAM deployment

Open Agent Memory FAQ

Does Open Agent Memory need a running OAM server?

Yes. It calls an existing deployment through OAM_BASE_URL, with a user ID and API key.

Which transport does Open Agent Memory use?

stdio only.

Can Open Agent Memory upload files?

No; only text and HTTPS URL documents.

Which Node.js version?

Node.js 22 or newer.

Is Open Agent Memory free?

Yes. Open Agent Memory is open source, so you can use and self-host it for free.

How do I add Open Agent Memory to Claude Code?

Run this command in your terminal: claude mcp add oam --env OAM_BASE_URL='<OAM_BASE_URL>' --env OAM_USER_ID='<OAM_USER_ID>' --env OAM_USER_API_KEY='<OAM_USER_API_KEY>' -- npx -y @rocke-dong/oam-mcp

What are the best alternatives to Open Agent Memory?

The closest alternatives to Open Agent Memory are Codebase Memory, XERJ, Claude Code Ultimate Guide, Nautilus Compass Memory and Myco: Agent-First Cognitive Substrate.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers