Harnesses and integrations

Connect MemOS to Claude Code, Cursor, Codex, Gemini CLI, Hermes, OpenClaw, Cline, Zed, Goose, Kilo, pi, OpenCode, Windsurf, and any MCP client.

MemOS ships a plain stdio MCP server, so it works with any MCP-capable client. memos connect <target> writes the right config into the right file for the harnesses that need help.

Supported harnesses

HarnessSupportCommand
Claude CodeNative plugin + MCP/plugin install memos@memos-marketplace or memos connect claude-code --write
CursorPlugin manifest + MCPmemos connect cursor --write
CodexMCPmemos connect codex --write
Gemini CLIExtension + MCPmemos connect gemini --write
Hermes AgentAgent Plugin + MCPhermes plugins install Markgatcha/memos --no-enable or memos connect hermes
OpenClawAgent Plugin bundle + MCPmemos connect openclaw
ClineMCPmemos connect cline --write
ZedMCP (context_servers)memos connect zed --write
GooseMCP extensionmemos connect goose
Kilo CodeMCPmemos connect kilo
piMCPmemos connect pi
OpenCodeMCP + plugin systemmemos connect opencode --write
WindsurfMCPmemos connect windsurf --write
Any MCP clientMCPmemos connect generic

Use --write

Without --write, connect prints a snippet and changes nothing. With it, MemOS merges into the real config file and keeps a backup.

Manual config

If your harness is not in the list, point it at the stdio server:

{
  "mcpServers": {
    "memos": {
      "command": "npx",
      "args": ["-y", "@mem-os/sdk", "mcp"]
    }
  }
}

For a specific store, add the path:

{
  "mcpServers": {
    "memos": {
      "command": "npx",
      "args": ["-y", "@mem-os/sdk", "mcp", "--db", "/absolute/path/memos.db"]
    }
  }
}

For remote clients, run Streamable HTTP:

npx -y @mem-os/sdk mcp --http --port 8788 --host 127.0.0.1

See Remote MCP and OAuth for auth and deployment.

What the agent gets

Once connected, the harness sees the MCP tools, including:

  • memos_store, memos_search, memos_retrieve, memos_forget
  • memos_context_pack, memos_profile, memos_graph
  • memos_search_temporal, memos_set_validity, memos_supersede
  • memos_consolidate, memos_history, memos_revert
  • memos_image_add, memos_image_search
  • memos_explain, memos_diagnostics

The exact list depends on your build and tool profile. The MCP reference is exhaustive.

Verify the connection

  1. Restart the harness after writing config.
  2. Ask it to store a fact: "Remember that this project uses pnpm."
  3. Open a new session and ask what package manager the project uses.
  4. If it cannot recall, run memos doctor and check the DB path the harness is using.

Harness-specific notes

Claude Code loads the plugin marketplace automatically. The plugin adds auto-recall and session-end consolidation hooks on top of the MCP tools.

Hermes and OpenClaw use the Agent Plugins 1.0.0 layout: the repo root ships plugin.json, mcp.json, and skills/. That gives them commands and skills, not just tools.

Cursor, Cline, Zed, Goose, and Kilo are MCP-only. There is no custom plugin to maintain.

Codex uses ~/.codex/config.toml. memos connect codex --write edits the [mcp_servers.memos] table.

For the full matrix, including which harnesses support native plugins versus MCP only, see the harness matrix.