A teaching-focused MCP Server showcasing Director Mode concepts: TDD, Auto-Cycle, and SpecKit
Director Mode is a development methodology that emphasizes:
- TDD (Test-Driven Development): Red-Green-Refactor cycle
- Auto-Cycle: Automated 5-step development workflow
- SpecKit: Specification-driven development
This MCP Server serves as a teaching example for building production-ready MCP servers while demonstrating these concepts.
By studying this project, you will learn:
-
How to build an MCP Server from scratch
- MCP SDK usage
- Tool development
- Resource management
- Best practices
-
Director Mode Methodologies
- TDD workflow implementation
- Auto-Cycle automation concepts
- SpecKit specification practices
-
Production-Ready Code
- TypeScript best practices
- Comprehensive testing
- Clear documentation
- Extensible architecture
# Install dependencies
npm install
# Build the project
npm run build
# Start the server
npm startAdd to your Claude MCP configuration (~/.claude/settings.json or project-level .claude/settings.json):
{
"mcpServers": {
"director-mode": {
"command": "node",
"args": ["/path/to/mcp-director-mode-server/dist/index.js"]
}
}
}Once configured, you can use these tools in Claude:
# Check TDD status
Use the check_tdd_status tool to see your current TDD cycle state
# Get TDD guidance
Use suggest_tdd_next_step to get guidance for your current phase
# Run Auto-Cycle
Use run_cycle_step to execute Auto-Cycle workflow steps
# Validate specifications
Use validate_spec to check your specification documents| Tool | Description |
|---|---|
check_tdd_status |
Check current TDD cycle state (RED/GREEN/REFACTOR) |
suggest_tdd_next_step |
Get guidance for the next TDD step |
validate_refactor |
Validate that refactoring maintains test integrity |
| Tool | Description |
|---|---|
run_cycle_step |
Execute a specific Auto-Cycle step |
check_cycle_progress |
Check overall Auto-Cycle progress |
generate_cycle_report |
Generate comprehensive cycle report |
| Tool | Description |
|---|---|
validate_spec |
Validate specification for completeness |
generate_tasks |
Break down spec into executable tasks |
check_compliance |
Verify implementation matches specification |
| Resource | Description |
|---|---|
director-mode://project/state |
Current project state |
director-mode://project/metrics |
Quality metrics |
director-mode://cycle/history |
Auto-Cycle history |
mcp-director-mode-server/
├── src/
│ ├── index.ts # MCP Server entry point
│ ├── types/ # TypeScript type definitions
│ ├── tools/ # MCP Tool implementations
│ │ ├── tdd/ # TDD tools
│ │ ├── cycle/ # Auto-Cycle tools
│ │ └── spec/ # SpecKit tools
│ └── resources/ # Resource providers
├── tests/ # Test files
├── examples/ # Usage examples
├── docs/ # Additional documentation
└── package.json
See the examples/ directory for detailed usage examples:
- Basic Usage - Getting started
- TDD Workflow - TDD in practice
- Auto-Cycle Demo - Auto-Cycle workflow
# Run tests
npm test
# Run with coverage
npm run test:coverage
# Run in watch mode
npm test -- --watchThis is a teaching project. We welcome contributions that:
- Improve code quality and clarity
- Add better examples and documentation
- Fix bugs or issues
- Enhance the teaching value
Please see CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details.
- Claude World Taiwan - Director Mode methodology
- Anthropic - Claude and MCP
- The MCP community - Examples and best practices
Made with ❤️ by Claude World Taiwan