agent-memory-os — Claude Code MCP server: features and setup
agent-memory-os — a local MCP server gives agent teams shared, access-controlled memory with project scopes and node sync. Use it when several agents need the same context.
Apache-2.0 ★ 9 updated 2026-10-01
claude mcp add --env AGENT_MEMORY_AGENT_ID=<AGENT_MEMORY_AGENT_ID> --env AGENT_MEMORY_HOME=<AGENT_MEMORY_HOME> --transport stdio agent-memory-os -- uvx agent-memory-osWhat agent-memory-os does
agent-memory-os keeps agent memory in a single SQLite database with FTS5 indexing. Records can belong to an agent, team, project, or global scope, and the access check runs before ranking. Linked memories can surface through associative recall, while each prompt receives a token-budgeted context pack with an audit of included and excluded items.
The server can exchange memories and organization data between nodes using bundles and peer synchronization. It also handles duplicate merging, conflict markers, decay, pinning, expiry, and access revocation. A web UI, vector candidates, and the MCP server are optional sidecars. Set AGENT_MEMORY_AGENT_ID when agents need separate identities, and use AGENT_MEMORY_HOME to choose the memory location.
What it helps with
- store durable memory for several AI agents
- separate records by team and project
- enforce access rules before recall
- sync memory across multiple nodes
- surface related records without shared query terms
Example prompts for the agent
- Save this architecture decision as team memory and limit access to the agents in this project.
- Find earlier decisions about this module, including linked memories that use different terms.
- Build a context pack for this request using only memories visible to the current agent.
How to install agent-memory-os
Platform CLI
claude mcp add --env AGENT_MEMORY_AGENT_ID=<AGENT_MEMORY_AGENT_ID> --env AGENT_MEMORY_HOME=<AGENT_MEMORY_HOME> --transport stdio agent-memory-os -- uvx agent-memory-osReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from agent-memory-os <command>
Platform CLI
codex mcp add agent-memory-os --env AGENT_MEMORY_AGENT_ID=<AGENT_MEMORY_AGENT_ID> --env AGENT_MEMORY_HOME=<AGENT_MEMORY_HOME> -- uvx agent-memory-osReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from agent-memory-os <command>
Config file
{
"mcpServers": {
"agent-memory-os": {
"command": "uvx",
"args": [
"agent-memory-os"
],
"env": {
"AGENT_MEMORY_AGENT_ID": "<AGENT_MEMORY_AGENT_ID>",
"AGENT_MEMORY_HOME": "<AGENT_MEMORY_HOME>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from agent-memory-os <command>
Config file
{
"servers": {
"agent-memory-os": {
"type": "stdio",
"command": "uvx",
"args": [
"agent-memory-os"
],
"env": {
"AGENT_MEMORY_AGENT_ID": "<AGENT_MEMORY_AGENT_ID>",
"AGENT_MEMORY_HOME": "<AGENT_MEMORY_HOME>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from agent-memory-os <command>
Platform CLI
gemini mcp add -e AGENT_MEMORY_AGENT_ID=<AGENT_MEMORY_AGENT_ID> -e AGENT_MEMORY_HOME=<AGENT_MEMORY_HOME> agent-memory-os uvx agent-memory-osReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from agent-memory-os <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agent-memory-os
How do I install agent-memory-os in Claude Code?
Run claude mcp add agent-memory-os -- uvx agent-memory-os. This registers the MCP server and starts it through uvx.
What does agent-memory-os do?
It stores agent, team, project, and global memories in SQLite, checks authorization before ranking, and prepares a token-budgeted context for each prompt. Linked memories and node synchronization extend recall beyond one agent.
Does it require a separate server or hosted service?
The core uses one local SQLite file and does not require a server. The web UI, MCP server, and semantic vector support are optional sidecars.