CogniRepo — Claude Code MCP server: what it does, how to install
Local MCP server providing persistent memory and AST code indexing for coding agents. It retains context and speeds up symbol lookups across sessions.
claude mcp add cognirepo -- uvx cognirepoWhat CogniRepo does
CogniRepo adds persistent storage and repository structure directly to coding assistants. It uses FAISS vector search for architecture notes alongside NetworkX graphs for call relationships. AST indexing finds function and class definitions without slow text scans. Everything runs locally on your machine.
The server keeps an append-only event log. It also logs recurring errors so agents avoid repeating known mistakes. Context stays intact when you switch agents or begin a new chat.
Running it requires Python 3.11+ and the uvx runner. On smaller repositories, schema definitions for 36 tools consume ~3,700 tokens, which can exceed the savings from targeted lookups. Break-even arrives after roughly 4 tool calls.
What it helps with
- locate symbol definitions via AST indexing
- persist architectural decisions across agent sessions
- share codebase context between different coding tools
- prevent repeated coding mistakes using error logs
Example prompts for the agent
- Find where
DatabaseSessionis defined and show its call graph - Record our decision to adopt background worker queues
- Check the error history to see why the test run failed
How to install CogniRepo
Platform CLI
claude mcp add cognirepo -- uvx cognirepouvx runs the command named after the package; if the README names another one, use uvx --from cognirepo <command>
Platform CLI
codex mcp add cognirepo -- uvx cognirepouvx runs the command named after the package; if the README names another one, use uvx --from cognirepo <command>
Config file
{
"mcpServers": {
"cognirepo": {
"command": "uvx",
"args": [
"cognirepo"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from cognirepo <command>
Config file
{
"servers": {
"cognirepo": {
"type": "stdio",
"command": "uvx",
"args": [
"cognirepo"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from cognirepo <command>
Platform CLI
gemini mcp add cognirepo uvx cognirepouvx runs the command named after the package; if the README names another one, use uvx --from cognirepo <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 CogniRepo
How do I install CogniRepo in Claude Code?
Run claude mcp add cognirepo -- uvx cognirepo in your terminal. You need Python 3.11+ installed locally.
What does CogniRepo do?
It gives coding agents persistent memory, AST symbol lookups, and call relationship graphs. This keeps project context intact across separate editing sessions.
Does CogniRepo need an API key?
No external API keys are needed. Repository indexing and all 36 MCP tools run fully offline on your CPU.