English | Turkce
🧠 The Neural Backbone for Autonomous AI Agents
Bridge the gap between your codebase and your AI editor. CCM transforms static source code into a dynamic, queryable Knowledge Graph, enabling AI agents to navigate, understand, and reason about your project with surgical precision.
Modern AI coding assistants (Claude, Cursor, Windsurf) are powerful but suffer from blindness:
| Problem | Impact |
|---|---|
| Context Limits | Can't "see" your entire 100,000-line project |
| Hallucination | Guesses dependencies without structure |
| Lost Context | Vector search finds similar words, not connected logic |
CCM turns your AI from a text predictor into a Senior Architect.
Unlike tools that dump raw code, CCM injects AI-Optimized Context:
- Logical Reasoning - Explains why code was retrieved
- Relational Edges - Maps how files talk to each other
- Confidence Scores - Shows certainty in results
- Two-Pass Indexing - Links function definitions to call sites
- Deep Traversal - Ask "Who calls this?" and get accurate answers
- Rust-Powered - Blazing fast indexing and queries
- Batch Embedding - Thousands of lines in seconds
- LanceDB - Millisecond-latency vector storage
- Tree-sitter - Robust AST for Rust, Python, TypeScript, Go, Java, Kotlin, C#
- Binary Checksums - Release artifacts include
checksums.txtfor integrity - MCP Allowlist - Restrict project access with
CCM_ALLOWED_ROOTS - Safe Defaults - Configurable timeouts and file-size limits
- Plug & Play - Installer configures Codex, Cursor, Claude Desktop, and Antigravity
- Lazy Indexing - Auto-indexes on first query
- Zero-Config - Auto-detects project root
# 1. Configure MCP for your AI editor
npx @senoldogann/context-manager install
# 2. Index your project
npx @senoldogann/context-manager index --path .After installation, verify the happy path with a clean smoke test:
# Check that the CLI responds
npx @senoldogann/context-manager query --text "src/main.rs:1"
# Start the MCP server directly
npx @senoldogann/context-manager mcpExpected outcomes:
- The wrapper downloads the correct binary for your OS and architecture
indexcreatesdata/ccm_dbinside the projectmcpstarts without JSON-RPC parse errors and waits on stdio
| Host | Status | Installation Path |
|---|---|---|
| Codex | Supported | codex mcp add ... via installer |
| Cursor | Supported | ~/.cursor/mcp.json |
| Claude Desktop | Supported | Native desktop config |
| Antigravity | Supported | Native host config |
If your editor is not auto-detected, use the manual MCP config printed by the installer.
CCM ships a SKILL.md that AI agents (Claude Code, Copilot, Codex, Cursor) can load to understand all 9 MCP tools, node_id format, recommended flow, and common pitfalls — with zero guesswork.
Copy it into your agent's skill directory and it becomes a first-class tool reference:
# Install to your local agents skill directory
cp SKILL.md ~/.agents/skills/context-manager/SKILL.md# If local source builds fail, install protoc first.
# macOS: brew install protobuf
git clone https://github.com/senoldogann/LLM-Context-Manager.git
cd LLM-Context-Manager
cargo build --release
# Binary location: target/release/ccm-cliCreate ~/.ccm/.env (or start from the repository's .env.example):
# Option A: Local (Recommended - Privacy)
EMBEDDING_PROVIDER=ollama
EMBEDDING_HOST=http://127.0.0.1:11434
EMBEDDING_MODEL=mxbai-embed-large
# No API key is required for local Ollama.
# Option B: Cloud (OpenAI)
EMBEDDING_PROVIDER=openai
EMBEDDING_API_KEY=sk-your-key
EMBEDDING_MODEL=text-embedding-3-small
# Networking & Limits
EMBEDDING_TIMEOUT_SECS=30
CCM_MAX_FILE_BYTES=2097152
# MCP Security
CCM_ALLOWED_ROOTS=/Users/you/projects:/Users/you/sandbox
CCM_REQUIRE_ALLOWED_ROOTS=0
# MCP Runtime
CCM_MCP_ENGINE_CACHE_SIZE=8
CCM_MCP_DEBUG=0
# Optional: disable embeddings entirely (semantic search disabled)
CCM_DISABLE_EMBEDDER=0
# Optional: embed data files (md/json/yaml) into vector search
CCM_EMBED_DATA_FILES=0
# npm wrapper security (0 = enforce checksum, 1 = bypass)
CCM_ALLOW_UNVERIFIED_BINARIES=0Advanced overrides:
CCM_PROJECT_ROOTpins the default project root used by the npm wrapper and MCP fallback engine.CCM_DB_PATHoverrides the default MCP vector DB location..env.examplecontains the full advanced tuning surface for chunking, batch size, hybrid ranking weights, and compatibility aliases such asOPENAI_API_KEY,CCM_SKIP_CHECKSUM,CCM_MCP_REQUIRE_ALLOWED_ROOTS,CCM_EMBED_DATA, andEMBEDDING_DISABLED.- Hybrid weight tuning details live in
docs/hybrid-ranking.md.
Note: Requires Ollama running (ollama serve) with model pulled (ollama pull mxbai-embed-large).
Production Tip: Set CCM_ALLOWED_ROOTS and enable CCM_REQUIRE_ALLOWED_ROOTS=1 to prevent unintended project access.
# Index a project
ccm-cli index --path .
# Search semantically
ccm-cli query --text "authentication logic"
# Cursor prediction (file:line format)
ccm-cli query --text "src/main.rs:50"
# Watch mode - auto-reindex
ccm-cli index --path . --watch
# Evaluate retrieval quality
ccm-cli eval --tasks eval/golden_tasks.json| Tool | Purpose | Example |
|---|---|---|
search_code |
Hybrid semantic + graph search | "Find auth handling" |
get_context |
Cursor-based retrieval | Context at file:line |
find_nodes |
Find nodes by name or path | "find_nodes query=UserService" |
read_graph |
Inspect a specific node by ID | Node details + graph connections |
index_project |
Refresh the project index | Incremental re-index |
find_usages |
Find all callers of a node | "Who calls this function?" |
trace_call_chain |
BFS call chain between two nodes | from_id → to_id path |
impact_of_change |
Blast radius of a file change | Dependents across codebase |
diff_context |
Recently changed code via git | Last N days of changes |
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ AI Agent │────▶│ MCP Server │────▶│ Core Engine │
│ (Claude) │◀────│ (ccm-mcp) │◀────│ (Rust) │
└─────────────┘ └─────────────┘ └─────────────┘
│
┌────────────────────────────┼────────────────────────────┐
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Code Graph │ │ Vector DB │ │ Parser │
│ (Petgraph) │ │ (LanceDB) │ │(Tree-sitter)│
└─────────────┘ └─────────────┘ └─────────────┘
| Language | Extensions | Analysis |
|---|---|---|
| Rust | .rs |
Full AST |
| Python | .py |
Full AST |
| TypeScript | .ts, .tsx |
Full AST |
| JavaScript | .js, .jsx |
Full AST |
| Go | .go |
Full AST |
| Java | .java |
Full AST |
| Kotlin | .kt, .kts |
Full AST |
| C# | .cs |
Full AST |
| Config/Data | .md, .json, .yaml |
Full File |
CCM includes a golden task evaluation framework:
# Run evaluation
ccm-cli eval --tasks eval/golden_tasks.v3.ccm.json
# Compare structural vs hybrid scoring
ccm-cli eval --tasks eval/golden_tasks.json --compareIf the evaluation index is missing, CCM bootstraps it automatically before scoring.
Semantic search_code tasks still require a configured embedder.
Latest Recorded Results: See the checked-in reports under eval/.
CCM release builds are designed to be reproducible and install-safe:
- GitHub Releases publish platform binaries and
checksums.txt - The npm wrapper verifies downloaded binaries before first use
- MCP transport now enforces request size limits and redacts sensitive debug payloads
- The release workflow builds Linux, macOS, and Windows artifacts before attaching release assets
- npm publication is a separate manual step from
npm/after the GitHub Release assets are attached - The README quick-start now matches the same smoke path we use for first-install checks
For local source builds, cargo build --release still requires protoc to be installed on your machine.
- Run
ccm-cli index --path .first - If you override it, check
CCM_PROJECT_ROOTmatches the indexed directory - Ensure Ollama is running
- First run downloads embedding model (~1.5GB)
- Subsequent runs are fast (incremental)
- Ensure the GitHub Release includes
checksums.txt - Re-run the install once
- As a last resort, set
CCM_ALLOW_UNVERIFIED_BINARIES=1to bypass verification
- Set
CCM_ALLOWED_ROOTSto include the project root - Or disable strict mode with
CCM_REQUIRE_ALLOWED_ROOTS=0
- Increase
CCM_MAX_FILE_BYTESif you need larger text files indexed
- By default, data files (
.md,.json,.yaml) are indexed but not embedded. - Enable
CCM_EMBED_DATA_FILES=1to include them in semantic search.
- NPM Package: @senoldogann/context-manager
- Turkish README: README.tr.md
- Getting Started: GETTING_STARTED.md
- Environment Example: .env.example
- Hybrid Ranking Notes: docs/hybrid-ranking.md
- Contributing: CONTRIBUTING.md
MIT License - Open source and free to use.
