GitHub Install

NeuroMesh

Physarum routing · live neural mesh
Latest release Rust 1.80+ MCP stdio MIT License

How does nature pack two metres of DNA into a nucleus without deleting a single letter? Not by throwing genes away — by folding. NeuroMesh does the same to your repository: a neural graph in RAM, reversible one-line folds, and an evidence packet instead of three thousand-line files dumped into Cursor or Claude.

Local-first MCP · Cursor · Codex · OpenCode · MiMo CLI · Antigravity · VS Code · Claude · Kilo · Trae · Windsurf · Zed

src/handler.rs — folded skeleton

The pain

You ask a simple question in a large project. The editor copies two or three thousand-line files and ships them to the model.

💸

Tokens you never needed

Dollar cost on every turn — paying for helpers you will never touch.

Seconds of fake loading

While the window fills with unrelated bodies and private utilities.

🌊

Lost in the middle

The model drowns in unrelated code and invents bugs that don't exist.

ApproachWhat goes wrong
Vector RAGChunks smash functions. The shape of the code disappears.
"Just attach the files"The model sees everything and understands nothing.
A static code graphBetter map — then it still pastes full files into the prompt.
NeuroMeshRoute first, then fold. The graph finds the path. The packet is what the model reads.

Don't delete. Fold.

Nature does not delete DNA to fit a nucleus. It supercoils. NeuroMesh treats the syntax tree like a genetic strand in RAM.

🧬

Exons — expressed

Functions you need stay fully visible — real body, real lines.

📦

Introns — folded

Everything else collapses to a one-line reversible marker with a fold ID.

Wake on demand

neuromesh_expand_fold unsplices from memory. No disk grep.

Structure stays. Tokens sleep. Wake a fold when you need it.

Inspired by living systems

🧬

DNA supercoiling

Genetic skeletonizer

Fold unused bodies; keep the map of the file.

🦠

Physarum (slime mold)

Steiner / shortest tissue

Grow the cheapest path between seeds — not the whole neighborhood.

Synapses & STDP

Pheromone edges + record_feedback

Paths you actually edited get stronger next time.

🛡️

Cell membrane

QualityGate

Tight by default; auth / payment tasks open the membrane.

🍄

Mycelium

Hyphal prefetch

Warm the next hop before the second tool call.

🕸️

Neural mesh

Project graph in RAM

Files, functions, Imports, Calls — a nervous system, not a bag of strings.

3D Neural Galaxy

neuromesh monitor is the live mesh: subsystems as a constellation, then the file graph, then the symbols inside a module.

Default URL: http://127.0.0.1:8765 · Port: neuromesh port

How a turn actually goes

Route first, then fold. Seeds are never truncated to fake a small packet.

1
Read
Task as written
2
Route
Graph + Physarum
3
Splice
Fold + packet
💬

Prompt

Read the task exactly as written — intent is not lowercased into mush.

1 of 8 steps

max_savings

0 extra tokens

Tiny, obvious edits

max_quality

16,000 extra tokens

Refactors, auth, critical paths

Smarter every turn

NeuroMesh doesn't forget what worked. Every successful edit is experience — neuromesh_record_feedback strengthens the synapses on the path you actually used. Next packet, the mesh routes faster and closer to gold.

Turn 1 / 3

First visit — the mesh explores weaker paths.

The learning loop
📦
get_context Route on pheromone edges
✏️
Edit & succeed Agent touches real files
record_feedback Spike synapses — STDP learns
🧠
Next packet Stronger path, fewer misses
Synaptic strength 18%
Recall 0.75
Grep fallbacks 2
🧪

Experience from edits

Only paths the agent actually edited get credit. No fake links from guessing — unique resolve keeps the graph honest.

🍄

Mycelial memory

Hyphal prefetch warms the next hop in RAM. The mesh doesn't just learn routes — it pre-warms what you'll expand next.

Fire together, wire together. Skip record_feedback and the next packet starts from zero plasticity.

What we actually measured

Savings are per task, after folding. Re-run: neuromesh eval

Release 2026-08-28 · 554,554 workspace tokens

0
% vs workspace (handle_tool_call)
0
% vs workspace (physarum)
0
Files indexed
0
ms packet activation
TaskModeWS tokSelectedPacketvs WSRecallGrepms
handle_tool_call_intentbalanced554,55463,46215,900 97.1%1.00033
physarum_usagebalanced554,55418,6313,945 99.3%1.00017

Install

One command. Then neuromesh doctor and neuromesh connect.

Terminal
curl -fsSL https://raw.githubusercontent.com/pinoox/neuromesh/main/install.sh | bash
PowerShell
irm https://raw.githubusercontent.com/pinoox/neuromesh/main/install.ps1 | iex
Build from source (rustup 1.80+)
git clone https://github.com/pinoox/neuromesh.git
cd neuromesh
cargo build --release --bin neuromesh
Cargo install
cargo install --git https://github.com/pinoox/neuromesh.git neuromesh-cli --bin neuromesh
After install
neuromesh doctor
neuromesh connect    # write MCP configs for this repo

Connect

Native MCP stdio — Cursor, Claude, Codex, Antigravity, VS Code, Kilo Code, Trae, and more. neuromesh connect writes an absolute binary path so the agent doesn't need NeuroMesh on PATH.

MCP config snippet
{
  "mcpServers": {
    "neuromesh": {
      "command": "neuromesh",
      "args": ["mcp"]
    }
  }
}
Cursor .cursor/mcp.json
VS Code .vscode/mcp.json
OpenCode opencode.json
MiMo CLI .mimo-code.json
Codex .codex/config.toml
Antigravity .agents/mcp_config.json
Kilo Code .kilo/kilo.jsonc
Trae .trae/mcp.json
MiniMax Code .minimax/mcp.json
Claude Code .mcp.json
Claude Desktop
Gemini CLI ~/.gemini/settings.json
Windsurf
Cline / Roo
Zed

Run neuromesh connect to write configs for installed apps, or neuromesh connect --print for snippets.

Tools

Tell the agent: get context → expand fold if needed → trace → record feedback.

neuromesh_get_context
Compact packet: skeletons, why, fold ids, coverage
neuromesh_expand_fold
Wake one intron by fold_id — no disk grep
neuromesh_trace
Call / import chains
neuromesh_search_symbols
Ranked symbol search
neuromesh_get_dependencies
Typed neighbors
neuromesh_analyze_impact
Blast radius analysis
neuromesh_get_architecture
Languages, packages, entry points
neuromesh_record_feedback
Synaptic learning on the path you used
neuromesh_get_project_memory
Facts from manifests and docs
neuromesh_explain_packet
On-demand diagnostics for a packet_id
neuromesh_get_file_skeleton
Fold one file; metadata without body
neuromesh_get_stats
Mesh size and index stats

Rust, TypeScript, Python, Go, Java, Kotlin, PHP, C#, Dart, Swift, Ruby — tree-sitter queries. Framework overlays for Laravel, Django, Next, Nuxt, Spring, Android, and 30+ more.