Skip to main content
Glama
yesheng-oss

Context-MCP

by yesheng-oss

Persistent memory and codebase knowledge graph for AI coding assistants — delivered as a single MCP server.

One shared context store across Claude Code, VS Code Copilot, Google Antigravity (2.0 / IDE / CLI), Codex CLI, Hermes Agent, Claude.ai, and ChatGPT. Save context from one AI, pick it up in another.


The Problem

Every conversation with an AI assistant starts from zero. The AI re-reads files it already read yesterday, re-discovers architecture it already understood, re-derives decisions that were already made. You repeat context. You paste the same background.

This gets worse as projects grow — reading 20 files to answer "what calls this function?" burns thousands of tokens every time.


Related MCP server: hive-memory

What It Solves

  • Persistent memory — decisions, bugs, notes, and config saved across sessions, loaded automatically at conversation start

  • Shared store~/.context-mcp/projects/<name>/ per-project on your machine; all AI tools read and write it

  • ContextGraph — build a knowledge graph of your codebase once, answer structural questions in ~500 tokens instead of ~50,000

The repository includes a reproducible offline benchmark for measuring context compression and retrieval quality; reported values are generated locally from the benchmark fixture.

Context Subgraph Pipeline

Code files ──Tree-sitter AST──> entities + relations ──> ContextGraph cache
                                                          │
AI task ──lexical seeds──> relation-aware BFS ──> rank + recency ──> token budget
                                                          │
                                                          └──> compact MCP context

codegraph_context keeps callers, dependencies, imports, inheritance and implementation paths together while enforcing the requested token budget. It returns tokens_used, candidate_count, dropped_count, drop_reasons, and path metadata so an agent can explain why context was selected or omitted.

Run the reproducible offline benchmark with:

python scripts/benchmark_context.py --budget 160

The benchmark reports Top-K recall, path accuracy, latency, budget compliance, and context compression using a fixed graph fixture. It does not call an external model or online API.


Installation

npm install -g context-mcp-server

Requires Node.js ≥ 18. Installs context-mcp, context-mcp-http, and the ctx CLI.

ContextGraph requires uv (Python runner). Memory tools work without it.

# macOS / Linux
curl -Ls https://astral.sh/uv/install.sh | sh

# Windows
winget install astral-sh.uv

Quick Start

Run from your project root:

ctx install --initial

This installs Node.js + Python (ContextGraph) dependencies. Run once after installing the npm package.

Then write MCP config + AI instruction files:

ctx install --all

To install for a specific platform only:

ctx install --claude      # Claude Code
ctx install --vscode      # VS Code Copilot
ctx install --antigravity # Google Antigravity (2.0 / IDE / CLI)
ctx install --codex       # Codex CLI
ctx install --hermes      # Hermes Agent

For Codex project installs, ctx install --codex writes:

  • .codex/config.toml with [mcp_servers.context-mcp] MCP configuration.

  • AGENTS.md with Context-MCP usage rules for Codex.

  • .codex/hooks/ pre/post shell hook scripts for project-local Codex sessions.

For web clients (Claude.ai, ChatGPT), start the HTTP server:

ctx online               # start in background, prints OAuth credentials + URL
ctx online --restart     # force restart
ctx online --port 3200   # different port

Claude Code plugin

This repo is also a self-hosted Claude Code plugin marketplace — an alternative to ctx install --claude that doesn't require cloning or npm-installing anything yourself:

claude plugin marketplace add yesheng-oss/789
claude plugin install context-mcp@context-mcp-marketplace

or from inside a session: /plugin marketplace add yesheng-oss/789 then /plugin install context-mcp@context-mcp-marketplace. This installs the context-mcp skill, the Bash pre/post-tool-use hooks, and registers the MCP server (still launched via npx context-mcp-server@latest) — everything ctx install --claude writes into ~/.claude/, bundled as one installable unit. ctx install --initial is still required once to install the ContextGraph Python environment.


CLI Reference

Both ctx and context are aliases for the same CLI.

ctx                            # interactive mode (UI)

# Context
ctx list [project]             # list entries by tree: graph / context / summary / plans
ctx projects                   # all projects with graph status + recent entries
ctx search "query"             # keyword → semantic fallback search
ctx add                        # add entry interactively
ctx summary [project]          # summarize recent entries

# Delete
ctx delete <id-prefix>         # delete one entry
ctx delete project <name>      # delete all entries for a project

# Server
ctx online                     # start HTTP server (idempotent)
ctx online --restart           # force stop + restart
ctx settings                   # view and edit config interactively

# Install
ctx install --initial          # install / update Node.js + Python deps
ctx install --all              # write config + rules for all platforms

Security

File and git tools are sandboxed to your project root. Pass rootPath when calling context.resume:

{ "action": "resume", "project": "my-app", "rootPath": "/home/user/my-app" }

Any file or git operation outside that directory is rejected. Applies to all HTTP-connected clients.


Features

Memory

  • context.resume — loads recent entries, active plans, and graph status; registers rootPath for sandboxing

  • context.save — store context as note (or compaction for session summaries); categorize with free-form tags

  • context.get / context.update / context.delete — full CRUD, single or batch

  • search — keyword-first, semantic fallback

  • plan — auto-triggered when AI makes any plan; saves a markdown summary to a planDir you specify

  • Auto-deduplication on save; auto-compact at 20 entries → stored in summary.json

ContextGraph

Also called CodeGraph. MCP tools use the codegraph_* prefix — both names mean the same thing.

Step 1 — Build (once per project, runs locally, no API cost):

codegraph_build(path)

Parses codebase via tree-sitter AST (16 languages, regex fallback). Extracts functions, classes, imports, call edges, and inheritance. Every node carries a full enriched schema: signature, params, return_type, docstring, side_effect, exported, complexity, last_modified. PageRank scores all nodes by connectivity. Metadata saved to <project>/codegraph-cache/.

Step 2 — Query (instant, forever):

codegraph_arch(path, limit?)                     → module map: every file, its exports, its imports
codegraph_query(path, question?, node?)          → structural question OR single-node lookup (or both)
codegraph_nodes(path, type, token_budget?)       → all nodes of a type, sorted by PageRank
codegraph_filter(path, node_type?, exported?,    → predicate filter: side_effect, return_type,
  side_effect?, return_type?, called_by?,          called_by, file_pattern — rank-sorted output
  calls?, file_pattern?, token_budget?)
codegraph_report(path)                           → god nodes, clusters, surprising connections
codegraph_affected(path, node, depth?)           → BFS blast radius — what breaks if you change X?

codegraph_query accepts question (natural language), node (exact/partial name), or both. codegraph_filter answers property questions ("which functions have side effects?", "all exported async handlers") without reading any files. Pass token_budget to any tool to get the highest-rank results within a token limit.

What's in each node (v1.2+):

Field

Example

signature

function fetchUser(id: string): Promise<User>

return_type

Promise<User>

side_effect

true (db write, HTTP call, fs op detected)

exported

true

docstring

first comment or JSDoc string

rank

PageRank score — higher = more connected

inherits / implements

parent class / interface names

Step 3 — Visualize (auto-generated on every build):

codegraph_html(path, formats?)            → regenerate visualizations on demand

Every codegraph_build automatically writes to <project>/codegraph-cache/:

  • graph.html — interactive vis.js force graph (dark theme, search, community toggle)

  • tree.html — D3 collapsible file hierarchy

  • callflow.html — Mermaid architecture diagrams per community

  • graph.graphml — Gephi / yEd export

  • obsidian/ — per-node .md vault with [[wikilinks]]

File & Git Tools

Available to HTTP-connected clients (Claude.ai, ChatGPT). Local AI clients use their native IDE tools.

  • read_file, write_file, patch_file, create_dir, list_dir, delete_file

  • git_status, git_diff, git_log, git_add, git_commit, git_push, git_pull, git_branch, git_stash, git_reset, git_show

Enable git tools with --access-git flag or access_git: true in config.


Server Flags

context-mcp [--data-dir <path>]

context-mcp-http [--port <number>] [--host <string>] [--access-git] [--data-dir <path>]

Default port: 3100. Default data dir: ~/.context-mcp.


Config Reference

~/.context-mcp/contextconfig.json — auto-created on first run:

Field

Default

Description

client_id

"context-mcp"

OAuth client ID

client_secret

auto-generated

OAuth signing secret

port

3100

HTTP server port

host

"localhost"

HTTP bind host

access_git

false

Enable git tools for HTTP clients

public_url

null

Public URL for ctx online output

allowed_redirect_uris

["https://claude.ai"]

OAuth redirect URI whitelist

allowed_origins

[]

Extra CORS origins

Edit with ctx settings.


Available Tools

9 tools
codegraph_affectedA

BFS traversal: given a node name, find every node that would be affected if you change it — callers, importers, inheritors, etc. Use before refactoring to understand blast radius. Returns affected nodes with file paths, relation types, and traversal depth.

ParametersJSON Schema
NameRequiredDescriptionDefault
nodeYesNode name, ID, or file path to start from
pathYesProject root
depthNoBFS depth (default 2, max 5)

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It discloses the traversal algorithm (BFS), the result contents (file paths, relation types, traversal depth), and the notion of affected nodes. It doesn't discuss performance or side effects, but the read-oriented traversal description is reasonably transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences with no filler: the first defines the algorithm and scope, the second gives the use case, and the third describes the return shape. Every sentence contributes.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the fully described schema, no output schema, and no annotations, the description covers purpose, timing, algorithm, and return contents. It doesn't address edge cases like empty results or cycle behavior, but those are not necessary for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds only slight reinforcement by mentioning 'node name' and traversal depth, but it doesn't provide meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: perform a BFS traversal to 'find every node that would be affected if you change it.' The blast-radius framing clearly distinguishes this from siblings like codegraph_query or codegraph_nodes, even though those alternatives are not explicitly named.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit use case: 'Use before refactoring to understand blast radius.' This tells an agent when to invoke the tool, though it does not mention when not to use it or which sibling would be preferred for other scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

codegraph_archA

Return a module map: every file with its exported functions/classes and what it imports. Use this to understand project structure without reading any files. Call after codegraph_build. Much faster than reading each file.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesProject root
limitNoMax files in output (default 100)

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of behavioral disclosure. It states that no files are read, that it returns a module map, that it is much faster than reading files, and that it depends on codegraph_build. This is substantive behavioral context, though it does not detail error cases or exact output formatting.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences lead with the purpose, state the prerequisite, and justify the tool's value. Every sentence earns its place with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description explains the high-level return shape, the prerequisite, and the intended use. It is sufficient for an agent to select and call the tool correctly, though without an output schema a bit more detail about the exact returned structure could make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both parameters are already documented ('Project root' and 'Max files in output'). The description adds context about what the map contains but no additional detail about how the path or limit parameters behave beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: 'Return a module map' with every file's exported functions/classes and imports. This clearly distinguishes it from generic codegraph query tools by describing a distinct, concrete output.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear usage context: use it to understand project structure without reading files, and call it after codegraph_build. It lacks explicit when-not-to-use guidance or named alternatives, but the provided context is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

codegraph_buildA

Scan a project directory and build the knowledge graph from code files. Uses tree-sitter AST (with regex fallback) for all code files. Fast, local, no API key needed. Run once per project; rebuild whenever code changes.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to project root
clusterNoRun community detection after build (default true)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description takes on the disclosure burden and does add useful context: local-only execution, no API key, tree-sitter AST with regex fallback. However, it does not disclose whether a rebuild overwrites the existing graph or how/where the graph is stored.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, purpose first, with each sentence contributing a distinct fact: what it does, how it parses code, and when to run it. There is no filler or redundant restatement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absent output schema and annotations, the description still covers the tool's purpose, input type, constraints, and usage lifecycle well. A note on overwrite semantics or the fact that sibling query tools should be used afterward would make it fully complete, but it is largely sufficient for selecting and invoking the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so path and cluster are already documented in the schema. The description only reinforces the meaning of the project directory and adds no extra detail about the cluster parameter or path formatting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific action ('scan a project directory') and resource ('build the knowledge graph from code files'), making the tool's role immediately clear. Its build/update role is distinct from the query, report, and rendering siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete usage direction: run once per project and rebuild whenever code changes. It does not explicitly enumerate when to avoid this tool in favor of a sibling, but the lifecycle guidance is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

codegraph_contextA

Build a bounded, token-budgeted context subgraph for an AI coding task. Finds query-matching seed nodes, expands callers/dependencies/imports up to max_hops, ranks candidates, and returns compact nodes, relationship paths, budget usage, candidate counts, and per-item drop reasons.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesProject root
top_kNoMaximum query seed nodes (default 5)
max_hopsNoMaximum graph expansion depth (default 2, max 5)
questionNoCurrent code task or architecture question
token_budgetNoMaximum approximate tokens for nodes and edges

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral transparency. It does well by disclosing the algorithm (query matching, expansion by hops, ranking) and the return contents (compact nodes, relationship paths, budget usage, candidate counts, and per-item drop reasons). It does not explicitly state whether the tool mutates anything on disk, but the emphasis on 'returns' suggests a read/compute operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loads the core purpose, and packs meaningful behavioral and output details without redundancy. Every clause adds information about what the tool does or returns.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given there is no output schema, the description appropriately lists the major return categories: compact nodes, relationship paths, budget usage, candidate counts, and drop reasons. It is reasonably complete for a complex graph-traversal tool. The main gap is absence of preconditions or explicit guidance on how it relates to prerequisite steps like codegraph_build.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all five parameters. The description adds some contextual meaning by tying max_hops to expansion and token_budget to the bounded nature of the result, but it mostly restates concepts already present in the schema rather than providing substantial additional parameter-level detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states what the tool does: builds a bounded, token-budgeted context subgraph for an AI coding task, with a detailed walkthrough of the process (seed nodes, expansion, ranking, results). It is specific about verb and resource, but it does not explicitly distinguish itself from sibling tools like codegraph_query or codegraph_nodes, so it misses the upper bar for sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for an AI coding task' plus 'bounded, token-budgeted context subgraph' implies this should be used when the agent needs a compact, budget-limited view of relevant code relationships. However, it does not explicitly state when to prefer this over alternatives such as codegraph_query or codegraph_report, nor does it give any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

codegraph_filterA

Filter graph nodes by semantic properties. Results sorted by PageRank (most connected first). All filters optional — combine freely. node_type: function|class|module|file. exported/side_effect: bool. return_type: substring match. called_by/calls: node name. file_pattern: glob. token_budget: max tokens in response.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
callsNoOnly nodes that call this name
limitNoMax results (default 20)
exportedNo
called_byNoOnly nodes called by this name
node_typeNo
return_typeNoSubstring match on return type
side_effectNo
file_patternNoGlob pattern for file path
token_budgetNoMax tokens in response

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioral disclosure burden. It does this well by stating that results are sorted by PageRank, that filters are optional and freely combinable, and by explaining filter value formats. It does not explicitly state whether the operation is read-only or how result nodes are shaped, but 'filter' strongly implies a read-only operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact, front-loaded with the core purpose, and then uses a terse parameter key to pack filter semantics into one readable paragraph. Every clause earns its place; nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 10-parameter surface and absence of annotations and output schema, the description provides a strong foundation: it explains filtering semantics, ordering, and token budget. It lacks explicit guidance on what each returned node contains and does not clarify the required 'path' parameter, so it is not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful semantics for many parameters: node_type values, called_by/calls as node names, return_type as substring match, file_pattern as glob, and token_budget as max response tokens. It leaves the required 'path' parameter unexplained and relies on the schema for 'limit', which is a minor gap given 60% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear verb and resource: 'Filter graph nodes by semantic properties.' It also conveys specific behavior like PageRank ordering and optional filters. It does not explicitly differentiate itself from siblings such as codegraph_query or codegraph_nodes, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage — filter graph nodes by semantic properties — and clarifies that all filters are optional and combinable. However, it gives no explicit guidance on when to choose this tool over its siblings, nor any exclusions or alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

codegraph_htmlA

Generate interactive vis.js HTML graph visualization. Dark theme, search box, community toggle, click-to-inspect node panel. Outputs codegraph-cache/graph.html. Also generates graph.graphml and obsidian/ vault.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesProject root
formatsNoFormats to generate: html, graphml, obsidian, tree, callflow (default: all)

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description does disclose noticeable side effects: it writes codegraph-cache/graph.html, graph.graphml, and an obsidian/ vault. Yet it omits overwrite behavior, prerequisites, and other consequences of running a generation tool, so behavioral disclosure remains partial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two focused sentences with the main purpose stated first and supporting artifact details after. Each clause adds relevant information without filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description names the main and secondary outputs and the interactive features, but omits the tree and callflow formats mentioned in the schema and does not explain format-to-output relationships or any prerequisites. Given no annotations and no output schema, some practical gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both path and formats are already documented in the input schema. The description mostly repeats format names and adds output-file locations rather than clarifying parameter semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb ('Generate') and resource ('interactive vis.js HTML graph visualization'), then lists distinctive UI features and concrete output artifacts. This clearly differentiates it from sibling tools like codegraph_build or codegraph_query without needing additional context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description makes the intended use clear by describing the generated visualization artifacts and supported formats. However, it never explicitly says when to prefer this tool over siblings or when not to use it, leaving usage guidance implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

codegraph_nodesB

List all nodes of a given type, sorted by PageRank (most connected first).

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
typeYes
limitNoMax results (default 50)
token_budgetNoReturn highest-rank nodes within this token budget

TDQS

B3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the burden of behavioral disclosure. It does disclose the sorting order and that all nodes of a type are returned, which is useful. However, it does not state whether this is read-only, whether it requires a prior build, how results are paginated, or how token_budget/limit affect the output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence that states the core action, the scope, and the ordering in an efficient way. There is no filler, and the most important behavioral detail (PageRank sorting) is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite the relative simplicity of listing nodes, the description leaves important gaps: the meaning of path is unclear, the relationship between limit and token_budget is not explained, there is no output schema, and no guidance is given on how this compares with sibling tools. An agent would likely need to guess at required path semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 50%: the required path and type parameters have no descriptions, while limit and token_budget do. The description weakly clarifies type ('of a given type') but leaves path completely unexplained, and it does not explain how limit and token_budget interact. The description does not compensate for the undocumented required parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'List all nodes of a given type'. It also adds sorting behavior ('sorted by PageRank (most connected first)'), which clarifies what the tool returns. It is distinct enough from sibling tools like codegraph_query or codegraph_filter, though it does not explicitly name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives such as codegraph_query, codegraph_filter, or codegraph_context. The description only implies it is for retrieving all nodes of a type; it does not mention exclusions, prerequisites, or typical use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

codegraph_queryA

Ask a structural question about the codebase OR look up a specific node by name — or both in one call. Pass question for natural-language traversal: what calls X, what does module Y depend on. Pass node for fast single-node lookup: returns type, file, depends_on, used_by. Pass both to get node detail + surrounding graph context together. Returns structured text within token_budget. Use before reading any files.

ParametersJSON Schema
NameRequiredDescriptionDefault
nodeNoNode name or partial name to look up (type, file, deps, callers)
pathYesProject root
questionNoNatural language question about the codebase
token_budgetNoMax tokens in response (default 2000)

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose output fields, combined-mode behavior, and token_budget constraints. However, it does not state whether a prior codegraph_build is required, whether the operation is strictly read-only, or what happens when neither question nor node is supplied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded and information-dense, but 'or both in one call' is repeated in the later 'Pass both' sentence, creating slight redundancy. Overall, most sentences earn their place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main modes and node-lookup return shape, but without an output schema it leaves question-mode response structure vague. It also omits behavior for a path-only call and the relationship to codegraph_build, both of which matter for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents all four parameters, and the description adds real meaning beyond it: concrete question examples, the node lookup return fields, and the composition of question+node modes. This exceeds the baseline expected for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool's actions and resource: asking a structural question about the codebase or looking up a specific node by name, with support for combining both. However, it does not explicitly differentiate from sibling tools like codegraph_context or codegraph_nodes, although 'single-node lookup' hints at a distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives concrete conditional guidance: use question for natural-language traversal, node for single-node lookup, both for combined context, and use the tool before reading files. It does not name alternative sibling tools or state explicit when-not-to-use conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

codegraph_reportC

Return CODEGRAPH_REPORT.md — god nodes, clusters, surprising connections, suggested questions.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the behavioral disclosure burden. It indicates that the tool returns a report and names its contents, but it does not disclose whether the report is written to a file or returned as text, whether the tool triggers a build, or what side effects or dependencies exist. This is a significant gap for a tool with no annotation safety cues.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise, front-loaded sentence with no filler. The dash-separated list of report contents is information-dense and readable, and every word contributes to conveying the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema, no annotations, and a vaguely defined required path parameter, the description is too thin to support confident invocation. Missing context includes what the path should point to, whether a build must already exist, whether the tool creates or overwrites a file, and what the returned value actually is. The contents list helps, but core operational details are absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single 'path' parameter has zero schema description coverage, and the description does not explain what path refers to (e.g., project path, graph database path, or output path). The description adds no meaning beyond the generic schema field name, leaving an agent to guess the parameter's role.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Return') and a specific resource ('CODEGRAPH_REPORT.md'), and it lists the report's contents (god nodes, clusters, surprising connections, suggested questions). It is clearly about producing a report, though it does not explicitly distinguish itself from related siblings like codegraph_html or codegraph_context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is given about when to use this tool versus its siblings, nor are alternatives named. The phrasing implies it is used when a report is needed, but there is no context about prerequisites such as requiring a prior codegraph_build, or when a different tool would be more appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 9 tool updatesv1.3.0
    • First observedcodegraph_affected
    • First observedcodegraph_arch
    • First observedcodegraph_build
    • First observedcodegraph_context
    • First observedcodegraph_filter
    • First observedcodegraph_html
    • First observedcodegraph_nodes
    • First observedcodegraph_query
    • First observedcodegraph_report

TDQS

A3.7/5.0

Scored across 9 tools

Disambiguation4/5

Each tool has a clearly different job—build, query, contextualize, report, list, visualize, impact, filter, architectural map—but some overlap exists: codegraph_query and codegraph_context both return graph context, and codegraph_nodes is essentially a restricted version of codegraph_filter. The descriptions are strong enough that an agent can usually choose correctly.

Naming Consistency4/5

All tools share the consistent codegraph_ prefix and snake_case, and the suffixes are short and readable. However, they mix verb-style suffixes (build, query, filter) with noun-style suffixes (context, report, nodes, html, arch), so the set is not a strict verb_noun pattern.

Tool Count5/5

Nine tools is well within the ideal range and appropriate for a code-graph server. Each tool corresponds to a distinct workflow: building, querying, contextualizing, reporting, listing, visualizing, impact analysis, filtering, and architectural mapping.

Completeness5/5

The tool surface covers the full lifecycle of a code knowledge graph: build, inspect, filter, query, analyze impact, generate reports, and export visualization. There are no obvious missing operations that would block an agent from using the graph effectively; rebuild-on-change is handled via codegraph_build.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Provides persistent memory and a codebase knowledge graph for AI coding assistants, enabling shared context across multiple tools like Claude, Cursor, and ChatGPT, with significant token reduction.
    5
    13 npm
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides AI coding agents with persistent, graph-connected memory across projects, enabling cross-project context retrieval via synaptic connections and hybrid search.
    12 npm
    6
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides persistent codebase memory and semantic context for AI agents via AST-aware chunking and symbol graph indexing.
    1
    -