11 KiB
MCP.md - SuperClaude MCP Server Reference
MCP (Model Context Protocol) server integration and orchestration system for Claude Code SuperClaude framework.
Server Selection Algorithm
Priority Matrix:
- Task-Server Affinity: Match tasks to optimal servers based on capability matrix
- Performance Metrics: Server response time, success rate, resource utilization
- Context Awareness: Current persona, command depth, session state
- Load Distribution: Prevent server overload through intelligent queuing
- Fallback Readiness: Maintain backup servers for critical operations
Selection Process: Task Analysis → Server Capability Match → Performance Check → Load Assessment → Final Selection
Context7 Integration (Documentation & Research)
Purpose: Official library documentation, code examples, best practices, localization standards
Activation Patterns:
- Automatic: External library imports detected, framework-specific questions, scribe persona active
- Manual:
--c7,--context7flags - Smart: Commands detect need for official documentation patterns
Workflow Process:
- Library Detection: Scan imports, dependencies, package.json for library references
- ID Resolution: Use
resolve-library-idto find Context7-compatible library ID - Documentation Retrieval: Call
get-library-docswith specific topic focus - Pattern Extraction: Extract relevant code patterns and implementation examples
- Implementation: Apply patterns with proper attribution and version compatibility
- Validation: Verify implementation against official documentation
- Caching: Store successful patterns for session reuse
Integration Commands: /build, /analyze, /improve, /design, /document, /explain, /git
Error Recovery:
- Library not found → WebSearch for alternatives → Manual implementation
- Documentation timeout → Use cached knowledge → Note limitations
- Invalid library ID → Retry with broader search terms → Fallback to WebSearch
- Version mismatch → Find compatible version → Suggest upgrade path
- Server unavailable → Activate backup Context7 instances → Graceful degradation
Sequential Integration (Complex Analysis & Thinking)
Purpose: Multi-step problem solving, architectural analysis, systematic debugging
Activation Patterns:
- Automatic: Complex debugging scenarios, system design questions,
--thinkflags - Manual:
--seq,--sequentialflags - Smart: Multi-step problems requiring systematic analysis
Workflow Process:
- Problem Decomposition: Break complex problems into analyzable components
- Server Coordination: Coordinate with Context7 for documentation, Magic for UI insights, Playwright for testing
- Systematic Analysis: Apply structured thinking to each component
- Relationship Mapping: Identify dependencies, interactions, and feedback loops
- Hypothesis Generation: Create testable hypotheses for each component
- Evidence Gathering: Collect supporting evidence through tool usage
- Multi-Server Synthesis: Combine findings from multiple servers
- Recommendation Generation: Provide actionable next steps with priority ordering
- Validation: Check reasoning for logical consistency
Integration with Thinking Modes:
--think(4K): Module-level analysis with context awareness--think-hard(10K): System-wide analysis with architectural focus--ultrathink(32K): Critical system analysis with comprehensive coverage
Use Cases:
- Root cause analysis for complex bugs
- Performance bottleneck identification
- Architecture review and improvement planning
- Security threat modeling and vulnerability analysis
- Code quality assessment with improvement roadmaps
- Scribe Persona: Structured documentation workflows, multilingual content organization
- Loop Command: Iterative improvement analysis, progressive refinement planning
Magic Integration (UI Components & Design)
Purpose: Modern UI component generation, design system integration, responsive design
Activation Patterns:
- Automatic: UI component requests, design system queries
- Manual:
--magicflag - Smart: Frontend persona active, component-related queries
Workflow Process:
- Requirement Parsing: Extract component specifications and design system requirements
- Pattern Search: Find similar components and design patterns from 21st.dev database
- Framework Detection: Identify target framework (React, Vue, Angular) and version
- Server Coordination: Sync with Context7 for framework patterns, Sequential for complex logic
- Code Generation: Create component with modern best practices and framework conventions
- Design System Integration: Apply existing themes, styles, tokens, and design patterns
- Accessibility Compliance: Ensure WCAG compliance, semantic markup, and keyboard navigation
- Responsive Design: Implement mobile-first responsive patterns
- Optimization: Apply performance optimizations and code splitting
- Quality Assurance: Validate against design system and accessibility standards
Component Categories:
- Interactive: Buttons, forms, modals, dropdowns, navigation, search components
- Layout: Grids, containers, cards, panels, sidebars, headers, footers
- Display: Typography, images, icons, charts, tables, lists, media
- Feedback: Alerts, notifications, progress indicators, tooltips, loading states
- Input: Text fields, selectors, date pickers, file uploads, rich text editors
- Navigation: Menus, breadcrumbs, pagination, tabs, steppers
- Data: Tables, grids, lists, cards, infinite scroll, virtualization
Framework Support:
- React: Hooks, TypeScript, modern patterns, Context API, state management
- Vue: Composition API, TypeScript, reactive patterns, Pinia integration
- Angular: Component architecture, TypeScript, reactive forms, services
- Vanilla: Web Components, modern JavaScript, CSS custom properties
Playwright Integration (Browser Automation & Testing)
Purpose: Cross-browser E2E testing, performance monitoring, automation, visual testing
Activation Patterns:
- Automatic: Testing workflows, performance monitoring requests, E2E test generation
- Manual:
--play,--playwrightflags - Smart: QA persona active, browser interaction needed
Workflow Process:
- Browser Connection: Connect to Chrome, Firefox, Safari, or Edge instances
- Environment Setup: Configure viewport, user agent, network conditions, device emulation
- Navigation: Navigate to target URLs with proper waiting and error handling
- Server Coordination: Sync with Sequential for test planning, Magic for UI validation
- Interaction: Perform user actions (clicks, form fills, navigation) across browsers
- Data Collection: Capture screenshots, videos, performance metrics, console logs
- Validation: Verify expected behaviors, visual states, and performance thresholds
- Multi-Server Analysis: Coordinate with other servers for comprehensive test analysis
- Reporting: Generate test reports with evidence, metrics, and actionable insights
- Cleanup: Properly close browser connections and clean up resources
Capabilities:
- Multi-Browser Support: Chrome, Firefox, Safari, Edge with consistent API
- Visual Testing: Screenshot capture, visual regression detection, responsive testing
- Performance Metrics: Load times, rendering performance, resource usage, Core Web Vitals
- User Simulation: Real user interaction patterns, accessibility testing, form workflows
- Data Extraction: DOM content, API responses, console logs, network monitoring
- Mobile Testing: Device emulation, touch gestures, mobile-specific validation
- Parallel Execution: Run tests across multiple browsers simultaneously
Integration Patterns:
- Test Generation: Create E2E tests based on user workflows and critical paths
- Performance Monitoring: Continuous performance measurement with threshold alerting
- Visual Validation: Screenshot-based testing and regression detection
- Cross-Browser Testing: Validate functionality across all major browsers
- User Experience Testing: Accessibility validation, usability testing, conversion optimization
MCP Server Use Cases by Command Category
Development Commands:
- Context7: Framework patterns, library documentation
- Magic: UI component generation
- Sequential: Complex setup workflows
Analysis Commands:
- Context7: Best practices, patterns
- Sequential: Deep analysis, systematic review
- Playwright: Issue reproduction, visual testing
Quality Commands:
- Context7: Security patterns, improvement patterns
- Sequential: Code analysis, cleanup strategies
Testing Commands:
- Sequential: Test strategy development
- Playwright: E2E test execution, visual regression
Documentation Commands:
- Context7: Documentation patterns, style guides, localization standards
- Sequential: Content analysis, structured writing, multilingual documentation workflows
- Scribe Persona: Professional writing with cultural adaptation and language-specific conventions
Planning Commands:
- Context7: Benchmarks and patterns
- Sequential: Complex planning and estimation
Deployment Commands:
- Sequential: Deployment planning
- Playwright: Deployment validation
Meta Commands:
- Sequential: Search intelligence, task orchestration, iterative improvement analysis
- All MCP: Comprehensive analysis and orchestration
- Loop Command: Iterative workflows with Sequential (primary) and Context7 (patterns)
Server Orchestration Patterns
Multi-Server Coordination:
- Task Distribution: Intelligent task splitting across servers based on capabilities
- Dependency Management: Handle inter-server dependencies and data flow
- Synchronization: Coordinate server responses for unified solutions
- Load Balancing: Distribute workload based on server performance and capacity
- Failover Management: Automatic failover to backup servers during outages
Caching Strategies:
- Context7 Cache: Documentation lookups with version-aware caching
- Sequential Cache: Analysis results with pattern matching
- Magic Cache: Component patterns with design system versioning
- Playwright Cache: Test results and screenshots with environment-specific caching
- Cross-Server Cache: Shared cache for multi-server operations
- Loop Optimization: Cache iterative analysis results, reuse improvement patterns
Error Handling and Recovery:
- Context7 unavailable → WebSearch for documentation → Manual implementation
- Sequential timeout → Use native Claude Code analysis → Note limitations
- Magic failure → Generate basic component → Suggest manual enhancement
- Playwright connection lost → Suggest manual testing → Provide test cases
Recovery Strategies:
- Exponential Backoff: Automatic retry with exponential backoff and jitter
- Circuit Breaker: Prevent cascading failures with circuit breaker pattern
- Graceful Degradation: Maintain core functionality when servers are unavailable
- Alternative Routing: Route requests to backup servers automatically
- Partial Result Handling: Process and utilize partial results from failed operations
Integration Patterns:
- Minimal Start: Start with minimal MCP usage and expand based on needs
- Progressive Enhancement: Progressively enhance with additional servers
- Result Combination: Combine MCP results for comprehensive solutions
- Graceful Fallback: Fallback gracefully when servers unavailable
- Loop Integration: Sequential for iterative analysis, Context7 for improvement patterns
- Dependency Orchestration: Manage inter-server dependencies and data flow