Skip to content

MCP Tools

NestWeaver exposes 40 tools via the Model Context Protocol (MCP), giving AI coding agents structured access to the knowledge graph. Every tool accepts JSON parameters and returns structured JSON responses.

Run nestweaver setup to auto-configure your agent’s MCP connection. Supported agents:

  • Claude Code — writes to .mcp.json in the project root
  • Cursor — configures the MCP server in Cursor settings
  • Aider — adds the MCP server to .aider.conf.yml
  • Copilot CLI — registers the MCP endpoint
  • Gemini CLI — configures via .gemini/settings.json
  • Codex — registers the MCP server for OpenAI Codex
  • Other MCP-compatible agents — use nestweaver mcp to start the server manually
CategoryToolsPurpose
Contextbrain_context, brain_search, project_context, get_summary, brain_status, brain_guide, brain_diffRetrieve ranked context from the knowledge graph
Code Navigationread_symbols, regex_search, count_patterns, flow_trace, investigate, investigate_expand, investigate_hydrateNavigate symbols, trace execution flows
Impact Analysisblast_radius, brain_impact, affected_tests, dead_code, detect_changes, hub_nodes, bridge_nodes, clusters, cross_repo_contracts, contract_driftAssess change impact and architectural risk
Vault & Notesnote_get, backlinks, brain_add_source, brain_remove_source, brain_broken_links, brain_orphan_documents, brain_topic_clusters, brain_tag_graph, brain_doc_stats, brain_memory_lint, brain_memory_consolidate, brain_memory_relatedQuery vaults, manage knowledge sources
Utilitystale_check, prune_stale, set_extension, query_extensionsGraph maintenance and custom metadata

Many tools share these filtering and output parameters:

ParameterTypeDescription
token_budgetintegerApproximate token cap for the response (chars / 4). Controls how much context is returned.
response_formatstring"concise" for names and relationships only; "detailed" (default) adds file paths, scores, and UIDs.
reposstring[]Filter results to specific repository UIDs or names.
tagsstring[]Include only nodes tagged with any of these tags.
exclude_tagsstring[]Exclude nodes tagged with any of these tags.
path_prefixstringInclude only nodes whose file path starts with this prefix.
kindsstring[]Filter by node kind: Symbol, Note, Section, Tag, Heading. Case-insensitive prefix match.
limitintegerMaximum number of results to return. Total counts are always reported regardless of limit.

These tools handle graph maintenance and custom metadata. They are not covered on a separate sub-page due to their small number.

Check whether the graph index is current by comparing each repo’s indexed git SHA against HEAD.

No parameters required.

Remove all indexed repos and vaults whose source directories no longer exist on disk.

No parameters required.

Attach custom key-value metadata to any node in a JSON sidecar alongside the database.

ParameterTypeRequiredDescription
uidstringYesNode UID to annotate.
keystringYesProperty name (e.g. "team_owner", "deprecated").
valueanyYesProperty value — any JSON value. Overwrites existing.

Query custom metadata set via set_extension. Two modes: by uid (all properties for a node) or by key + value (find all nodes matching a property).

ParameterTypeRequiredDescription
uidstringNoReturn all custom properties for this node. When provided, key and value are ignored.
keystringNoProperty name to filter by. Required when not using uid mode.
valueanyNoValue to match (exact match only). Required when key is provided.