# Open Agent Memory

> Open Agent Memory is an open-source MCP server for knowledge and memory. Thin stdio MCP wrapper for citing recall from your own self-hosted Open Agent Memory. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/rocke2020/open-agent-memory/tree/HEAD/integrations/mcp
- **MCP Registry name:** io.github.rocke2020/oam
- **Categories:** [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-11-23

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
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.

### Claude Code: Or share it with your project (.mcp.json)

```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 Desktop (claude_desktop_config.json)

```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.

### Cursor (~/.cursor/mcp.json)

```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.

### VS Code (~/.copilot/mcp-config.json)

```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.

### Codex: Add with the CLI (Terminal)

```sh
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
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```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>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```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

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```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.

### Devin Desktop (~/.config/devin/mcp_config.json)

```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.

### Cline (cline_mcp_settings.json)

```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.

### Zed (Zed settings.json)

```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.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```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>"
      }
    }
  }
}
```

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```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.

### Kiro (~/.kiro/settings/mcp.json)

```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.

### Other clients (your client's MCP settings (most use this shape))

```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>"
      }
    }
  }
}
```

## Tools

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_add` (name suggests: changes): Stores one explicit user message.
- `memory_add_document` (name suggests: changes): Adds a document by text or URL.
- `memory_operation`: Checks the state of an operation.
- `memory_profile`: Reads stored profile content.
- `memory_remove` (name suggests: deletes): Removes a memory or insight.

## 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.

## Alternatives

- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Nautilus Compass Memory](https://ai-powered.com/mcp/nautilus-compass-memory): Nautilus Compass Memory is an open-source MCP server for knowledge and memory.
- [Myco: Agent-First Cognitive Substrate](https://ai-powered.com/mcp/myco-agent-first-cognitive-substrate): Myco: Agent-First Cognitive Substrate is an open-source MCP server for knowledge and memory.
- [Source Library](https://ai-powered.com/mcp/source-library): Source Library is an open-source MCP server for knowledge and memory.
- [keepplain-plugin](https://ai-powered.com/mcp/keepplain-plugin): keepplain-plugin is a freemium MCP server for knowledge and memory.
- [Second Brain](https://ai-powered.com/mcp/second-brain-2): Second Brain is a freemium MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/open-agent-memory
