AI Agent lifecycle management toolkit for MCP Server Lifecycle Specification
mcp-speckit is a specification-driven toolkit that guides AI agents through the complete lifecycle of MCP (Model Context Protocol) server development, from requirements gathering to deployment and operations.
- Spec-Driven: Enforces compliance with MCP Server Lifecycle Specification v1.0.0
- AI-First: Designed for AI agent workflows with Slash Commands
- Complete Lifecycle: Covers UNDERSTAND β DESIGN β BUILD β TEST β DEPLOY β OPERATE phases
- Validation Engine: Two-stage validation (JSON Schema + specification rules)
pip install mcp-speckitmcp-speckit init my-mcp-server
cd my-mcp-serverThis creates:
my-mcp-server/
βββ artifacts/ # Specification artifacts
β βββ requirements_document.json
βββ tools/ # Tool implementations
βββ resources/ # Resource implementations
βββ prompts/ # Prompt implementations
βββ README.md
# Check entire project
mcp-speckit check
# Check specific file
mcp-speckit check artifacts/requirements_document.json
# Strict mode (warnings as errors)
mcp-speckit check --strict
# JSON output
mcp-speckit check --json > results.jsonCreate a new MCP server project with templates.
mcp-speckit init <path> [OPTIONS]Options:
--template,-t: Server type (stdio or sse, default: stdio)--force,-f: Overwrite existing directory
Examples:
mcp-speckit init my-server
mcp-speckit init my-server --template sse
mcp-speckit init my-server --forceValidate artifacts against MCP Server Lifecycle Specification.
mcp-speckit check [PATH] [OPTIONS]Options:
--type,-t: Explicit artifact type (requirements_document, technical_design_specification)--strict,-s: Treat warnings as errors--json: Output results as JSON
Examples:
mcp-speckit check # Current directory
mcp-speckit check artifacts/requirements.json # Single file
mcp-speckit check --type requirements_document req.json
mcp-speckit check --strict # Strict validationExit Codes:
0: All artifacts valid1: Validation errors found2: File/directory not found or other error
mcp-speckit provides Slash Commands for AI-guided development:
/mcpspeckit.understand- Requirements gathering and analysis/mcpspeckit.design- Technical design specification/mcpspeckit.build- Implementation guidance/mcpspeckit.test- Testing and validation/mcpspeckit.deploy- Deployment orchestration/mcpspeckit.operate- Runtime management
/mcpspeckit.get-spec- Specification specification reference/mcpspeckit.validate-requirements- Validate requirements document/mcpspeckit.validate-design- Validate design specification
Location: templates/mcp-spec/commands/
{
"mcp_spec_version": "1.0.0",
"spec_version": "1.0.0",
"project_name": "my-server",
"description": "Server description",
"server_type": "stdio",
"functional_requirements": [
{
"id": "FR-001",
"description": "Requirement description",
"priority": "high",
"acceptance_criteria": ["Criterion 1"]
}
],
"non_functional_requirements": []
}{
"mcp_spec_version": "1.0.0",
"spec_version": "1.0.0",
"project_name": "my-server",
"description": "Design description",
"server_type": "stdio",
"architecture": {
"overview": "Architecture overview",
"components": []
},
"tools": [],
"prompts": [],
"resources": []
}Schema Validation:
- Required fields presence
- Field types and formats
- Enum values (priority, server_type)
- String length constraints
- Array length constraints
Specification Rules:
- MCP version format (1.x.x)
- At least one high-priority requirement (warning)
- Tool/prompt/resource naming conventions
βββββββββββββββββββββββββββββββββββββββββββ
β CLI Layer (init + check) β
β β’ User interaction β
β β’ Rich formatted output β
ββββββββββββββββ¬βββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββ
β Validator Core β
β β’ JSON Schema validation β
β β’ Specification rules checking β
β β’ Error message generation β
ββββββββββββββββ¬βββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββ
β Utils Layer β
β β’ File loading (JSON/YAML) β
β β’ Artifact type detection β
β β’ Project structure creation β
ββββββββββββββββ¬βββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββ
β Models + Schemas β
β β’ Pydantic models β
β β’ JSON Schema definitions β
βββββββββββββββββββββββββββββββββββββββββββ
# Run all tests
pytest tests/
# Run with coverage
pytest tests/ --cov=src/mcp_speckit --cov-report=html
# Run specific test suite
pytest tests/unit/test_validator.py -v
pytest tests/integration/test_cli.py -vTest Coverage: 95%
- models.py: 97%
- schemas/: 100%
- validator.py: 94%
- utils.py: 100%
- cli.py: 88%
mcp-speckit is part of the MCP Factory ecosystem:
- mcp-factory-server - Development and runtime management (UNDERSTAND/DESIGN/BUILD/OPERATE)
- mcp-inspector-server - Testing and validation (TEST)
- devops-mcp-server - Infrastructure deployment (DEPLOY)
- Specification - Toolkit specification
- Implementation Plan - Architecture and design
- Tasks - Implementation breakdown
- Specification Spec - MCP Server Lifecycle Specification
This project follows the MetaSpec specification-driven development methodology:
- Specifications First: All changes start with specification updates
- AI-Assisted: Use Slash Commands for guided development
- Quality Standards: Defined in
memory/constitution.md
MIT License - see LICENSE for details
Generated with: MetaSpec 0.2.0
Specification Version: MCP Server Lifecycle Specification v1.0.0