Export & MCP Connection
How to connect Claude Code to SpecGraph via MCP for live spec access, or download a standard markdown export as a fallback.
Export & MCP Connection
After a PRD is locked, SpecGraph provides two ways to hand off your specification to the development team: the MCP connection (recommended) and the standard markdown export (fallback).
Recommended: Connect via MCP
The MCP (Model Context Protocol) connection is the primary way to integrate SpecGraph with Claude Code. Instead of exporting static files, the MCP server makes your entire spec available to Claude Code as live, on-demand tool calls.
Why MCP over file export:
- Always current — if a conflict is re-resolved or a wish is updated, Claude Code sees the change immediately on the next tool call. No re-export needed.
- No stale files — specs live in SpecGraph's database, not in your project folder.
- Context sharding — when Claude Code asks for a story, it receives only the context relevant to that story (description, acceptance criteria, relevant PRD sections, applicable constraints) — not the entire spec. This keeps the AI focused and reduces errors.
- Two-way sync — Claude Code reports progress back to SpecGraph via MCP. Stories complete, blockers get reported, and phases advance — all visible in the SpecGraph web UI in real time.
Setting Up the MCP Connection
From the Export page of your locked project:
- Click View MCP Setup Instructions.
- Copy your Project ID shown on the page.
- In your project's root directory, run the init command shown in the instructions. This writes two files:
.mcp.json— configures Claude Code to connect to the SpecGraph MCP server.CLAUDE.md— tells Claude Code about the project and which MCP tools to use.
- Start a Claude Code session in your project directory. It will automatically connect to SpecGraph.
You can also download the .mcp.json file directly from the Export page and place it in your project root manually.
MCP Tools Available to Claude Code
Once connected, Claude Code can use these SpecGraph tools:
| Tool | What It Does |
|---|---|
get_prd | Reads the full locked PRD |
get_prd_section | Reads a specific PRD section |
get_wishes | Lists all accepted wishes with priorities |
get_agents | Lists all workflow and specialist agents |
get_agent_instructions | Loads full instructions for a specific agent |
get_stories | Lists all implementation stories and their status |
get_story | Loads a single story with its full self-contained context |
get_acceptance_criteria | Gets Given/When/Then criteria for wishes and stories |
get_project_context | Reads design system, tech stack, or security context |
get_control_manifest | Reads implementation guardrails (approved libraries, constraints) |
get_claude_md | Generates a fresh CLAUDE.md from current PRD state |
complete_story | Reports a story as done (with summary and files changed) |
report_blocker | Halts work on a story and creates a blocker in SpecGraph |
update_story_status | Updates story status (in_progress / done / blocked) |
add_implementation_note | Logs a decision or observation |
update_project_phase | Advances the project to the next phase |
The Development Workflow via MCP
1. init_project → .mcp.json + CLAUDE.md written to repo
↓
2. Architect Agent → get_prd + get_project_context → design architecture
↓
3. Scrum Master Agent → get_wishes + get_acceptance_criteria → create_stories
↓
4. Developer Agent (loop per story) → get_story → implement → complete_story
↓ (or report_blocker if stuck)
5. QA Agent → get_story → review → update_story_statusProgress is visible in the SpecGraph Implementation Dashboard throughout — no separate project management tool needed.
Fallback: Standard Markdown Export
If your team is not using Claude Code with MCP, you can generate a standard markdown export instead. From the Export page, click Generate Export.
The export produces a ZIP archive containing:
| File | Contents |
|---|---|
prd.md | The full locked specification |
acceptance-criteria.md | Given/When/Then criteria for all requirements |
agent-instructions.md | Instructions for each generated agent |
architecture-notes.md | Technical decisions and constraints |
implementation-guide.md | Step-by-step development guidance |
context.md | Project background and out-of-scope boundaries |
CLAUDE.md | Pre-configured CLAUDE.md for Claude Code projects |
control-manifest.md | Guardrails: approved libraries, budgets, constraints |
These files can be dropped into a project repository or pasted into any AI coding tool for context.
Note: Exported files are static snapshots. If the PRD or project context changes after export, you'll need to regenerate the export to get the latest version. This is why the MCP connection is preferred — it always serves live data.
After Connecting
Once Claude Code is connected via MCP, the project enters the Architecting phase. Monitor progress from the Implementation Dashboard in SpecGraph as the agent team works through architecture, story sharding, and implementation.
See Implementation Dashboard for how to track and manage active development.