mesh-mcp
MCP server that gives your AI coding agent a map of your polyglot codebase — reverse dependencies, gRPC tracing, event/topic flows, and doc search, without burning context. Single local Rust binary, no network calls.
Install / Use
claude mcp add VictorAgahi -- npx -y github:VictorAgahi/mesh-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of mesh-mcp
mesh-mcp scores 84/100 on our quality scale, 611th of 938 AI & Machine Learning skills we index.
Its MCP Server is 30 KB long, well organised into 19 sections with 4 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated 16 days ago, so mesh-mcp is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 97/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands (1 minor note below).
- noteInstalls by piping a downloaded script into a shellline 71
curl -fsSL https://raw.githubusercontent.com/VictorAgahi/causalmesh/main/install.sh | bash
Automated pattern scan on 2026-10-29. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
mesh-mcp compared with similar skills
All 4 of these similar skills score higher than mesh-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| mesh-mcp (this skill)by VictorAgahi | 84 | 10 | 16d ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 106.2k | 4d ago | CLAUDE.md |
| claude-memby thedotmack | 100 | 104.6k | today | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 88.9k | 3d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.3k | today | CLAUDE.md |
Frequently asked questions
- How do I install mesh-mcp?
- Run
claude mcp add VictorAgahi -- npx -y github:VictorAgahi/mesh-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does mesh-mcp work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is mesh-mcp safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands (1 minor note below). It is Apache-2.0-licensed and scores 97/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is mesh-mcp still maintained?
- The repository was last updated 16 days ago, so mesh-mcp is actively maintained.
Skill content
View source on GitHubMeshMCP
MeshMCP is a local Model Context Protocol server, written in
Rust, that indexes a multi-language, multi-service codebase and answers structural questions for
an AI coding agent: where a symbol is declared, who depends on a contract, which services
implement and call a gRPC method, who produces and consumes an event, and what the team's own
documentation says. It runs on the developer's machine, reads only the directories it is
configured with, and its runtime binaries (mesh-mcp, meshd) contain no network client code; only the installer downloads anything.
The problem
A coding agent explores a repository the way a newcomer does: it greps, opens files one at a
time, and infers relationships from names. In a single-language repository this works. In a
workspace where a .proto contract is implemented in Go, called from TypeScript and Java, and
followed by Kafka events consumed in Python, the relationships the agent needs are spread across
files it has no reason to open. The usual results are missed callers, changes that break a
consumer in another service, and a context window filled with function bodies that were only
read to find a signature.
MeshMCP builds that cross-service map once, keeps it in memory, updates it as files change, and exposes it through six MCP tools.
What it is for, and what it is not
Fits
- Cross-repository questions in a polyglot workspace: who imports this package, which services implement and call this RPC, who produces and consumes this event, what a route handler touches.
- Checking a change before making it: the blast radius of a contract, and whether an edit to a
.protobreaks the wire format against a Git base. - Reading less: declarations come back with function bodies stripped, ranked and paginated.
- Looking up the team's own ADRs and Markdown docs from the same server.
Does not do
- It is not a language server. There is no type inference and no intra-language call graph: it records declarations, imports and the contract idioms listed in docs/parser-support.md.
- It does not see what is built at runtime: a topic name read from a registry or config, a route assembled from variables, reflection, generated code outside the workspace. These show up as "not statically resolved", not as a fact.
- HTTP client calls (
fetch,axios,HttpService) are not linked to the routes they hit. - It does not link tests to the code they cover, and no MCP tool writes to your files (only the
initandinstall-hookscommands do).
The six tools
| Tool | Answers |
| :--- | :--- |
| smart_search | Where is a symbol or an HTTP route (PATCH /events/:id/state) declared? Returns signatures with bodies stripped, ranked and paginated. |
| find_dependents | Who imports or depends on this type, package or contract? One row per declaration, file or dependent package. |
| analyze_grpc | Where is this RPC defined, implemented and called? Also checks the .proto for wire-format breaking changes against a Git base. |
| analyze_impact | What is affected if this RPC, service, topic, event or HTTP route handler changes? One table row per impacted element, marked INTERNAL/EXTERNAL with edge confidence; depth follows re-emissions across hops. |
| search_docs | What do our Markdown docs, ADRs and RFCs say about this term? |
| visualize_mesh | Per-service topology as Mermaid, JSON or HTML, bounded in size, with zoom (a zoom also lists the service's HTTP routes in Mermaid). |
Arguments, output formats and error handling: docs/mcp-tools.md.
Installation
Prebuilt binaries (recommended). install.sh downloads the rolling latest build of main for macOS
(arm64, x86-64), Linux x86-64 and Windows x86-64, and falls back to cargo install elsewhere:
curl -fsSL https://raw.githubusercontent.com/VictorAgahi/causalmesh/main/install.sh | bash
Connect an agent:
claude mcp add mesh-mcp -- mesh-mcp run # Claude Code
mesh-mcp doctor # config, roots, parsers, daemon, cache, index health
Pilot install from a checkout (macOS or Linux, x86-64 or arm64; builds locally, downloads nothing, idempotent):
git clone https://github.com/VictorAgahi/causalmesh.git
cd /path/to/your/workspace
/path/to/causalmesh/scripts/install_pilot.sh # cargo build --release, then init after confirmation
It copies mesh-mcp and meshd into ~/.local/bin, runs
mesh-mcp init --auto --write-ide-config (keeps an existing config, merges .mcp.json,
.cursor/mcp.json and .vscode/mcp.json without removing other servers) and checks the result with
mesh-mcp doctor --json. Building needs Rust 1.90 or newer (rust-version in Cargo.toml) and a C compiler.
The full walkthrough, including configuration of roots, docs vocabulary, custom patterns, skills
and stop rules, is in SETUP.md. A five-language example workspace is in
examples/polyglot-shop.
CLI
| Command | Purpose |
| :--- | :--- |
| mesh-mcp run [--standalone] | MCP server on stdio (daemon-backed by default). Refuses to scan /, a drive root or your home directory when no config file is found. |
| mesh-mcp init --auto [--write-ide-config] [--force] | Generate .agents/mesh-mcp.toml from the directory layout (an existing one is kept unless --force); optionally write Claude Code / Cursor / VS Code MCP entries and a managed MeshMCP routing section in CLAUDE.md / AGENTS.md. |
| mesh-mcp agent-guide | Print the setup guide for an AI agent installing MeshMCP for you (Markdown). |
| mesh-mcp doctor [--fix] [--json] | Diagnose configuration (including custom patterns), index health, socket, daemon version and the config it serves, cache and sandbox; --fix repairs what is safe to repair (never the audit log). |
| mesh-mcp graph [--format html\|mermaid\|json\|fingerprint] [--open] | Render the full topology, or print a content fingerprint of the index. |
| mesh-mcp stats [--since 7d\|24h\|all] [--session ID] [--db PATH] [--json] | Local audit summary: calls per tool and per agent session, isError rate, p50/p95 latency per tool, cache hit rate, meshd restarts. MESH_AUDIT_DB moves the audit database. |
| mesh-mcp install-hooks | Install the Git pre-commit hook. |
-c, --config <path> is accepted by every command. Logs go to stderr. Under mesh-mcp run, stdout carries only JSON-RPC frames.
How it works
flowchart TD
subgraph Inputs["1. Workspace Roots & Watcher"]
Config["roots in mesh-mcp.toml"]
Watcher["File Watcher<br/>(changed files only, held during Git ops)"]
end
subgraph Pipeline["2. Indexing Pipeline"]
Crawl["Crawler<br/>(gitignore-aware, no symlink following)"]
Guard{"AstGuard Limits<br/>(size, binary, line-length, nesting)"}
Rejected["Rejected Files List<br/>(surfaced in doctor & tools, never dropped silently)"]
Parse["Tree-sitter Parse & Extractors<br/>(parallel Rayon workers)"]
Cache[("SQLite Parse Cache<br/>(persistent per-workspace cache)")]
Reconcile["Fold & Reconcile Edges<br/>(Imports, Implements, CallsRpc, Produces, Consumes)"]
end
subgraph State["3. In-Memory State"]
Snapshot[("Immutable MeshSnapshot<br/>(atomically swapped in memory)")]
end
subgraph Serving["4. Query Serving"]
Server["MCP Server / meshd Daemon<br/>(stdio JSON-RPC)"]
Agent["AI Coding Agent<br/>(Claude Code, Cursor, etc.)"]
Answers["Markdown Responses<br/>(strictly capped at 48 KB)"]
end
Config --> Crawl
Watcher -.->|"incremental updates"| Crawl
Crawl --> Guard
Guard -->|"within limits"| Parse
Guard -.->|"exceeds limits"| Rejected
Parse <--> Cache
Parse --> Reconcile
Reconcile -->|"atomically swap"| Snapshot
Snapshot --> Server
Agent <-->|"JSON-RPC queries"| Server
Server --> Answers
- Daemon mode (default).
mesh-mcp runis a thin stdio proxy to a per-workspacemeshdprocess (Unix socket on macOS/Linux, named pipe on Windows), so several editor windows on the same repository share one index.meshdis started on demand and exits after 30 idle minutes.mesh-mcp run --standalonekeeps everything in one process (containers, CI). - The daemon follows its config. Edit
mesh-mcp.tomlandmeshdapplies it without a restart, at the cost of what changed: display-only keys swap over the running index, a changed custom pattern re-extracts only the files it applies to, anything else rebuilds the index from the parse cache. The old state keeps serving until the new one is ready (SETUP.md). - Persistent parse cache. One SQLite file per workspace under
~/.cache/mesh-mcp/workspaces/, with a size quota and LRU eviction, so a restart or a branch switch back to known content does not re-parse it. - Details: docs/architecture.md.
Languages and what is extracted
Verified against crates/mesh-parsers/src/languages/ at the time of writing: this lists what the extractors recognise, not how accurate they are on your code. Depth per language, with what each one does not get: docs/parser-support.md. "Declarations" means
classes, interfaces, functions/methods and similar symbols usable by smart_search.
| Language | Declarations | Imports (find_dependents) | gRPC | Events / messaging | HTTP endpoints |
| :--- | :---: | :---: | :--- | :--- | :--- |
| Java | yes | yes | *ImplBase servers, @GrpcService, newBlockingStub/newStub/newFutureStub clients | @KafkaListener, KafkaTemplate | Spring MVC / JAX-RS annotations |
| Go | yes | yes | Register*Server, New*Client | kafka-go, sarama, confluent-kafka-go | chi / gin / echo-style route calls |
| Python | yes | yes | *Servicer servers, *_pb2_grpc.*Stub(...) clients | confluent_kafka, aiokafka, Celery | Flask / FastAPI routes (path and method) |
| TypeScript / JavaScript (.ts, .mts, .cts, .tsx, .js, .jsx, .mjs, .cjs; script blocks of .vue, .svelte, .astro) | yes; CommonJS require and dynamic import() count as imports, tsconfig/jsconfig paths and package.json imports aliases are resolved | yes | NestJS @GrpcMethod, getService<...>() and the method calls on the client it returns (this.users.signUp(…)), imported new XClient(...) (ts-proto, @grpc/grpc-js) | Rule table gated on the file's imports and on the client it built: Kafka family (kafkajs, node-rdkafka, ...), Redis (pub/sub, streams, list queues), NATS, MQTT, RabbitMQ, BullMQ / Bull, SQS / SNS, Kinesis, EventBridge, Google Pub/Sub, Pulsar, Azure Service Bus, STOMP, NestJS microservices (@EventPattern, @MessagePattern, client.emit) | Express, Fastify, Koa, Hono, Elysia, h3, restify, polka, itty-router, hapi; NestJS, routing-controllers, tsoa, inversify controllers; file-system routers (Next.js, Remix / React Router, SvelteKit, Nuxt / Nitro, Astro); tRPC procedures and GraphQL operations |
| Rust | yes | yes | tonic service implementations (servers only) | rdkafka | axum route, actix-web attribute macros |
| C++ | yes | yes (quoted #include) | servers deriving ::grpc::Service | — | — |
| Kotlin | yes | — | @GrpcService classes tagged; no clients | @KafkaListener, kafka-clients subscribe/send | Spring annotations |
| C# | yes | — | — | Confluent.Kafka producers/consumers (string-literal topics) | ASP.NET attributes ([HttpGet]) |
| Ruby, PHP, Swift, Scala | yes | — | — | — | Rails routes, Symfony / Laravel, Vapor, Akka HTTP (one idiom each) |
| Protobuf | services, methods, messages | import | contract source of truth | — | — |
| OpenA
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
106.2kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
claude-mem
104.6kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Understand-Anything
88.9kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
78.3kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
