SpecGraphSpecGraph Docs
Workflow

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).

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:

  1. Click View MCP Setup Instructions.
  2. Copy your Project ID shown on the page.
  3. 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.
  4. 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:

ToolWhat It Does
get_prdReads the full locked PRD
get_prd_sectionReads a specific PRD section
get_wishesLists all accepted wishes with priorities
get_agentsLists all workflow and specialist agents
get_agent_instructionsLoads full instructions for a specific agent
get_storiesLists all implementation stories and their status
get_storyLoads a single story with its full self-contained context
get_acceptance_criteriaGets Given/When/Then criteria for wishes and stories
get_project_contextReads design system, tech stack, or security context
get_control_manifestReads implementation guardrails (approved libraries, constraints)
get_claude_mdGenerates a fresh CLAUDE.md from current PRD state
complete_storyReports a story as done (with summary and files changed)
report_blockerHalts work on a story and creates a blocker in SpecGraph
update_story_statusUpdates story status (in_progress / done / blocked)
add_implementation_noteLogs a decision or observation
update_project_phaseAdvances 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_status

Progress 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:

FileContents
prd.mdThe full locked specification
acceptance-criteria.mdGiven/When/Then criteria for all requirements
agent-instructions.mdInstructions for each generated agent
architecture-notes.mdTechnical decisions and constraints
implementation-guide.mdStep-by-step development guidance
context.mdProject background and out-of-scope boundaries
CLAUDE.mdPre-configured CLAUDE.md for Claude Code projects
control-manifest.mdGuardrails: 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.

On this page