spenceriam/kat-planner-mcp
If you are the rightful owner of kat-planner-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
KAT-PLANNER is an MCP server designed to automate spec-driven development workflows, optimizing them for AI-assisted coding.
KAT-PLANNER
An MCP (Model Context Protocol) server that automates spec-driven development workflows for AI-assisted coding. Transform your ideas into comprehensive, LLM-optimized specification documents.
Built for the KwaiKAT AI Dev Challenge using KAT-Coder-Pro V1.
What's New: Slash Commands System
This implementation now features a structured slash commands system that provides clear, step-by-step workflow guidance for LLMs. Instead of relying on tool descriptions alone, the MCP server now offers explicit slash commands that the LLM can follow to ensure proper interactive planning.
Key Benefits:
- Clear command-driven workflow prevents LLM from jumping ahead
- Structured guidance through each planning phase
- MCP resource-based approach guides LLM behavior without forcing
- Prevents LLM from starting implementation before proper planning
Quick Start
1. Clone and Install
git clone https://github.com/spenceriam/kat-planner-mcp.git
cd kat-planner-mcp
npm install
npm run build
2. Configure MCP Tool
Add kat-planner to your tool's MCP configuration:
Slash Commands Server (Recommended)
For the new slash commands system, use the dedicated server:
{
"mcpServers": {
"kat-planner-slash": {
"command": "node",
"args": ["/absolute/path/to/kat-planner-mcp/dist/server-slash.js"],
"env": {}
}
}
}
Note: The slash commands server provides structured workflow guidance through MCP resources instead of forcing the LLM through tool descriptions.
Claude Desktop Configuration
Official Documentation: Claude Desktop MCP Setup
Edit your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json(if available)
Add the following configuration:
{
"mcpServers": {
"kat-planner": {
"command": "node",
"args": ["/absolute/path/to/kat-planner-mcp/dist/index.js"],
"env": {}
}
}
}
Important Notes:
- Use absolute paths (not relative)
- Create the file if it doesn't exist
- Restart Claude Desktop completely after configuration (Cmd+Q or right-click system tray → Quit)
Claude Code Configuration
Official Documentation: Claude Code MCP Setup
Claude Code uses the same configuration format as Claude Desktop. Edit your Claude Code configuration file:
{
"mcpServers": {
"kat-planner": {
"command": "node",
"args": ["/absolute/path/to/kat-planner-mcp/dist/index.js"],
"env": {}
}
}
}
File Location:
- Configuration file location may vary - check Claude Code documentation for specific path
VSCode Configuration
Documentation: MCP support in VSCode is evolving. Check the VSCode marketplace for MCP extensions.
For VSCode with MCP extensions, add to your settings.json:
{
"mcp.servers": {
"kat-planner": {
"command": "node",
"args": ["/absolute/path/to/kat-planner-mcp/dist/index.js"]
}
}
}
Alternative Method:
Add to your workspace settings (/.vscode/settings.json):
{
"mcp.servers": {
"kat-planner": {
"command": "node",
"args": ["${workspaceFolder}/dist/index.js"]
}
}
}
Note: MCP ecosystem in VSCode is rapidly evolving. Check the VSCode marketplace for the latest MCP extensions.
Cursor IDE Configuration
Documentation: Cursor IDE has built-in MCP support. Check Cursor documentation for latest configuration details.
For Cursor IDE, add to your MCP configuration file (location varies by platform):
{
"mcpServers": {
"kat-planner": {
"command": "node",
"args": ["/absolute/path/to/kat-planner-mcp/dist/index.js"],
"env": {}
}
}
}
File Locations:
- Check Cursor documentation for your specific platform
- Common locations:
~/.cursor/or~/Library/Application Support/Cursor/
Windsurf Configuration
Documentation: Windsurf is a newer terminal interface with evolving MCP support. Check Windsurf documentation for latest configuration.
For Windsurf, add to your MCP configuration:
{
"mcpServers": {
"kat-planner": {
"command": "node",
"args": ["/absolute/path/to/kat-planner-mcp/dist/index.js"],
"env": {}
}
}
}
Configuration File:
- Location varies by platform - check Windsurf documentation
- Typically found in user configuration directories
Warp.dev Configuration
Documentation: Warp.dev terminal is actively developing MCP support. Check Warp.dev documentation for current configuration methods.
For Warp.dev, configuration may use:
{
"mcpServers": {
"kat-planner": {
"command": "node",
"args": ["/absolute/path/to/kat-planner-mcp/dist/index.js"],
"env": {}
}
}
}
Configuration Methods:
- Check Warp.dev settings or configuration files
- May support both JSON config and environment variables
Generic MCP Configuration
Official Documentation: MCP Protocol Specification
For any MCP-compatible tool, use this standard configuration format:
{
"mcpServers": {
"kat-planner": {
"command": "node",
"args": ["/absolute/path/to/kat-planner-mcp/dist/index.js"],
"env": {}
}
}
}
Configuration Guidelines:
- Replace the path with your actual project path
- Ensure Node.js is in your system PATH
- Use absolute paths for reliability
- Check your tool's documentation for specific file locations
For Development (Hot Reload)
{
"mcpServers": {
"kat-planner": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/kat-planner-mcp/src/index.ts"]
}
}
}
3. Restart Your Tool
Restart your MCP-compatible development tool to load the server configuration.
Slash Commands Usage
The slash commands system provides structured workflow guidance. When using the kat-planner-slash server, the LLM will have access to MCP resources that guide it through the proper planning sequence.
How to Use Slash Commands
IMPORTANT: The slash commands are NOT for you (the user) to type directly. They are for the LLM to call internally as part of the structured workflow. You simply provide your project idea, and the LLM will automatically use the appropriate slash commands in the correct sequence.
Available Slash Commands
Planning Phase
/plan_project- Start interactive project planning workflow/refine_requirements- Refine project requirements through interactive questioning/analyze_project- Analyze existing project structure and codebase
Specification Phase
/generate_specification- Generate comprehensive specification documents/enhance_specification- Enhance existing project specification with new requirements
Implementation Planning Phase
/plan_implementation- Create detailed implementation plan with phases and tasks/plan_enhancement- Plan enhancement implementation for existing projects
Quality Assurance Phase
/generate_tests- Generate comprehensive test specifications and test cases/generate_enhancement_tests- Generate tests for enhanced functionality
Documentation Phase
/create_documentation- Create project documentation and user guides
Review Phase
/final_review- Final review and approval of all planning documents
Implementation Phase
/start_implementation- Begin actual implementation after planning approval
Utilities
/help- Show available slash commands and usage instructions/workflow_status- Show current workflow state and next required actions
Workflow Sequence
The LLM MUST follow this exact sequence:
- Start with
/plan_project- Begin project planning with your idea - Use
/refine_requirements- Go through interactive requirement refinement - Call
/generate_specification- Create comprehensive specification documents - Execute
/plan_implementation- Generate detailed implementation plan - Run
/generate_tests- Create test specifications - Complete
/final_review- Get approval before implementation - Only then use
/start_implementation- Begin actual coding
Critical Rules for LLM
🚨 MANDATORY: You MUST use slash commands in the exact order above
🚨 MANDATORY: You MUST get user approval at each stage before proceeding
🚨 MANDATORY: You MUST NOT start implementation until /final_review is completed
🚨 MANDATORY: You MUST NOT create files or code until /start_implementation is called
Complete User Examples
Example 1: New Project
What you should type in your MCP-compatible tool:
I want to build a task management app with voice input. The app should help users create tasks using voice commands, organize them by priority, and provide daily summaries. Please use the kat-planner MCP to plan this new project out.
What happens automatically:
- LLM calls
/plan_projectwith your idea - LLM calls
/refine_requirementsto ask clarifying questions - LLM waits for your answers before proceeding
- LLM calls
/generate_specificationafter approval - LLM continues through the complete workflow
Example 2: Existing Project Enhancement
What you should type in your MCP-compatible tool:
I have an existing task management app (see the codebase) and I want to add real-time collaboration features. Users should be able to share task lists, see real-time updates when collaborators make changes, and chat within the app. Please use the kat-planner MCP to plan this enhancement.
What happens automatically:
- LLM calls
/plan_projectwith your enhancement idea - LLM calls
/analyze_projectto examine existing codebase - LLM calls
/refine_requirementsto clarify enhancement details - LLM waits for your approval before proceeding
- LLM calls
/enhance_specificationto update existing documents - LLM continues through the appropriate workflow
Example 3: Bug Fix Planning
What you should type in your MCP-compatible tool:
I'm working on a web application and there's a critical bug where user authentication times out after 5 minutes of inactivity, but it should stay active for at least 30 minutes. The app is built with React frontend and Node.js backend. Please use the kat-planner MCP to plan how to fix this bug.
What happens automatically:
- LLM calls
/plan_projectwith your bug fix request - LLM calls
/analyze_projectto examine the existing codebase structure - LLM calls
/refine_requirementsto understand the authentication system - LLM waits for your input before proceeding
- LLM calls
/generate_specificationto create a detailed bug fix plan
What NOT to Do
❌ DO NOT type slash commands directly:
/plan_project I want to build an app
❌ DO NOT try to skip steps in the workflow:
Please generate the specification documents for my new app idea
❌ DO NOT ask for implementation before planning:
Please start implementing a task management app for me
Proper Context Examples
Good: Providing Context Before Planning
I'm working on a personal project to build a habit tracking app. I have some initial ideas but need help planning it properly. The app should help users track daily habits, provide streaks and reminders, and show progress over time. I'm thinking of using React Native for mobile development. Please use the kat-planner MCP to help me plan this project systematically.
Good: Referencing Existing Code
Looking at this existing codebase, I can see we have a basic note-taking app built with Vue.js and Firebase. I want to enhance it by adding collaborative features, markdown support, and offline functionality. The current app allows users to create and save notes, but lacks advanced features. Please use the kat-planner MCP to plan these enhancements.
Good: Clear Problem Statement
I'm facing a performance issue with my e-commerce website. The product listing page takes 8+ seconds to load when there are more than 100 products, which is causing users to leave the site. The backend is built with Python/Django and uses PostgreSQL. Please use the kat-planner MCP to plan how to optimize this performance issue.
Where to Use This
In your MCP-compatible development tool (Claude Code, Claude Desktop, Cursor, etc.):
- Start a new conversation or open an existing project
- Provide your project idea with context (like the examples above)
- The LLM will automatically use the appropriate slash commands in the correct sequence
- You will be prompted for input at each interactive stage
- You provide approval to proceed to the next stage
The slash commands are completely transparent to you - you just provide your project idea and the LLM handles the rest automatically through the structured workflow.
Usage
Slash Commands Approach (Recommended)
For Users: Simply provide your project idea with context, and the LLM will automatically use the appropriate slash commands:
I want to build a task management app with voice input. The app should help users create tasks using voice commands, organize them by priority, and provide daily summaries. Please use the kat-planner MCP to plan this new project out.
What the LLM does automatically:
- Uses
/plan_projectto start the workflow - Uses
/refine_requirementsto ask clarifying questions - Waits for your approval before proceeding to
/generate_specification - Continues through the complete planning sequence
- Only uses
/start_implementationafter all planning is approved
Traditional Approach
For the original server (without slash commands):
New Project
I want to build a task management app with voice input. Please use kat-planner MCP to plan this new project out.
Enhance Existing Project
I need to add real-time collaboration to this app. Please use kat-planner MCP to plan out the steps.
Bug Fix Planning
There's an issue with user authentication timing out. Please use kat-planner MCP to plan the fix.
How It Works
- Refinement Phase: The tool asks clarifying questions to understand your requirements
- Approval Checkpoint: Review the refined specification before proceeding
- Document Generation: Creates a
.specfolder with:requirements.md- Functional requirements and user storiesdesign.md- Technical architecture and UI/UX specstasks.md- BMAD-method task breakdownAGENTS.md- Project brain/progress tracker (at root)
Project Structure
your-project/
├── AGENTS.md # Project overview and progress tracking
└── .spec/
├── requirements.md # Functional PRD
├── design.md # Technical + UI/UX design
└── tasks.md # Granular task breakdown
Tools Provided
refinement_tool
Intelligently refines your project idea through conversational Q&A, adapting its approach based on whether you're starting fresh or enhancing existing code.
sdd_gen
Generates comprehensive specification documents following spec-driven development best practices, optimized for consumption by AI coding assistants.
sdd_testing (optional)
Creates test specifications based on your requirements and design documents.
Development
Running Tests
npm test
Testing Slash Commands
To test the slash commands implementation:
# Test slash commands functionality
node test-slash-commands.mjs
# Build and test slash commands server
npm run build
node dist/server-slash.js
Development Mode
npm run dev
Building for Production
npm run build
Troubleshooting
Server Not Connecting
- Ensure the path in your config is absolute, not relative
- Check that Node.js is installed:
node --version - Verify the build completed: Check for
dist/index.js - Check tool logs for error messages
Permission Errors
On macOS/Linux, make the file executable:
chmod +x dist/index.js
Tool Not Appearing
- Restart your MCP-compatible tool completely
- Check the configuration file for JSON syntax errors
- Ensure there are no other MCP servers with the same name
License
MIT
Links
Author
Spencer
- X/Twitter: @spencer_i_am
- GitHub: spenceriam