prompt.md•12.3 kB
# Build Shannon MCP Server Using Multi-Agent System
## CRITICAL REQUIREMENTS
1. **USE SEQUENTIAL THINKING MCP**: You MUST use the sequential thinking MCP with a MINIMUM of 100 thoughts for planning and complex problem solving
2. **USE TODOWRITE TOOL**: You MUST track EVERY single task and subtask using the TodoWrite tool - mark tasks as in_progress when starting and completed when done
3. **FOLLOW ALL 125+ TASKS**: You MUST implement every single task and subtask from the specification - no shortcuts
## Mission
You are to coordinate the 26 specialized agents installed in this project to build the Claude Code MCP Server according to the specification in `docs/claude-code-mcp-specification.md`. This is a comprehensive implementation requiring careful planning, systematic execution, and thorough tracking.
## Available Agents
You have 26 specialized agents at your disposal:
### Core Architecture (4)
- `architecture-agent` - System design
- `claude-code-sdk-expert` - Claude CLI expertise
- `python-mcp-server-expert` - MCP protocol
- `functional-mcp-server` - Business logic
### Infrastructure (7)
- `database-storage` - SQLite & CAS
- `streaming-concurrency` - Async patterns
- `jsonl-streaming` - JSONL parsing
- `process-management` - Process monitoring
- `filesystem-monitor` - File watching
- `platform-compatibility` - Cross-platform
- `storage-algorithms` - Content addressing
### Quality & Security (6)
- `security-validation` - Input validation
- `testing-quality` - Test implementation
- `error-handling` - Error recovery
- `performance-optimizer` - Performance tuning
- `documentation` - Technical docs
- `devops-deployment` - CI/CD
### Specialized (9)
- `telemetry-otel` - OpenTelemetry
- `analytics-monitoring` - Usage analytics
- `integration-specialist` - Integrations
- `project-coordinator` - Project management
- `migration-specialist` - Migrations
- `sse-transport` - Server-Sent Events
- `resources-specialist` - MCP resources
- `prompts-engineer` - Prompt templates
- `plugin-architect` - Plugin system
## Orchestration Commands
Use these commands to coordinate the build:
1. **Initialize the project:**
```
/mcp-build-orchestrator init --project-path ~/shannon-mcp
```
2. **Check agent status:**
```
/mcp-agent-progress status --detailed
```
3. **Access shared knowledge:**
```
/mcp-shared-memory search --query "implementation patterns"
```
4. **Start component implementation:**
```
/mcp-implement-binary-manager start
/mcp-implement-session-manager start
/mcp-implement-analytics start
```
## Build Process
### Phase 1: Core Infrastructure
1. Use `/mcp-build-orchestrator plan --phase 1` to generate the task list
2. The Architecture Agent will design the system structure
3. Python MCP Expert will set up the FastMCP foundation
4. Binary Manager implementation (Task 3)
5. Session Manager with streaming (Tasks 4-5)
### Phase 2: Advanced Features
1. Agent system implementation (Task 6)
2. MCP server management (Task 7)
3. Checkpoint system with CAS (Task 8)
4. Hooks framework (Task 9)
5. Slash commands (Task 10)
### Phase 3: Analytics & Monitoring
1. Analytics engine (Task 11)
2. Process registry (Task 12)
3. Settings management (Task 13)
4. Telemetry implementation
### Phase 4: Testing & Documentation
1. Integration testing
2. API documentation
3. Usage examples
4. Deployment guide
## Key Implementation Details
### Directory Structure
```
shannon-mcp/
├── src/
│ └── shannon_mcp/
│ ├── __init__.py
│ ├── server.py # Main MCP server
│ ├── managers/ # Component managers
│ ├── models/ # Data models
│ ├── storage/ # Storage implementations
│ └── utils/ # Utilities
├── tests/
│ ├── unit/
│ ├── integration/
│ └── e2e/
├── docs/ # Already exists
├── pyproject.toml # Poetry configuration
└── README.md # Already exists
```
### Critical Requirements
1. **Async-first**: Use asyncio throughout
2. **FastMCP pattern**: Follow MCP SDK patterns
3. **JSONL streaming**: Handle backpressure
4. **Content-addressable storage**: SHA-256 + Zstd
5. **Cross-platform**: Support Linux/macOS/Windows
## Agent Collaboration Pattern
Agents should:
1. Share discoveries via `/mcp-shared-memory store`
2. Check existing knowledge before implementing
3. Request reviews from relevant agents
4. Update progress regularly
5. Document decisions and rationale
## Success Criteria
The implementation is complete when:
1. All 125+ subtasks from the specification are implemented
2. Integration tests pass
3. Documentation is comprehensive
4. Performance benchmarks meet targets
5. Security review passes
6. Cross-platform compatibility verified
## Complete Task List (125+ Tasks)
### Phase 1: Core Infrastructure (25 tasks)
**Task 1: Project Setup**
- [ ] 1.1: Initialize Python project with Poetry
- [ ] 1.2: Configure pyproject.toml with dependencies
- [ ] 1.3: Set up pre-commit hooks and linting
- [ ] 1.4: Create directory structure
- [ ] 1.5: Implement logging configuration
- [ ] 1.6: Add MIT license and README
**Task 2: MCP Server Foundation**
- [ ] 2.1: Implement FastMCP server initialization
- [ ] 2.2: Create base manager abstract class
- [ ] 2.3: Implement error handling framework
- [ ] 2.4: Add notification system
- [ ] 2.5: Create configuration loader
- [ ] 2.6: Implement graceful shutdown
**Task 3: Binary Manager**
- [ ] 3.1: Implement which command discovery
- [ ] 3.2: Add NVM path checking
- [ ] 3.3: Implement standard path search
- [ ] 3.4: Create version parsing logic
- [ ] 3.5: Add database persistence
- [ ] 3.6: Implement update checking
**Task 4: Session Manager Core**
- [ ] 4.1: Create subprocess execution wrapper
- [ ] 4.2: Implement JSONL stream parser
- [ ] 4.3: Add message type handlers
- [ ] 4.4: Create session caching logic
- [ ] 4.5: Implement cancellation system
- [ ] 4.6: Add timeout handling
**Task 5: Streaming Architecture**
- [ ] 5.1: Implement async stream reader
- [ ] 5.2: Add backpressure handling
- [ ] 5.3: Create message buffering
- [ ] 5.4: Implement notification forwarding
- [ ] 5.5: Add metrics extraction
- [ ] 5.6: Create error recovery
### Phase 2: Advanced Features (25 tasks)
**Task 6: Agent System**
- [ ] 6.1: Create agent database schema
- [ ] 6.2: Implement CRUD operations
- [ ] 6.3: Add execution tracking
- [ ] 6.4: Create GitHub import logic
- [ ] 6.5: Implement metrics collection
- [ ] 6.6: Add category management
**Task 7: MCP Server Management**
- [ ] 7.1: Implement STDIO transport
- [ ] 7.2: Add SSE transport support
- [ ] 7.3: Create connection testing
- [ ] 7.4: Implement config import
- [ ] 7.5: Add server discovery
- [ ] 7.6: Create health monitoring
**Task 8: Checkpoint System**
- [ ] 8.1: Implement content-addressable storage
- [ ] 8.2: Add Zstd compression
- [ ] 8.3: Create timeline management
- [ ] 8.4: Implement restore logic
- [ ] 8.5: Add branching support
- [ ] 8.6: Create cleanup routines
**Task 9: Hooks Framework**
- [ ] 9.1: Create hook configuration schema
- [ ] 9.2: Implement config merging logic
- [ ] 9.3: Add command validation
- [ ] 9.4: Create execution engine
- [ ] 9.5: Implement timeout handling
- [ ] 9.6: Add template system
**Task 10: Slash Commands**
- [ ] 10.1: Create markdown parser
- [ ] 10.2: Implement frontmatter extraction
- [ ] 10.3: Add command registry
- [ ] 10.4: Create execution framework
- [ ] 10.5: Implement categorization
- [ ] 10.6: Add command validation
### Phase 3: Analytics & Monitoring (15 tasks)
**Task 11: Analytics Engine**
- [ ] 11.1: Create JSONL writer
- [ ] 11.2: Implement metrics parser
- [ ] 11.3: Add aggregation logic
- [ ] 11.4: Create report generator
- [ ] 11.5: Implement data cleanup
- [ ] 11.6: Add export functionality
**Task 12: Process Registry**
- [ ] 12.1: Create registry storage
- [ ] 12.2: Implement PID tracking
- [ ] 12.3: Add process validation
- [ ] 12.4: Create cleanup routines
- [ ] 12.5: Implement resource monitoring
**Task 13: Settings Management**
- [ ] 13.1: Create settings schema
- [ ] 13.2: Implement file watchers
- [ ] 13.3: Add validation logic
- [ ] 13.4: Create migration system
- [ ] 13.5: Implement defaults handling
### Phase 4: Testing & Documentation (10 tasks)
**Task 14: Integration Testing**
- [ ] 14.1: Set up test infrastructure
- [ ] 14.2: Create fixture generators
- [ ] 14.3: Implement streaming tests
- [ ] 14.4: Add performance benchmarks
- [ ] 14.5: Create error scenario tests
**Task 15: Documentation**
- [ ] 15.1: Write API documentation
- [ ] 15.2: Create usage examples
- [ ] 15.3: Add troubleshooting guide
- [ ] 15.4: Write deployment docs
- [ ] 15.5: Create video tutorials
### Phase 5: Production Readiness (10 tasks)
**Task 16: Performance Optimization**
- [ ] 16.1: Profile critical paths
- [ ] 16.2: Optimize database queries
- [ ] 16.3: Implement caching layers
- [ ] 16.4: Add connection pooling
- [ ] 16.5: Optimize file operations
**Task 17: Security Hardening**
- [ ] 17.1: Implement input validation
- [ ] 17.2: Add command sanitization
- [ ] 17.3: Create audit logging
- [ ] 17.4: Implement rate limiting
- [ ] 17.5: Add encryption support
**Task 18: Deployment Pipeline**
- [ ] 18.1: Create GitHub Actions workflow
- [ ] 18.2: Set up PyPI publishing
- [ ] 18.3: Implement version tagging
- [ ] 18.4: Add changelog generation
- [ ] 18.5: Create release automation
**Task 19: Monitoring & Telemetry**
- [ ] 19.1: Add health check endpoints
- [ ] 19.2: Implement metrics collection
- [ ] 19.3: Create dashboard templates
- [ ] 19.4: Add alerting rules
- [ ] 19.5: Implement distributed tracing
**Task 20: Community & Support**
- [ ] 20.1: Create issue templates
- [ ] 20.2: Set up discussion forums
- [ ] 20.3: Write contribution guide
- [ ] 20.4: Create plugin system
- [ ] 20.5: Implement feedback collection
### Phase 6: Advanced Integration (10 tasks)
**Task 21: Claude Desktop Integration**
- [ ] 21.1: Create auto-configuration script
- [ ] 21.2: Implement config validation
- [ ] 21.3: Add migration tools
- [ ] 21.4: Create compatibility layer
- [ ] 21.5: Implement feature detection
**Task 22: Cloud Integration**
- [ ] 22.1: Add S3 checkpoint storage
- [ ] 22.2: Implement cloud MCP servers
- [ ] 22.3: Create distributed locking
- [ ] 22.4: Add cloud analytics
- [ ] 22.5: Implement multi-region support
**Task 23: Enterprise Features**
- [ ] 23.1: Add LDAP authentication
- [ ] 23.2: Implement audit compliance
- [ ] 23.3: Create team management
- [ ] 23.4: Add usage quotas
- [ ] 23.5: Implement SSO support
**Task 24: AI Enhancement**
- [ ] 24.1: Add intelligent checkpointing
- [ ] 24.2: Implement smart suggestions
- [ ] 24.3: Create pattern recognition
- [ ] 24.4: Add anomaly detection
- [ ] 24.5: Implement predictive caching
**Task 25: Ecosystem Development**
- [ ] 25.1: Create plugin SDK
- [ ] 25.2: Implement marketplace
- [ ] 25.3: Add template library
- [ ] 25.4: Create integration hub
- [ ] 25.5: Implement community sharing
## Tracking Requirements
**MANDATORY: Use TodoWrite for EVERY task**
- Before starting any task: Mark it as 'in_progress' in TodoWrite
- After completing any task: Mark it as 'completed' in TodoWrite
- Track both main tasks (Task 1-25) and ALL subtasks (1.1-25.5)
- Update progress regularly to maintain visibility
**MANDATORY: Use Sequential Thinking MCP**
- For initial planning: Use 100+ thoughts minimum
- For complex components: Use 50+ thoughts minimum
- For problem solving: Use as many thoughts as needed
- Document key decisions and rationale
## Start Building
Begin by:
1. Using sequential thinking MCP with 100+ thoughts to plan the overall approach
2. Initializing the TodoWrite list with all 125+ tasks
3. Starting with Task 1.1 and marking it as in_progress
4. Using the orchestrator to coordinate agent activities
Remember:
- The agents have shared memory and can learn from each other
- Every single task must be tracked with TodoWrite
- Complex problems require sequential thinking
- No shortcuts - implement all 125+ tasks thoroughly
The future of AI-driven development starts here. Build systematically, track everything, think deeply.