Skip to content

Latest commit

 

History

History
129 lines (93 loc) · 3.3 KB

File metadata and controls

129 lines (93 loc) · 3.3 KB

MCP Spec Kit for Kiro CLI - Implementation Summary

What Was Created

A new MCP (Model Context Protocol) server package that exposes Spec Kit prompts for use with Kiro CLI and other MCP-compatible clients.

Project Structure

mcp-speckit-kiro/
├── pyproject.toml                      # Package configuration
├── README.md                           # Documentation
├── .gitignore                          # Git ignore rules
├── test-mcp.sh                         # Test script
└── src/
    └── mcp_speckit_kiro/
        ├── __init__.py                 # Package initialization
        └── server.py                   # MCP server implementation

Key Features

  1. Automatic Prompt Discovery: Searches for .kiro/prompts/ directory starting from current working directory
  2. Frontmatter Parsing: Extracts descriptions from prompt file frontmatter
  3. Argument Substitution: Replaces $ARGUMENTS placeholder with user-provided arguments
  4. MCP Protocol Compliance: Implements standard MCP prompt listing and retrieval

Installation

uv tool install --from git+https://github.com/YOUR_ORG/mcp-speckit-kiro.git mcp-speckit-kiro

Configuration for Kiro CLI

Add to ~/Library/Application Support/kiro-cli/config.json (macOS):

{
  "mcpServers": {
    "speckit": {
      "command": "mcp-speckit-kiro"
    }
  }
}

Usage Examples

# Create project constitution
/prompt speckit.constitution Create principles focused on code quality

# Define specifications
/prompt speckit.specify Build a photo album application

# Create implementation plan
/prompt speckit.plan Use React and Node.js

# Generate tasks
/prompt speckit.tasks

# Execute implementation
/prompt speckit.implement

Technical Details

Server Implementation

  • Language: Python 3.11+
  • Framework: MCP SDK (mcp>=1.1.2)
  • Transport: stdio (standard input/output)
  • Discovery: Walks up directory tree to find .kiro/prompts/

Prompt File Format

Expected format for prompt files:

---
description: "Prompt description"
---

Prompt content with $ARGUMENTS placeholder.

Available Prompts

All speckit.*.md files in .kiro/prompts/ are exposed:

  • speckit.constitution - Project governing principles
  • speckit.specify - Requirements and user stories
  • speckit.clarify - Clarify underspecified areas
  • speckit.plan - Technical implementation plans
  • speckit.tasks - Actionable task lists
  • speckit.implement - Execute implementation
  • speckit.analyze - Cross-artifact consistency analysis
  • speckit.checklist - Quality checklists

Testing

Run the test script:

cd mcp-speckit-kiro
./test-mcp.sh

Branch Information

  • Branch: feature/mcp-speckit-kiro
  • Parent Branch: feature/kiro-cli-support
  • Commit: Added MCP server implementation with documentation

Next Steps

  1. Test the MCP server with Kiro CLI
  2. Verify prompt discovery and invocation
  3. Consider adding more sophisticated argument parsing
  4. Add error handling for edge cases
  5. Create integration tests
  6. Update release workflow to include MCP server package

Documentation Updates

  • Added MCP server section to main README.md
  • Created comprehensive README for mcp-speckit-kiro package
  • Updated table of contents in main README