GrantAi Memory — Claude Code MCP server: use and install
A local memory layer for AI agents that keeps project knowledge, files, and session context available across tasks. It also supports shared memory between agents.
claude mcp add --env GRANTAI_LICENSE_KEY=<GRANTAI_LICENSE_KEY> --transport stdio grantai-memory -- docker run -i --rm -e GRANTAI_LICENSE_KEY ghcr.io/solonai-com/grantai-memory:1.8.5What GrantAi Memory does
GrantAi Memory adds persistent local storage to an AI agent through MCP. It can keep knowledge, files, project state, code snippets, Git history, and session summaries, then retrieve stored material by its identifier instead of searching for approximate matches.
The server exposes tools such as grantai_teach, grantai_infer, grantai_learn, grantai_project, grantai_git, and grantai_capture. Agents connected to the same instance use one shared memory pool. Optional speaker and from_agents values provide attribution and filtering.
The Claude Code setup runs the Docker image and passes GRANTAI_LICENSE_KEY into it. Docker must be available for this command, and the placeholder must be replaced with the required key.
What it helps with
- keep project context across agent sessions
- share stored knowledge between multiple agents
- import files and directories for later recall
- track project state and Git history
- save code snippets and session summaries
Example prompts for the agent
- Store the API authentication rules in memory with
grantai_teach. - Import the
docsdirectory for future tasks withgrantai_learn. - Retrieve the current project state with
grantai_project.
How to install GrantAi Memory
Platform CLI
claude mcp add --env GRANTAI_LICENSE_KEY=<GRANTAI_LICENSE_KEY> --transport stdio grantai-memory -- docker run -i --rm -e GRANTAI_LICENSE_KEY ghcr.io/solonai-com/grantai-memory:1.8.5Replace <…> with your own values
Platform CLI
codex mcp add grantai-memory --env GRANTAI_LICENSE_KEY=<GRANTAI_LICENSE_KEY> -- docker run -i --rm -e GRANTAI_LICENSE_KEY ghcr.io/solonai-com/grantai-memory:1.8.5Replace <…> with your own values
Config file
{
"mcpServers": {
"grantai-memory": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GRANTAI_LICENSE_KEY",
"ghcr.io/solonai-com/grantai-memory:1.8.5"
],
"env": {
"GRANTAI_LICENSE_KEY": "<GRANTAI_LICENSE_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"grantai-memory": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GRANTAI_LICENSE_KEY",
"ghcr.io/solonai-com/grantai-memory:1.8.5"
],
"env": {
"GRANTAI_LICENSE_KEY": "<GRANTAI_LICENSE_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e GRANTAI_LICENSE_KEY=<GRANTAI_LICENSE_KEY> grantai-memory docker run -i --rm -e GRANTAI_LICENSE_KEY ghcr.io/solonai-com/grantai-memory:1.8.5Replace <…> with your own values
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 GrantAi Memory
How do I install GrantAi Memory in Claude Code?
Run `claude mcp add --env GRANTAI_LICENSE_KEY=<GRANTAI_LICENSE_KEY> --transport stdio grantai-memory -- docker run -i --rm -e GRANTAI_LICENSE_KEY ghcr.io/solonai-com/grantai-memory:1.8.5`, replacing the key placeholder.
What does GrantAi Memory do?
It gives AI agents MCP-based local memory for knowledge, files, project state, code snippets, Git history, and session summaries. Multiple agents can use the same memory instance.
How can several agents share the same memory?
Point them to one GrantAi Memory instance. Use speaker to record which agent added information and from_agents to limit retrieval to selected agents.