The Spec-driven Development MCP Server brings AI-guided spec-driven development workflow to AI-powered IDEs. It provides structured guidance through the entire development process from initial concept to implementation, helping you create detailed specifications before writing code.
The simplest way to install and run the MCP server is using npx:
# Always get the latest version
npx spec-driven-dev-mcp@latest
# Or simply (will also get latest)
npx spec-driven-dev-mcp
You can also install the package globally:
npm install -g spec-driven-dev-mcp
spec-driven-dev-mcp
For Claude Desktop, you can install automatically via Smithery:
npx -y @smithery/cli install @kevinlin/spec-driven-dev-mcp --client claude
To use with Cursor, add the following to your Cursor MCP settings:
{
"mcpServers": {
"spec-driven-dev-mcp": {
"command": "npx",
"args": ["spec-driven-dev-mcp@latest"],
"env": {},
"disabled": false
}
}
}
The MCP server provides several tools that guide you through the development workflow:
The spec-driven development process follows five distinct stages:
This stage defines what you want to build with clear, specific objectives.
Example interaction:
User: I want to build a user authentication feature
Assistant: Let me start the spec-driven development workflow for you.
[calls spec_driven_dev_workflow_start]
Let's define your feature goals:
1. What specific authentication methods do you want to support?
2. Do you need social login (Google, GitHub, etc.)?
3. What user roles and permissions are required?
User: I need email/password login with JWT tokens, plus Google OAuth, and basic user/admin roles.
A: Perfect! Let me confirm:
- Feature: User authentication system
- Methods: Email/password + Google OAuth
- Tokens: JWT-based
- Roles: User and Admin
- Feature name: "user-authentication"
Is this correct?
User: Yes, that's exactly what I need.
[calls spec_driven_dev_goal_confirmed with feature_name="user-authentication"]
This stage transforms goals into specific, testable requirements using the EARS format.
Example interaction:
Assistant: Great! Now let's gather detailed requirements.
[calls spec_driven_dev_requirements_start]
[Assistant generates detailed EARS-format requirements in docs/specs/user-authentication/requirements.md]
- WHEN a user provides valid email/password THEN the system SHALL authenticate them
- GIVEN a user wants Google OAuth WHEN they click "Sign in with Google" THEN the system SHALL redirect to Google
- WHERE user roles are needed IF user is admin THEN they SHALL access admin features
User: The requirements look comprehensive. Approved!
[calls spec_driven_dev_requirements_confirmed]
This stage creates detailed technical specifications including architecture, component design, data models, and API specifications.
Example interaction:
Assistant: Now let's create the technical design.
[calls spec_driven_dev_design_start]
[Assistant creates detailed design document including:]
- Database schema for users, sessions, oauth_tokens
- Authentication middleware architecture
- JWT token structure and validation flow
- Google OAuth integration endpoints
- Role-based access control implementation
User: Design looks good, proceed!
[calls spec_driven_dev_design_confirmed]
This stage breaks down the feature into specific, prioritized development tasks with clear dependencies.
Example interaction:
Assistant: Let's break this down into executable tasks.
[calls spec_driven_dev_tasks_start]
[Assistant creates numbered task list:]
1. Set up database models (User, Session, OAuthToken)
2. Implement JWT token service
3. Create email/password authentication endpoints
4. Integrate Google OAuth flow
5. Build role-based middleware
6. Add frontend login/register forms
7. Write integration tests
User: Task breakdown is perfect!
[calls spec_driven_dev_tasks_confirmed]
This final stage implements the code according to the specifications and task plan.
Example interaction:
Assistant: Time to implement! Let's start coding.
[calls spec_driven_dev_execute_start]
[Assistant implements each task step by step:]
- Creates User model with email, password_hash, role fields
- Builds JWT service with sign/verify methods
- Implements /auth/login and /auth/register endpoints
- Integrates Google OAuth with Passport.js
- Creates role-checking middleware
- Builds React login/register components
- Writes comprehensive test suite
Throughout the workflow, the following documentation structure is created:
docs/specs/{feature_name}/
├── requirements.md # EARS-format requirements
├── design.md # Technical architecture
└── tasks.md # Implementation checklist
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "spec-driven-dev-mcp" '{"command":"npx","args":["spec-driven-dev-mcp@latest"],"env":[],"disabled":false}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"spec-driven-dev-mcp": {
"command": "npx",
"args": [
"spec-driven-dev-mcp@latest"
],
"env": [],
"disabled": false
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"spec-driven-dev-mcp": {
"command": "npx",
"args": [
"spec-driven-dev-mcp@latest"
],
"env": [],
"disabled": false
}
}
}
3. Restart Claude Desktop for the changes to take effect