code-context-engine MCP server
2026년 10월 17일 커밋로컬 우선 방식의 코드 그래프와 폴딩된 증거 패킷을 제공하여, AI 코딩 에이전트가 컨텍스트 토큰 사용량을 줄이면서도 관련 파일을 정확히 식별할 수 있도록 돕습니다.
다른 이름 ParsaVictor/code-context-engine
- 스타
- 5
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 10월 17일
- 라이선스
- MIT
code-context-engine MCP란?
code-context-engine은(는) MCP server입니다. 로컬 우선 방식의 코드 그래프와 폴딩된 증거 패킷을 제공하여, AI 코딩 에이전트가 컨텍스트 토큰 사용량을 줄이면서도 관련 파일을 정확히 식별할 수 있도록 돕습니다.
프로젝트 README에서 생성된 요약
code-context-engine MCP server 정보
Claude Code, Cursor 또는 Zed와 같은 AI 코딩 에이전트를 사용하는 개발자는 이 엔진을 통해 전체 저장소를 모델에 전달하여 과부하를 주는 대신 정밀한 코드 컨텍스트를 제공할 수 있습니다. 이 엔진은 프로젝트별 코드 그래프를 구축하여 특정 작업에 가장 관련성이 높은 파일만 식별하는 로컬 우선 MCP server로 작동합니다. 폴딩된 증거 패킷을 사용하여 함수 시그니처는 제공하되 대규모 코드 본문은 숨김으로써 컨텍스트 토큰을 절약합니다.
이 도구는 표준 웹 코드 외에도 Python notebook, shell script, 데이터셋 및 모델과 같은 머신러닝 아티팩트를 포함한 광범위한 환경을 지원합니다. 또한 YAML, JSON, Hydra 설정과 같은 구성 파일을 해당 매개변수가 적용되는 코드에 직접 매핑합니다. 사용자는 neuromesh CLI로 프로젝트를 인덱싱하고 stdio를 통해 선호하는 MCP client에 연결하여 로컬에 설정할 수 있습니다. 이러한 접근 방식은 긴 코딩 세션 동안 컨텍스트 토큰 사용량과 비용을 줄이는 데 도움이 됩니다.
활용 사례
- 1복잡한 머신러닝 코드베이스 탐색개발자가 에이전트에게 모델, 데이터셋, 학습 루프 간의 관계를 추적하도록 요청할 수 있습니다.
- 2구성 파일과 코드 간의 의존성 해결에이전트가 특정 YAML 또는 JSON 구성 키에 의해 제어되는 코드 매개변수가 무엇인지 식별할 수 있습니다.
- 3문자열 리터럴 기반 검색개발자가 에이전트에게 특정 환경 변수나 API 경로가 정의된 위치를 찾도록 요청할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
구성
CARGO_BUILD_JOBSNM_EXPLAIN
| 이름 | 설명 | 유형 |
|---|---|---|
| CARGO_BUILD_JOBS | — | |
| NM_EXPLAIN | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능parsavictor/code-context-engine is public and reachablegithub.com/parsavictor/code-context-engine ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-17github.com/parsavictor/code-context-engine ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기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 질문
웹 기술 이외의 언어도 지원하나요?
네, tree-sitter 문법과 경량 파서를 사용하여 12개 언어와 shell, PowerShell, notebook을 지원합니다.