Skip to content

feat: Add MCP server integration for spec-kit#1770

Open
jlwainwright wants to merge 2 commits intogithub:mainfrom
DankeyDevDave:feat/mcp-server
Open

feat: Add MCP server integration for spec-kit#1770
jlwainwright wants to merge 2 commits intogithub:mainfrom
DankeyDevDave:feat/mcp-server

Conversation

@jlwainwright
Copy link

Summary

  • Adds a comprehensive MCP (Model Context Protocol) server that exposes spec-kit's spec-driven development workflow to AI assistants via standardized tool calls
  • Includes modular tool structure (src/speckit_mcp/tools/) for specification, planning, task breakdown, domain analysis, and constitution management
  • Adds domain analysis module (src/specify_cli/domain_analysis.py) for extracting business entities from JSON/CSV data files, with interactive wizard support
  • Provides Claude Desktop configuration, specify-mcp extension, Claude slash commands, and comprehensive documentation (INSTALL.md, USAGE.md, MCP-README.md)
  • Includes full test suite with tests for domain analysis, domain config, template population, interactive analysis, and shell integration

MCP Server Tools

Tool Description
specify_init Project initialization
specify_feature Feature specification creation
specify_plan Implementation plan generation
specify_tasks Task breakdown from plans
specify_analyze_domain Business entity extraction from data files
specify_analyze Cross-artifact consistency analysis
specify_constitution Project principles management

Test plan

  • Run pytest tests/ -v to verify all new tests pass
  • Test MCP server starts cleanly: timeout 5s python spec-kit-mcp-server.py
  • Verify CLI still works: specify check and specify version
  • Test domain analysis with sample data in sample-data/
  • Validate Claude Desktop config works with claude_desktop_config_update.json

🤖 Generated with Claude Code

This adds a comprehensive MCP (Model Context Protocol) server that exposes spec-kit functionality to AI assistants.

Features:
- Standalone MCP server (spec-kit-mcp-server.py) with full CLI coverage
- Modular tool structure in src/speckit_mcp/tools/
- Domain analysis tools for automatic entity extraction
- Interactive domain analysis wizard
- Claude Desktop configuration support
- specify-mcp extension for enhanced MCP integration

The MCP server provides tools for:
- Project initialization (specify_init)
- Feature specification (specify_feature)
- Implementation planning (specify_plan)
- Task breakdown (specify_tasks)
- Domain analysis (specify_analyze_domain)
- Specification analysis (specify_analyze)
- Project constitution management (specify_constitution)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jlwainwright jlwainwright requested a review from mnriem as a code owner March 6, 2026 04:24
- Fix post-increment with set -e in analyze-domain.sh (use pre-increment)
- Fix path traversal in MCP server template/memory methods (sanitize names)
- Fix speckit_analyze_domain schema/dispatcher mismatch
- Fix spec_kit.specify_dir typo (use spec_kit.spec_kit_dir)
- Fix f-string nested quotes syntax errors (3 occurrences)
- Fix entry point in pyproject.toml (speckit_mcp.server:main)
- Fix undefined confidence_emoji variable (use confidence_indicator)
- Fix write_file returning None treated as failure (add return True)
- Fix populate_template() -> populate_specification() method name
- Sanitize feature_name to prevent path traversal in specify tool
- Fix test references to non-existent _discover_data_files (use _scan_data_files)
- Fix test references to non-existent _load_json_file/_load_csv_file
- Align spec-kit-mcp-config.json tool names with actual server implementation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you break this up in smaller PRs each geared towards enabling part by part where possible. Also note that adding agent specific commands directly is NOT how it is supposed to be done. The agent files are generated so it works for each agent. Is it possible to deliver part of it as a community extension?

Love seeing this land, but need it is more manageable pieces. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants