MCP tools
Run codeweb as a Model Context Protocol server and query the graph from Claude Desktop, Cursor, or any MCP client.
Start the MCP server
Built with the mcp feature, codeweb mcp speaks JSON-RPC over stdio:
Register it in an MCP client, for example Claude Desktop’s claude_desktop_config.json:
Lifecycle
The server starts even when the directory has no codeweb.toml yet: queries then return status: "uninitialized" instead of the process exiting.
codeweb_initwritescodeweb.tomland.codeweb/under the served directory. It never analyzes on its own.codeweb_analyzebuilds or incrementally refreshes the graph and hot-swaps it into the running server, so later queries see the new graph without a restart.codeweb_difflists files added, modified, or deleted since the last analysis.
Tools
| Tool | Parameters | Description |
|---|---|---|
codeweb_init | name (optional, defaults to directory name), paths (optional, defaults to ["."]) | Initialize the project; no analysis |
codeweb_analyze | — | Build/refresh the graph and hot-swap it in |
codeweb_diff | — | Changes since the last analysis |
codeweb_stats | — | Node counts by type, edge count, status; call this first |
codeweb_nodes | search, node_type, limit, offset | List nodes with filtering and pagination |
codeweb_node_detail | ids (list), depth (1 direct, 0 unlimited, N hops) | Properties, callers, callees |
codeweb_trace | from, depth, max_nodes | Bidirectional call chain as nested trees |
codeweb_search_sql | sql | Search mapper/sql nodes by SQL text with relevance scoring |
codeweb_query | spec | Execute a QuerySpec |
codeweb_column_analysis | procedure or package (exactly one), table (optional) | Same JSON schema as codeweb columns --format json |
codeweb_lineage | target, direction, depth | Same functions and JSON shape as codeweb lineage --format json |
Security boundaries
Reads may point at any directory listed in analysis.paths, but every write is confined to the served directory: a tampered store.path that escapes it is rejected. The server exposes no shell execution and no file-write tools beyond the lifecycle above.