cpp-coro-graph
Provides tools to index and analyze Linux kernel source code, extracting coroutine and device-domain graphs with query and visualization capabilities.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cpp-coro-graphWho calls OnSos?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
cpp-coro-graph (V1)
Syntax-level C++17 coroutine + device-domain graph.
Primary target: Linux. Stdlib-only Python 3.9+ (no pip deps required to run).
What V1 can do:
All functions as nodes: definitions
{...}and declarationsFoo();/= default/= delete(headers included)Class/struct members qualified as
Class::Method(incl. ctor/dtor)Find
exec::task<…> Name/ functions withco_await/co_returnDraw
awaitedges fromco_await Foo(…)plus normalcallsMember pipeline:
co_await m.Init()insideSosModel::Callresolves toSosModel::Init(enclosing class + localSosModel m)Tag device domains (
cpu/gpu/npu/dsp) viarules/devices.jsonSQLite DB + HTML visualization + CLI (
query/callers/callees/explore) + MCP
What V1 cannot do:
Template / macro / overload resolution (needs compile_commands later)
Cross-thread resume / true parallel edges from time
Perfect C++ parsing (regex + brace matching, not a compiler)
Install on Linux
git clone https://github.com/ArcherLin13/cpp-coro-graph.git
cd cpp-coro-graph
# option A — no install (recommended for a quick try)
chmod +x scripts/cpp-coro-graph scripts/index_repo.sh
./scripts/cpp-coro-graph index /path/to/your/repo
# option B — install CLI on PATH
python3 -m pip install -e .
cpp-coro-graph index /path/to/your/repoRequires only python3 (3.9+). Uses the stdlib sqlite3 module.
Related MCP server: cpp-semantic-graph
Index your Linux code tree
# one-shot: index + HTML + status
./scripts/index_repo.sh /path/to/your/linux/repo
# or step by step
python3 -m cpp_coro_graph index /path/to/your/linux/repo
python3 -m cpp_coro_graph viz --db /path/to/your/linux/repo/.cpp-coro-graph/graph.db
python3 -m cpp_coro_graph status --db /path/to/your/linux/repo/.cpp-coro-graph/graph.dbOutputs:
/path/to/your/linux/repo/.cpp-coro-graph/graph.db/path/to/your/linux/repo/.cpp-coro-graph/graph.html(open in a browser)
Run the tool on the Linux machine (or WSL2 Linux filesystem) that holds the sources. Avoid indexing via /mnt/c/... from WSL.
Smoke test:
./scripts/cpp-coro-graph index fixtures/sample --db fixtures/sample/.cpp-coro-graph/graph.db
./scripts/cpp-coro-graph viz --db fixtures/sample/.cpp-coro-graph/graph.dbViz (module trunk, not full universe)
Default HTML is module → entries → await trunk → double-click expand:
# recommended: one module’s entries + main await flow
python3 -u -m cpp_coro_graph -q viz --db "$DB" --module path/to/module --depth 1
# pin one entry
python3 -u -m cpp_coro_graph -q viz --db "$DB" --around Call --depth 1
# legacy full graph (avoid on large trees)
python3 -u -m cpp_coro_graph -q viz --db "$DB" --fullIn the browser: pick a module, click an entry chip, double-click a node to expand the next await layer. Toggle calls if needed. File/contains edges are not shown in this mode.
Query the graph (codegraph-style)
Large graphs (10k+ nodes) — prefer these over HTML:
DB=/path/to/repo/.cpp-coro-graph/graph.db
# search symbols
python3 -u -m cpp_coro_graph -q query OnSos --db "$DB"
# who calls / awaits this
python3 -u -m cpp_coro_graph -q callers OnSos --db "$DB"
# what it calls / awaits / spawns
python3 -u -m cpp_coro_graph -q callees OnSos --db "$DB" --edge-kind calls,await,spawns
# neighborhood BFS
python3 -u -m cpp_coro_graph -q explore OnSos --depth 2 --db "$DB"
# incoming blast radius
python3 -u -m cpp_coro_graph -q impact OnSos --depth 2 --db "$DB"
# JSON for scripting
python3 -u -m cpp_coro_graph -q callers OnSos --db "$DB" --jsonIf you cd into the indexed repo, --db can be omitted (searches upward for .cpp-coro-graph/graph.db).
Cursor MCP (optional)
{
"mcpServers": {
"cpp-coro-graph": {
"command": "python3",
"args": [
"-m", "cpp_coro_graph", "mcp",
"--db", "/path/to/your/linux/repo/.cpp-coro-graph/graph.db"
],
"cwd": "/path/to/cpp-coro-graph"
}
}
}Tools: coro_explore, coro_stats.
Custom device rules
Edit rules/devices.json or pass --rules your.json:
{
"patterns": [
{"match": "RunOnNpu", "domain": "npu", "backend": "custom"},
{"match": "clEnqueue", "domain": "gpu", "backend": "opencl"}
]
}First match wins. Put longer / more specific strings first.
Edge kinds (only four)
kind | viz | meaning |
| solid | direct / sync call (incl. thread helpers) |
| dashed |
|
| gray | file owns function/class |
| green dashed |
|
callers / callees default to control = calls+await only (not file/inheritance), so the two directions stay distinct.
python3 -u -m cpp_coro_graph -q callees Call --db "$DB" # await+calls
python3 -u -m cpp_coro_graph -q callers Init --db "$DB"
python3 -u -m cpp_coro_graph -q explore SosModel --edge-kind inherits,contains --db "$DB"Skipped directories
.git, build, out, third_party, node_modules, .codegraph, bazel-*, .repo, prebuilts, …
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceProvides a local code knowledge graph for Java projects, enabling querying of classes, methods, fields, calls, inheritance, and imports via MCP tools like query, context, impact, and cypher.1
- FlicenseNot gradedqualityBmaintenanceBuilds a semantic knowledge graph of C++ code and exposes 9 MCP tools for AI assistants to search classes, functions, inheritance, callers, callees, overrides, and more.3
- AlicenseNot gradedqualityBmaintenanceExposes code graphs across multi-program repositories via MCP, enabling humans and agents to query the fleet with evidence.MIT
- FlicenseNot gradedqualityAmaintenanceCodeGraph MCP is a powerful standalone tool that parses your entire C/C++ codebase into a semantic knowledge graph and seamlessly exposes it to AI coding assistants via the Model Context Protocol (MCP). By providing AI (like Claude Desktop, Cursor, or Google Antigravity) with a structural map of your project—including caller/callee relationships, file dependencies, and dynamic function definition
Related MCP Connectors
MCP server for static security analysis of Android source code
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Fleet discovery for the cyanheads MCP ecosystem — semantic search + install snippets.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ArcherLin13/cpp-coro-graph'
If you have feedback or need assistance with the MCP directory API, please join our Discord server