Claude Code Integration Guide
Give Claude Code persistent memory across sessions. Store decisions, search your knowledge base, and share context with your team — all powered by AgentRecall's graph-backed MCP server.
Overview
AgentRecall provides Claude Code with a persistent memory layer backed by a knowledge graph. Instead of losing context when you close a session, AgentRecall lets you:
- Store — architectural decisions, debugging notes, code conventions
- Search — semantic search across all stored memories
- Relate — automatically build entity relationships via the knowledge graph
- Share — team-wide memory through project-scoped configuration
The MCP (Model Context Protocol) server runs as a local stdio process. Claude Code communicates with it automatically — no API calls to write yourself.
Prerequisites
- Python 3.10 or newer
- Claude Code installed (any recent version with MCP support)
- An AgentRecall account — sign up free at dashboard.agentrecall.cloud
- An API key (starts with
ark_) and an Agent ID
Installation
Install the AgentRecall MCP server package from PyPI:
python -m venv ~/.venvs/agentrecall && source ~/.venvs/agentrecall/bin/activateSetup
There are three ways to register the MCP server with Claude Code. Pick whichever fits your workflow.
A. CLI — User Scope
Registers the server globally for your user. Available in every Claude Code session automatically.
B. CLI — Project Scope
Creates a .mcp.json file in the current directory. Other team members can pick it up from version control.
C. Manual — Edit ~/.claude.json
Open ~/.claude.json (or create it) and add the server entry directly:
Configuration Reference
All configuration is done through environment variables passed to the MCP server process.
| Variable | Required | Default | Description |
|---|---|---|---|
| AGENTRECALL_API_KEY | Yes | — | Your API key from the AgentRecall dashboard (starts with ark_). |
| AGENTRECALL_API_URL | No | https://api.agentrecall.cloud/mcp | Override if you're self-hosting or using a regional endpoint. |
| API key | No | hermes | Unique agent identifier. Each ID gets its own memory namespace. The agent is auto-created on first use if it doesn't exist. |
Verify Installation
After setup, confirm the server is registered and reachable.
List registered MCP servers
You should see agentrecall in the output with status ready.
Check MCP status inside a session
This prints all connected MCP servers and their available tools. You should see tools like store_memory, search_memories, and traverse_graph.
Use Cases
1. Store Architectural Decisions
After a design discussion, tell Claude Code to save the decision for future sessions:
2. Search Codebase Knowledge
Ask Claude Code to find relevant memories when you start working on a new area:
3. Cross-Session Debugging
When you find a tricky bug, save the solution so you never re-encounter it:
4. Team Memory Sharing via .mcp.json
Use project-scoped setup so your whole team shares a memory namespace. Commit the .mcp.json file (with environment variables, not secrets):
Every team member sets their own AGENTRECALL_API_KEY in their shell profile, and the MCP server connects them all to the same agent namespace.
Troubleshooting
⚠ "Binary not found" or "command not found"
The agentrecall-mcp binary isn't on your PATH. Fix:
- If using a virtualenv, make sure it's activated before running
claude mcp add - Verify the binary exists:
which agentrecall-mcp - If installed with
pipx, ensure~/.local/binis on your PATH
⚠ Python / venv mismatch
Claude Code may use a different Python than the one you installed the package with. To fix, specify the full path in your MCP config:
⚠ Agent auto-creation
If you specify an API key that doesn't exist yet, AgentRecall automatically creates it on the first store or search call. No extra setup needed.
Multi-Project Setup
Use different API key values per project to keep memories isolated:
Each project gets its own memory namespace. Memories stored in the frontend project won't pollute the backend project's context — unless you deliberately search across namespaces using the API directly.
Removing the Server
To unregister the AgentRecall MCP server from Claude Code:
Next Steps
- Browse the REST API reference for direct integration beyond MCP
- Explore the general documentation for the full MCP tools catalog and data model
- Check out the GitHub repository for source code and examples