MCP setup
Use SpecDrive in Cursor or Claude Desktop via the Model Context Protocol.
SpecDrive MCP scans your repo and returns generation bundles (prompts + context).
You (Cursor/Claude) generate the markdown using your host API key, then call
write_spec_document. SpecDrive never calls an LLM in MCP mode.
Install
npm install -g @specdrive/mcp @specdrive/cli
# Or use npx without global install (recommended)
npx -y @specdrive/mcp
Run spec init in your project before using MCP tools.
Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"specdrive": {
"command": "npx",
"args": ["-y", "@specdrive/mcp"],
"cwd": "${workspaceFolder}"
}
}
}
Restart Cursor or reload MCP servers from settings.
Claude Desktop
Edit claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"specdrive": {
"command": "npx",
"args": ["-y", "@specdrive/mcp"],
"cwd": "/absolute/path/to/your/project"
}
}
}
Replace cwd with your project root. Restart Claude Desktop.
Global install alternative
npm install -g @specdrive/mcp
{
"mcpServers": {
"specdrive": {
"command": "specdrive-mcp",
"cwd": "/absolute/path/to/your/project"
}
}
}
MCP workflow
Figma + Design2Code (figma-to-code)
SpecDrive MCP can call your
Design2Code integration for
UI tasks only. State, BLoC, navigation, validation, and tests stay with
Cursor/Claude via get_next_task.
Figma token (Personal Access Token)
Figma does not use OAuth popups like GitHub. You generate a token once:
- Open figma.com/settings
- Scroll to Personal access tokens
- Generate → copy token (starts with
figd_)
# Option A — Design2Code config (recommended)
design2code login --figma-token figd_YOUR_TOKEN
# Option B — shell profile
export FIGMA_TOKEN="figd_YOUR_TOKEN" >> ~/.zshrc
# Option C — Cursor MCP env
"env": { "FIGMA_TOKEN": "figd_YOUR_TOKEN" }
Link Figma file to project
# .specdrive/figma.json
{
"fileKey": "YOUR_FIGMA_FILE_KEY"
}
Auto-run UI tasks
# MCP — pass autoFigma: true on get_next_task
# UI tasks → Design2Code generates widgets/screens (component scope)
# Logic tasks → skipped, returns normal implement context
# CLI
spec implement --spec my-feature --next --auto-figma
| Task type | Who implements |
|---|---|
| Scaffold screen, UI components | Design2Code (if installed + Figma linked) |
| Wire state / BLoC / navigation / validation / tests | Cursor/Claude via SpecDrive context |
Available MCP tools
| Tool | Description |
|---|---|
create_spec | Scaffold spec + return generation bundle |
write_spec_document | Save host-generated markdown |
update_spec | Approve workflow gate |
generate_gap_analysis | Gap-analysis generation bundle |
generate_design | Design generation bundle |
generate_tasks | Tasks generation bundle |
scan_codebase | Scan repo for source context |
get_next_task | Implementation context; autoFigma: true runs Design2Code on UI tasks |
figma_status | Check Design2Code + FIGMA_TOKEN setup |
figma_import | Import Figma/MCP Figma file to Design AST |
figma_generate | Generate code from Figma/AST |
figma_generate_for_spec | Generate using spec stack + Figma |
figma_preview | Preview generated code (no writes) |
review_code | Review against design.md |
search_specs | List all specs |
Marketplace listing
For one-click install via Cursor Marketplace or Claude Connectors Directory, see the marketplace submission guide on GitHub.