agent-memory-mcp — Claude Code skill: persistent agent memory over MCP
This skill runs an MCP server that gives your agent long-term memory: it stores decisions, architecture notes and patterns, then finds them again by search.
npx claude-code-templates@latest --skill ai-research/agent-memory-mcpWhat agent-memory-mcp does
The skill stands up an MCP server so the agent can read, write and search long-term memories. Four tools come with it. memory_search looks things up by query, type or tags; memory_write stores a new entry; memory_read pulls one back by key; memory_stats reports how the memory bank is being used. Entries carry a type, so architecture, patterns and decisions stay apart.
Setup is manual, from the repository. Clone agentMemory into the agent workspace, then run npm install and npm run compile inside the skill folder. The server starts with npm run start-server <project_id> <absolute_path_to_target_workspace>, for instance npm run start-server my-project $(pwd). Node.js 18 or newer is required.
A standalone dashboard ships alongside: npm run start-dashboard <absolute_path_to_target_workspace>, reachable at http://localhost:3333. That port is fixed, so anything else already listening on 3333 will keep the dashboard from coming up.
What it helps with
- keep an architecture decision around after the session ends
- list every stored pattern that mentions authentication
- fetch one decision by its key instead of re-explaining it
- see how much memory has accumulated and how it is used
- organise project knowledge by type and tag
Example prompts for the agent
- Find all authentication patterns in the project memory
- Save this architecture decision under the key
auth-v1 - Show me the memory statistics
How to install agent-memory-mcp
1claude-code-templates
npx claude-code-templates@latest --skill ai-research/agent-memory-mcp2Skills CLI (Vercel)
npx skills add davila7/claude-code-templates --skill agent-memory-mcp -a claude-code3Manually: put the files in place
~/.claude/skills/agent-memory-mcp/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/agent-memory-mcp/
Manually: put the files in place
.agents/skills/agent-memory-mcp/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/agent-memory-mcp/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install davila7/claude-code-templates agent-memory-mcp2Manually: put the files in place
.github/skills/agent-memory-mcp/SKILL.mdPlatform CLI
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/ai-research/agent-memory-mcpManually: put the files in place
.devin/skills/agent-memory-mcp/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about agent-memory-mcp
How do I install agent-memory-mcp in Claude Code?
Clone the project first: git clone https://github.com/webzler/agentMemory.git .agent/skills/agent-memory. Then move into the skill folder and run npm install followed by npm run compile. Finally start the server with npm run start-server <project_id> <absolute_path_to_target_workspace>.
What does agent-memory-mcp do?
It runs an MCP server that holds long-term memory for the agent. Through memory_search, memory_write, memory_read and memory_stats the agent can look up, record and retrieve entries about architecture, patterns and decisions.
What does the skill need to run?
Node.js 18 or newer. The server is started from the cloned skill folder, and the dashboard listens on http://localhost:3333.