codegraph-mcp-server
PyPI
v0.8.0
Published by nahisaho — no publish provenance, so origin is unverified, but the source is public: the repository link below is self-declared yet readable, so you can inspect the code before adopting it.
MCP Server for code graph analysis with GraphRAG capabilities
The grade answers one question — how safe is this server for you to adopt — so it is computed in two auditable stages. Nothing below is an opinion or an LLM's guess; every line is a real term the deterministic engine applied, and the same input always yields the same number.
1. Threat score — 100 − 0 = 100. What the published surface and source actually contain:
The deterministic scan raised no scored threat in the surface it inspected — the threat score stayed at 100. Capability observations and advisory notes are recorded but never lower it.
2. Client adoption risk — 100 − 7 = 93. Three small, subtract-only factors that reflect your risk in adopting it — a clean scan proves less on a powerful, unverified or barely-inspectable package, so the grade says so plainly:
| Points | Adoption-risk factor |
|---|---|
| −6 | capability blast radius (high) — client exposure if the model is manipulated |
| −1 | publisher verification (public source) — no provenance, but the source is public and inspectable |
Capability observations and info notes are shown under Findings but never scored.
Open any row's finding below for the file, line and evidence behind a deduction.
Tools that read sensitive data ([read_file_content]) and tools that can send data out ([execute_shell_command]) are exposed together. An agent can move private data to the sink.
Evidence: sources [read_file_content] → sinks [execute_shell_command]
Fix: Keep secret-reading and egress capabilities on separate, separately-approved servers.
Location: flow read_file_content → execute_shell_command
Tool "execute_shell_command" appears to run shell commands or evaluate code (keyword "execute shell" in tool name, parameter "command"). Arbitrary execution driven by model input is one of the most dangerous MCP capabilities; combined with any untrusted input it becomes RCE.
Fix: Sandbox execution, allowlist commands/arguments, and never pass model output to a shell unescaped.
Location: tool execute_shell_command
In the server's implementation (`src/codegraph_mcp/__main__.py:263`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: log: process = subprocess.Popen( cmd, stdout=log, stderr=subprocess.STDOUT,
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server src/codegraph_mcp/__main__.py
Tool "execute_shell_command" takes a command-shaped parameter "command" with no enum/pattern constraint. Free-form, model- or attacker-controlled arguments reaching a shell is the command-injection precondition.
Fix: Constrain the parameter (enum/pattern), or build the command from a fixed template with escaped args.
Location: tool execute_shell_command · inputSchema.properties.command
Tool "execute_shell_command" can mutate/egress but declares no destructiveHint. Clients that don't default to spec-safe behavior may not prompt before running it.
Fix: Declare accurate annotations, and gate destructive tools on user confirmation regardless.
Location: tool execute_shell_command
Tool "read_file_content" takes a path parameter "file_path" with no constraint. Without a canonicalize-and-contain check (not visible statically), this permits ../ traversal outside the intended root.
Fix: Resolve and verify the path stays within an allowed root; reject traversal sequences.
Location: tool read_file_content · inputSchema.properties.file_path
In a packaging/dev/install script (shipped, but not the server runtime) (`tests/conftest.py:34`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: import subprocess subprocess.run( ["git", "init"], cwd=temp_dir, capture_output=True,
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server tests/conftest.py
In a packaging/dev/install script (shipped, but not the server runtime) (`tests/e2e/test_scenarios.py:158`): Spawning a shell/process is command-execution capability; with unsanitized tool input it is command injection / RCE. This is read from the code itself — not from the tool description — so a poisoned server cannot hide it behind honest-looking metadata.
Evidence: ) # Git commit subprocess.run(["git", "add", "."], check=False, cwd=repo_path, capture_output=True) subproc
Fix: Review this call path: confirm it never receives unsanitized tool input, constrain it, or remove it. Treat a server whose code reaches these sinks as high-capability regardless of what its tools claim.
Location: server tests/e2e/test_scenarios.py
Each tool and what it can reach — statically extracted from the published source.
execute_shell_commandruns code / shellread_file_contentreads sensitive dataanalyze_module_structureno sensitive capabilityfind_calleesno sensitive capabilityfind_callersno sensitive capabilityfind_dependenciesno sensitive capabilityfind_implementationsno sensitive capabilityget_code_snippetno sensitive capabilityget_file_structureno sensitive capabilityglobal_searchno sensitive capabilitylocal_searchno sensitive capabilityquery_codebaseno sensitive capabilityreindex_repositoryno sensitive capabilitysuggest_refactoringno sensitive capabilityCross-tool combinations that form a data-exfiltration primitive (untrusted input → sensitive source → external sink).
Scan history per published version. The engine is deterministic — the same version always yields the same score, so a changed score means the package itself changed.
| Version | Score | Findings | Engine | Scanned |
|---|---|---|---|---|
v0.8.0 latest |
A 93/100 | 8 | 1.13.0 | 2026-08-25 |
Show this server's live Trust Score in your README, docs or website. The badge is served straight from the registry and updates automatically after every rescan — no API key needed. It links back to this page, so anyone who sees the grade can also read the findings behind it instead of taking a number on faith.
The score above is reproducible: the same package version always yields the same result. Run it locally or over the free API — no account, no LLM, fully deterministic.
npx mcptrustchecker scan codegraph-mcp-server --online --registry pypi
Independent packages implementing the same tool, scanned with the same engine. Compare all 5 side by side →
Local-first code intelligence for AI agents (MCP). Self-contained — bundles its own runtime.
Local code graph CLI — parse codebases with tree-sitter, build dependency graphs, query them
CodeGraph MCP server — cross-language code intelligence with 42 tools, 38 languages
MCP server for graph representation of a codebase
Hotel booking MCP server — 300K+ properties, real confirmation numbers, loyalty programs. Builders monetize every booking via Stripe Connect. The first MCP server that completes real hotel reservations inside AI conversations.
Manage AdGuard Home through AI assistants
Read-only Azure DevOps for MCP clients using only your existing browser session — no PAT, no Azure CLI. Browse work items, pull requests, comments, attachments and Artifacts feeds across every project, repo and feed you can access.
MCP server for Adobe Experience Manager Assets integration development
Servidor MCP para el tiempo oficial de España (API pública OpenData de AEMET). Predicción, observación y avisos como herramientas MCP tipadas.
A standalone MCP stdio bridge for Affinity by Canva's local MCP SSE server.