code-context-engine MCP sunucusu
Commit 17 Eki 2026AI kodlama ajanlarının bağlam token kullanımını azaltırken ilgili dosyaları tespit etmelerine yardımcı olmak için yerel öncelikli bir kod grafiği ve katlanmış kanıt paketleri sunar.
Ayrıca bilinen adı ParsaVictor/code-context-engine
- Yıldızlar
- 5
- Araçlar
- —
- İndirmeler, 30 gün
- —
- En son sürüm
- —
- Son commit
- 17 Eki 2026
- Lisans
- MIT
code-context-engine MCP nedir?
code-context-engine bir MCP sunucusudur. AI kodlama ajanlarının bağlam token kullanımını azaltırken ilgili dosyaları tespit etmelerine yardımcı olmak için yerel öncelikli bir kod grafiği ve katlanmış kanıt paketleri sunar.
Özet, projenin README dosyasından oluşturuldu
code-context-engine MCP sunucusu hakkında
Claude Code, Cursor veya Zed gibi AI kodlama ajanlarını kullanan geliştiriciler, tüm depolarla modeli boğmak yerine kesin kod bağlamı sağlamak için bu motoru kullanabilirler. Belirli bir görev için yalnızca en alakalı dosyaları belirlemek amacıyla projeye özel bir kod grafiği oluşturan, yerel öncelikli bir MCP server olarak çalışır. Motor, bağlam tokenlarından tasarruf etmek için büyük kod bloklarını gizli tutarken fonksiyon imzalarını sunan katlanmış bir kanıt paketi kullanır.
Bu araç; Python notebookları, shell scriptleri ve veri setleri ile modeller gibi makine öğrenimi varlıkları dahil olmak üzere standart web kodlarının ötesinde geniş bir ortam yelpazesini destekler. Ayrıca YAML, JSON ve Hydra ayarları gibi yapılandırma dosyalarını, parametrelerini belirledikleri kodlarla doğrudan eşleştirir. Kullanıcılar, projelerini neuromesh CLI ile indeksleyerek ve stdio aracılığıyla tercih ettikleri MCP istemcisine bağlayarak yerel olarak kurulum yaparlar. Bu yaklaşım, uzun kodlama oturumları sırasında bağlam token kullanımını ve maliyetleri azaltmaya yardımcı olur.
Neler yapabilirsiniz
- 1Karmaşık makine öğrenimi kod tabanlarında gezinmeBir geliştirici, bir ajandan modeller, veri setleri ve eğitim döngüleri arasındaki ilişkileri izlemesini isteyebilir.
- 2Yapılandırmadan koda bağımlılıkları çözmeBir ajan, hangi kod parametrelerinin belirli YAML veya JSON yapılandırma anahtarları tarafından kontrol edildiğini belirleyebilir.
- 3String sabitlerine göre arama yapmaBir geliştirici, bir ajandan belirli ortam değişkenlerinin veya API rotalarının nerede tanımlandığını bulmasını isteyebilir.
Projenin README dosyasından alınmıştır. Her kullanım durumu, oradaki bir alıntı ile kontrol edilir.
Yapılandırma
CARGO_BUILD_JOBSNM_EXPLAIN
| Ad | Açıklama | Sunucu |
|---|---|---|
| CARGO_BUILD_JOBS | — | |
| NM_EXPLAIN | — |
Otomatik kontroller
Çalıştırıldı 14 Kas 2026Tam rapor →Henüz doğrulanmadı. Bir sunucunun 80 puana, ciddi bir bulgu olmamasına ve kontrol edebilmemiz için yeterli veriye ihtiyacı vardır. Kontroller nasıl çalışır · Daha fazla puan için nelerin düzeltileceği
- Kaynak deposu bağlantılı ve erişilebilirparsavictor/code-context-engine is public and reachablegithub.com/parsavictor/code-context-engine ↗Geçti
- Paket, bu depoyu kaynağı olarak gösteriyorKontrol edilmedi
- Derleme kökeni (Sigstore onayı)Kontrol edilmedi
- Açık kaynak lisansı (OSI)MITspdx.org/licenses/MIT.html ↗Geçti
- Son bir yıl içinde commit veya sürüm mevcutLast commit or release 2026-10-17github.com/parsavictor/code-context-engine ↗Geçti
- OpenSSF ScorecardKontrol edilmedi
- Paket adı popüler bir pakete yakın değilKontrol edilmedi
- Pakette veya bağımlılıklarında kritik uyarı yokKontrol edilmedi
- Modele yönelik gizli talimat yok0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersGeçti
- Yıkıcı araçlar etiketlenmişKontrol edilmedi
- Uzak uç nokta MCP el sıkışmasına yanıt veriyorKontrol edilmedi
code-context-engine
Ship the right code, not the whole repo. A local-first MCP context engine for AI coding agents: a per-project code graph, seed resolution from the task as written, and a folded evidence packet — measured on repositories it was never tuned on.
Cursor · Claude Code · Codex · VS Code · Zed · any MCP client
Why · Measured · Install · How it works · Benchmarks · FAQ · Roadmap · Docs
Why this fork
NeuroMesh is a strong local-first context engine for web codebases. This repository continues it with two goals that the baseline did not meet:
| Goal | Baseline v0.9.0 | This project |
|---|---|---|
| Project isolation — zero cross-project files in a packet | one live graph per process; a mis-detected workspace could contaminate it | deterministic ProjectId, single-project invariant on the live graph, leakage gate in CI (offered upstream) |
| Universal codebases — not only web | no notebooks, no config→code layer, no ML node types | .ipynb, YAML/JSON/argparse/Hydra config→code edges, ML artifact graph (Dataset · Model · Checkpoint · Metric · TrainLoop), shell scripts, string-literal index (routes, tool names, env vars) |
| Honest numbers | one-repo demo table | gold sets on 10 third-party repositories, four of them never tuned on; a model-executed task-success benchmark with a separate judge |
Everything the engine claims is in docs/measured.md, with what is not measured listed next to it.
What is measured
Gold sets are written from reading the source before the engine runs. Recall = the gold files the packet contains; precision = share of packet files that are gold; forbidden = a file the task must not ship.
Repositories the engine was never tuned on (2026-09-21, main):
| Holdout | Languages / stack | Recall | Precision | Forbidden |
|---|---|---|---|---|
| gin + torchvision | Go, Python | 1.000 | 0.700 | 0 |
| libuv + fmt | C, C++ | 1.000 | 0.589 | 0 |
| os-lib + cli + Flux.jl | Scala, R, Julia | 1.000 | 0.589 | 1 |
| peft + keras-hub | Hugging Face / Keras 3 libraries | 1.000 | 0.632 | 0 |
Sets that have been tuned on (dev-class): nanoGPT / express / vit-pytorch / fastapi-template 1.000 / 0.938 · django + ultralytics 1.000 / 0.675 · Hydra + argparse configs 1.000 / 0.767 · Fastify + Next.js app router (30 q) 0.800 / 0.608 · this repository (30 real questions) 0.833 / 0.578.
Task success with a real model (DeepSeek-V4-Pro answering, GLM-5.3 judging against the real source, real verify for patch tasks):
| Set | packet | whole gold files | naive grep |
|---|---|---|---|
| fixtures (26 tasks) | 0.808 · 4.2k tokens | 0.808 · 8.7k tokens | 0.577 |
| gin holdout (10) | 1.000 · 8.1k | 1.000 · 11.1k | 0.800 |
| torchvision holdout (10) | 1.000 · 7.8k | 0.800 · 8.7k | 0.600 |
The packet matches or beats "just open the right files" at 1.4–2.1× the success per token, and beats grep everywhere. Recall is the strength; precision (1–3 neighbour files too many) is the open front — see ROADMAP.md.
Against the baseline it was forked from
Same 112 gold tasks on 15 third-party repositories, same machine, same day (2026-09-21); NeuroMesh v0.9.0 built from the baseline-v0.9.0 tag, this fork from main. Scored per task by file name from each engine's own optimize output — raw results in docs/baseline-vs-fork-2026-09-21.txt, script in scripts/compare-baseline.sh.
| NeuroMesh v0.9.0 (baseline) | this fork | |
|---|---|---|
| gold files found (recall, 112 tasks) | 0.735 | 0.938 |
| share of packet files that were wanted (precision) | 0.206 | 0.633 |
| forbidden files shipped | 12 | 7 |
| Scala / R / Julia repositories | 0.000 recall (not parsed) | 1.000 |
| Hydra + argparse config questions | 0.500–0.750 recall | 1.000 |
| C / C++ (libuv, fmt) | 0.688–0.875 recall | 1.000 |
shell scripts, notebooks, .ps1 |
skipped at index time | indexed |
| cross-project leakage | one live graph per process | ProjectId invariant + CI leakage gate |
Same recall where the baseline already worked (Go, Python, Django, ultralytics); three times the precision everywhere — the baseline ships four to six files for every one that is wanted. The web-stack front (Fastify + Next.js) is the one place both are weak (0.65 recall), which is why it is the current focus.
What this fork adds
| Capability | What it does | Measured by |
|---|---|---|
| Project isolation | deterministic ProjectId, single-project invariant on the live graph, a CI test that indexes two projects sharing a file and asserts zero leakage |
P0 gate in CI |
| Config → code | YAML / JSON / .env keys and argparse flags become nodes; cfg.x, args.x, self.hparams.x become Parameterizes edges; Hydra defaults: composition is an import; a key's named reader takes a seat |
holdout-cfg 1.000 / 0.712 (F55, F71, F72) |
| ML artifact graph | Dataset · Model · Layer · TrainLoop · EvalLoop · Checkpoint · Metric nodes from a PyTorch / Keras overlay; notebooks parsed cell by cell | holdout-ml2 1.000 / 0.632 untuned (F26, F58) |
| String-literal index | quoted names — routes, MCP tool names, event names, env vars, camelCase hooks — resolve to the files that spell them | F75, F78, F80 |
| Twin resolution | same-named definitions settled by directory words, body words and prompt anchors, plural-tolerant; framework-convention stems (route.ts, index, layout) are not "named" |
F64, F70, F80, F82 |
| Noise discipline | guesses never land in docs / tests / fixtures / examples unless asked; alias terms must start a word; acronyms resolve exactly | F61, F73, F75 |
| Deterministic packets | every tie has a total order; the same question gives the same packet | F17, F63, F70 |
| A learning loop that learns the path | positive feedback reinforces only the edges a successful task walked; negative feedback reaches required files | F57, F69 |
| Task-success harness | packet vs whole gold files vs grep with a real model, a separate judge that reads the real source, real verify for patch tasks |
phase C, F76, F77 |
| 12 languages + shell, PowerShell, notebooks | tree-sitter grammars plus light parsers for YAML, JSON, SQL, shell, .ipynb |
F78 |
In a Claude Code session
Same task, same model (Sonnet), claude -p with and without the MCP server, cost from the CLI's own usage report:
| Repository | plain (Read / Grep) | with this engine | context tokens | cost |
|---|---|---|---|---|
| Django, 3,516 files | 8 turns · 233k context tokens · $0.239 | 5 turns · 129k · $0.204 | −45% | −15% |
| fastify/demo, 68 files | 8 turns · 244k · $0.408 | 7 turns · 194k · $0.391 | −20% | −4% |
The system prompt and tool definitions are re-read every turn and dominate small repositories; the engine only shrinks the code-context share. "99% reduction" figures compare a packet with the whole repository, which no agent sends; the numbers above are what a session actually pays.
Install
Pre-built binaries for Linux x86_64, macOS (Apple Silicon) and Windows x86_64 are on the releases page (v1.0.0 is the first).
curl -fsSL https://raw.githubusercontent.com/ParsaVictor/code-context-engine/main/install.sh | sh
irm https://raw.githubusercontent.com/ParsaVictor/code-context-engine/main/install.ps1 | iex
Or from source:
git clone https://github.com/ParsaVictor/code-context-engine
cd code-context-engine
CARGO_BUILD_JOBS=2 cargo build --release -p neuromesh-cli # target/release/neuromesh
Then, from the root of the project you want to index:
neuromesh doctor # binary + workspace check
neuromesh connect --global --agent-rules # write MCP config + agent rule (Cursor, Claude, VS Code, …)
neuromesh index # build the graph (seconds on most repos)
Manual MCP config (any client):
{ "mcpServers": { "neuromesh": { "command": "neuromesh", "args": ["mcp"] } } }
Per-client paths, engines and options: docs/mcp.md · docs/configuration.md.
How it works
task as written ──► seed resolution ──► graph activation ──► selection ──► folded packet
identifiers, files, Calls / Imports / required + signatures kept,
config keys, string Parameterizes / callees + bodies folded,
literals, path words twins, pheromones ranked fill budget-capped
- Index — tree-sitter (and light parsers for YAML/JSON/shell/notebooks) turns every file into nodes and edges; string literals that look like names (
"/api/users","neuromesh_record_feedback",DATABASE_URL) are indexed too. - Seed — the prompt's code names resolve to nodes; twins with the same name are settled by directory and body words; guesses that land in docs/tests/fixtures are dropped.
- Activate & select — energy spreads along typed edges; seeds and the callees the prompt names get required seats; the rest is a ranked, budgeted fill.
- Fold — bodies outside the question are folded to signatures; the agent can expand a fold on demand.
- Learn —
record_feedbackreinforces the path a successful task walked, never a whole neighbourhood.
The MCP agent loop (get_context_packet → search_symbols / expand_gap → expand_fold → trace → record_feedback) is documented in docs/agent-guide.md.
Run the benchmarks
bash scripts/benchmark-holdout.sh # every gold set, one line each (checkouts fetched, graphs cached)
bash scripts/benchmark-holdout.sh holdout-web # one set
NM_EXPLAIN=1 bash scripts/benchmark-holdout.sh dev # + per-task reasons in target/explain-dev.txt
Rules the project holds itself to: holdout sets are never tuned on; ratchets only move up; a mixed result is reverted and recorded, never shipped. Every finding since the fork (F1–F82) is written down with its measurement in docs/planning/stage5-findings.fa.md.
Documentation
| Read this when you want to… | |
|---|---|
| wire an agent to the engine | Agent guide · MCP tools |
| use the CLI | CLI · Configuration · Engines |
| understand the design | Architecture · Isolation |
| check the numbers | Measured · Quality methodology |
| ask the short questions | FAQ |
| follow or join the work | ROADMAP.md · Planning & findings (Persian) · Contributing |
Independent derivative of NeuroMesh by yoosef alipour, MIT. Baseline tag baseline-v0.9.0. See NOTICE and ATTRIBUTION.md. MIT · LICENSE
code-context-engine MCP soruları
Web teknolojileri dışındaki dilleri destekliyor mu?
Evet; tree-sitter gramerleri ve hafif ayrıştırıcılar kullanarak shell, PowerShell ve notebooklar dahil olmak üzere 12 dili destekler.