craft-ts-graph-mcp

Query the static CraftTS dependency graph through graph MCP tools.

3|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/craft-ts/craft-ts --skill craft-ts-graph-mcp-craft-ts
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: craft-ts-graph-mcp
Source: https://github.com/craft-ts/craft-ts/tree/main/.agents/skills/craft-ts-graph-mcp
Command: npx skills add https://github.com/craft-ts/craft-ts --skill craft-ts-graph-mcp-craft-ts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Answering architecture questions in a CraftTS project normally requires reading files one by one. This Skill answers questions about routes, components, services, dependencies, impact, and architecture rules directly from the static dependency graph built by the CraftTS analysis. ## Core Features & Use Cases - Dependency lookup: Find where a route, component, service, or primitive lives and what it depends on using graph.search and graph.node. - Impact analysis: Determine what breaks when a node changes with graph.impact, and trace connections between two nodes with graph.path. - Architecture health: Detect risk hotspots, rule violations, and unmeasured metrics with graph.hotspots, graph.violations, and graph.report. - Use Case: Before refactoring a shared service, ask which pages depend on it; the Skill checks graph.status for staleness, rebuilds if needed, and returns the impacted routes with evidence locations. ## Quick Start Ask which routes and components would be affected if you change a specific CraftTS service in this project.

Frequently Asked Questions about craft-ts-graph-mcp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find what depends on a CraftTS service or component?▼

Use graph.search with the name to get the node id, then graph.node to confirm it, and graph.impact to list everything affected by a change. Filter by kind such as route or component to answer questions like which pages break.

What is the CraftTS graph MCP server used for?▼

It answers architecture questions from the static dependency graph built by CraftTS analysis instead of reading files individually. It covers node lookup, impact analysis, path tracing, neighbors, hotspots, violations, and overall reports.

How do I check if the dependency graph is up to date?▼

Call graph.status first and read the stale field. If stale is true, call graph.rebuild before answering; if the server is read-only, run craft graph --format all to refresh the file. Unknown means no tsconfig exists to compare against.

Why is a function missing from the CraftTS dependency graph?▼

The graph only models CraftTS constructs such as routes, components, services, primitives, and server functions. A plain helper function is not a node. Check nodesByKind in graph.status to see what the analysis captured.

What does a missing cyclomatic complexity metric mean in the graph?▼

An absent metric means unknown, not zero. A node without cyclomaticTotal has no source range the graph could measure, so it should never be described as simple. The CRAFT_GRAPH_METRICS_UNKNOWN diagnostics list which kinds are unmeasured.