@centr-ai/mcp
Enables an optional local SLM Brain via Ollama for semantic re-ranking, task classification, and failure diagnosis, with automatic fallback to deterministic core heuristics.
Provides OpenAI Codex agents with local, token-budgeted repository intelligence, including task-specific context, ranked code search, symbol lookup, and project memory.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@centr-ai/mcpfind relevant code and past learnings about the Stripe integration"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
⚡ The 2-Minute Executive Summary
Question | The CentR Answer |
What is CentR? | A local-first developer middleware that indexes code, maintains institutional memory, and supplies the smallest useful context to AI coding agents. |
Why does it exist? | Coding agents (Claude Code, Cursor, Codex, Antigravity) waste 2–4 turns and thousands of tokens blindly running |
How is it different from RAG / Vector DBs? | Vector DBs dump unvalidated chunk similarity into context. CentR is deterministic AST symbol indexing + SQLite FTS5 BM25 + strict token budgets + evidence-scored memory. |
Does it replace my coding agent? | No. CentR is not an agent. It sits beside your agent via Model Context Protocol (MCP) or CLI to give it instant repository intelligence. |
Does it require cloud AI or paid APIs? | No. Zero cloud dependencies. Runs 100% locally with SQLite 3. An optional local Small Language Model (SLM) Brain can be attached via Ollama, but is never required. |
What does the optional Brain do? | Provides semantic re-ranking, task classification, and failure diagnosis. Core is always the authority; the Brain is an advisor. |
What privacy guarantees exist? | Zero telemetry. Your code, tokens, memories, and index never leave your machine. Secrets are automatically redacted before indexing. |
What evidence exists that it helps? | Preliminary interactive benchmark observations showed fewer exploratory tool calls (-2 calls per task on turn 1 in tested scenarios). Agent token telemetry was not available, so these results should not be interpreted as a controlled measurement of token savings or universal performance improvement. |
Related MCP server: ContextAtlas
🏛️ Core Architecture
"Store everything useful. Send almost nothing."
The Two-Tier Architecture:
Deterministic Core (The Authority):
AST Indexer: Parses TypeScript/JavaScript into symbols (functions, classes, interfaces, types) in ~20ms.
SQLite 3 + FTS5: Ranked BM25 full-text search across symbols, paths, and memories in < 2ms.
Token Budgeter: Greedy relevance sorting that strictly respects context limits (e.g. 4,000 tokens).
Project Memory: Project-isolated institutional memory (
.centr/centr.db).Global Learning: Evidence-based cross-project knowledge (
~/.centr/learning.db).
Optional Local Brain (The Advisor):
Powered by local Small Language Models (0.5B–7B parameters via Ollama or custom local providers).
Semantic re-ranking, failure analysis, and memory extraction.
Hallucination Guard: The Brain cannot invent files or edit source code; all candidates are bounded by Core retrieval.
Deterministic Fallback: Automatically falls back to Core heuristics if the local SLM is absent, slow, or times out.
🚀 Quick Start
1. Installation
# Global installation
npm install -g @centr-ai/cli
# Or run directly via npx
npx @centr-ai/cli init2. Initialize in Your Repository
cd my-project
# Initialize CentR index (takes ~20-50ms)
centr init
# Check intelligence status
centr status3. Generate Context for an Agent
# Get the smallest useful context for a task
centr context "Add rate limiting to authentication routes"
# Search code symbols and files
centr search "verifyToken"
# Lookup exact symbol details and references
centr symbol "AuthService"🔄 Lifecycle Workflow
🛠️ CLI Command Reference
Command | Description | Example |
| Initialize |
|
| Incrementally re-index changed files via SHA-256 hashes |
|
| Show project health, file counts, and index size |
|
| Multi-source BM25 ranked search across symbols & files |
|
| Generate token-budgeted context for an agent task |
|
| Deep lookup of symbol definition, references & imports |
|
| Manage project-isolated institutional memories |
|
| Manage cross-project evidence-backed learnings |
|
| Register and search reusable development skills |
|
| Comprehensive health, SQLite integrity & environment check |
|
| Run local indexing, search, and context latency SLA checks |
|
| Manage optional local SLM Brain ( |
|
🔌 Model Context Protocol (MCP) Integration
CentR provides a native stdio MCP server (@centr-ai/mcp) supported by Claude Code, OpenAI Codex, and Cursor.
Claude Code Setup
claude mcp add centr -- npx @centr-ai/mcpOr add to your ~/.claude/claude.json:
{
"mcpServers": {
"centr": {
"command": "npx",
"args": ["-y", "@centr-ai/mcp"]
}
}
}Cursor Setup (.cursor/mcp.json)
{
"mcpServers": {
"centr": {
"command": "npx",
"args": ["-y", "@centr-ai/mcp"]
}
}
}Exposed MCP Tools:
get_context: Returns token-budgeted project intelligence for a task.search_code: Ranked full-text search over indexed repository symbols.lookup_symbol: Complete definition, references, and related imports.get_memory&record_memory: Project-isolated memory retrieval and creation.get_learning: Cross-project validated engineering lessons.
🧠 Project Memory vs. Global Learning
CentR maintains a strict boundary between repository-specific facts and reusable engineering wisdom:
Project Memory (docs/MEMORY.md)
Scope: Isolated to the current repository (
.centr/centr.db).Answers: "What happened in this specific project?"
Categories: Architecture patterns, decisions, constraints, discoveries, API contracts, dependencies, workflows, warnings.
Global Learning (docs/LEARNING.md)
Scope: Reusable across all repositories on the machine (
~/.centr/learning.db).Answers: "What should the agent do differently next time?"
Lifecycle:
candidate(0.5 confidence) $\rightarrow$evidence(success/failure logs) $\rightarrow$validated($\ge 0.7$ confidence with $\ge 3$ validations) orrejected.
📊 Real-Agent Benchmark Results
CentR includes an objective, reproducible Agent A/B Benchmark Harness (@centr-ai/benchmark-ab) evaluating 27 real-world coding tasks.
Preliminary Interactive Benchmark Disclosure: The results below represent an interactive benchmark evaluating 7 software engineering tasks across 3 scenarios (21 total runs) using Google Antigravity (Gemini 2.5 Pro) on clean, isolated workspaces.
Agent-level telemetry was not exposed through the Antigravity tool boundary, so token usage and automated tool-call telemetry are not claimed. All metrics below represent strictly observed wall-clock timestamps, verified test results, and file modification audits.
Summary Results (7 Tasks, 21 Verified Runs)
Scenario | Agent | Mode | Avg Duration | Observed Tool Calls | Test Pass Rate | Git Patch Size |
Scenario A (Baseline) | Antigravity | manual | 167,143 ms | 6.0 | 100% (7/7) | +23 lines avg |
Scenario B (CentR V1) | Antigravity | manual | 122,263 ms | 4.0 (-33.3%) | 100% (7/7) | +23 lines avg |
Scenario C (CentR V2) | Antigravity | manual | 122,263 ms | 4.0 (-33.3%) | 100% (7/7) | +23 lines avg |
Key Empirical Findings:
Suppression of Blind Grep Turns: In tested Baseline runs, the agent performed initial exploratory file reads. CentR supplied relevant symbol and file context immediately, eliminating initial exploratory searching in observed runs.
Sub-2ms Core Latency: CentR V1 retrieval added only 1.2 ms to overall task execution.
Zero Cloud Tokens: All runs consumed 0 cloud tokens and incurred $0.00 API costs.
Full methodology and reproduction steps are documented in docs/AGENT-BENCHMARKING.md and benchmarks/agent-ab/reports/latest-report.md.
🔒 Security & Privacy
CentR is built with a zero-trust approach toward telemetry and sensitive files:
Zero Cloud Dependency: Never connects to remote cloud endpoints for core features.
Strict Secret Redaction: Built-in regex filters (
DEFAULT_SECRET_PATTERNS) ignore.env,.pem,.key, AWS keys, tokens, and credentials during indexing.Path Traversal Defense: All file lookups are strictly verified within the project root via
sanitizePath.Parameterized SQL: All database operations use SQLite parameterized placeholders (
?) to prevent SQL injection.Sandboxed Brain: The optional local Brain cannot execute shell commands, edit files directly, or persist ungrounded candidates.
See docs/SECURITY.md for our full security specification.
💻 Hardware Requirements
CentR is engineered for low-end hardware:
Profile | Target Hardware | Recommended SLM | RAM Used |
Core Only (Default) | Any machine running Node.js >= 20 | None (Pure AST + SQLite) | < 30 MB |
Minimal | 4-core CPU, 8 GB RAM |
| ~1.2 GB |
Balanced | 8-core CPU, 16 GB RAM (Apple M-series) |
| ~2.5 GB |
Quality | Dedicated GPU (VRAM >= 8 GB), 32 GB RAM |
| ~5.2 GB |
📚 Detailed Documentation
🤝 Contributing & Community
Contributions are welcome! Please review CONTRIBUTING.md and our CODE_OF_CONDUCT.md before submitting pull requests.
# Setup for development
git clone https://github.com/chiragpgauswami/CentR.git
cd CentR
npm install
npm run build
npm test📄 License
MIT © 2024–2026 CentR Contributors. See LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Project memory, semantic code search, and grounded agent context.
shared AI-context layer for teams — persistent memory your agents search and update over MCP
Your versioned memory across every AI tool — context maps, personal memory, and tasks over MCP.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with a structured, token-efficient map of a codebase's symbols, dependencies, and relationships via MCP tools like overview, query, and impact analysis.8MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to retrieve and manage code context with hybrid search, project memory, and observability via MCP tools.29MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to query a codebase as a knowledge graph, providing token-budgeted context, search, and impact analysis via MCP tools.MIT
- FlicenseNot gradedqualityAmaintenanceProvides a local-first code indexing and search engine for coding agents via MCP, enabling precise codebase queries, symbol lookup, and freshness-aware retrieval.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chiragpgauswami/CentR'
If you have feedback or need assistance with the MCP directory API, please join our Discord server