Content
# Agent Memory MCP
Standalone MCP server for agent-maintained memories.
Memories are stored under `~/.agents/memories` by default. Set `AGENT_MEMORY_ROOT` to use another directory.
## Install
```sh
npx -y @msr0806/agent-memory-mcp
```
## Cursor / Claude Desktop
```json
{
"mcpServers": {
"agent-memory": {
"command": "npx",
"args": ["-y", "--package=@msr0806/agent-memory-mcp", "agent-memory-mcp"]
}
}
}
```
If `npx` fails with `command not found`, clear the cache and retry:
```sh
npx clear-npx-cache
npx -y --package=@msr0806/agent-memory-mcp agent-memory-mcp
```
Optional custom storage path:
```json
{
"mcpServers": {
"agent-memory": {
"command": "npx",
"args": ["-y", "@msr0806/agent-memory-mcp"],
"env": {
"AGENT_MEMORY_ROOT": "/path/to/memories"
}
}
}
}
```
## Tools
| Tool | Description |
|------|-------------|
| `create_memory` | Create a global or repo-scoped memory |
| `read_memory` | Read one memory |
| `read_memories` | Read global + repo memories for a repo |
| `update_memory` | Update description and/or content |
| `delete_memory` | Delete a memory |
| `list_memories` | List memory metadata |
### Scopes
- **global** — shared across all repos (e.g. coding preferences)
- **repo** — scoped to a repo name (e.g. `project-gilly`)
### Storage layout
```
~/.agents/memories/
global/
coding-style/MEMORY.md
repos/
project-gilly/
mvp-scope/MEMORY.md
```
## Development
```sh
git clone https://github.com/MSR806/agent-memory-mcp.git
cd agent-memory-mcp
npm install
npm test
npm run build
npm start
```
## Publish
```sh
npm login
npm publish --access public
```