* fix(orchestration): add WebFetch auto-trigger for infrastructure configuration Problem: Infrastructure configuration changes (e.g., Traefik port settings) were being made based on assumptions without consulting official documentation, violating the 'Evidence > assumptions' principle in PRINCIPLES.md. Solution: - Added Infrastructure Configuration Validation section to MODE_Orchestration.md - Auto-triggers WebFetch for infrastructure tools (Traefik, nginx, Docker, etc.) - Enforces MODE_DeepResearch activation for investigation - BLOCKS assumption-based configuration changes Testing: Verified WebFetch successfully retrieves Traefik official docs (port 80 default) This prevents production outages from infrastructure misconfiguration by ensuring all technical recommendations are backed by official documentation. * feat: Add PM Agent (Project Manager Agent) for seamless orchestration Introduces PM Agent as the default orchestration layer that coordinates all sub-agents and manages workflows automatically. Key Features: - Default orchestration: All user interactions handled by PM Agent - Auto-delegation: Intelligent sub-agent selection based on task analysis - Docker Gateway integration: Zero-token baseline with dynamic MCP loading - Self-improvement loop: Automatic documentation of patterns and mistakes - Optional override: Users can specify sub-agents explicitly if desired Architecture: - Agent spec: SuperClaude/Agents/pm-agent.md - Command: SuperClaude/Commands/pm.md - Updated docs: README.md (15→16 agents), agents.md (new Orchestration category) User Experience: - Default: PM Agent handles everything (seamless, no manual routing) - Optional: Explicit --agent flag for direct sub-agent access - Both modes available simultaneously (no user downside) Implementation Status: - ✅ Specification complete - ✅ Documentation complete - ⏳ Prototype implementation needed - ⏳ Docker Gateway integration needed - ⏳ Testing and validation needed Refs: kazukinakai/docker-mcp-gateway (IRIS MCP Gateway integration) * feat: Add Agent Orchestration rules for PM Agent default activation Implements PM Agent as the default orchestration layer in RULES.md. Key Changes: - New 'Agent Orchestration' section (CRITICAL priority) - PM Agent receives ALL user requests by default - Manual override with @agent-[name] bypasses PM Agent - Agent Selection Priority clearly defined: 1. Manual override → Direct routing 2. Default → PM Agent → Auto-delegation 3. Delegation based on keywords, file types, complexity, context User Experience: - Default: PM Agent handles everything (seamless) - Override: @agent-[name] for direct specialist access - Transparent: PM Agent reports delegation decisions This establishes PM Agent as the orchestration layer while respecting existing auto-activation patterns and manual overrides. Next Steps: - Local testing in agiletec project - Iteration based on actual behavior - Documentation updates as needed * refactor(pm-agent): redesign as self-improvement meta-layer Problem Resolution: PM Agent's initial design competed with existing auto-activation for task routing, creating confusion about orchestration responsibilities and adding unnecessary complexity. Design Change: Redefined PM Agent as a meta-layer agent that operates AFTER specialist agents complete tasks, focusing on: - Post-implementation documentation and pattern recording - Immediate mistake analysis with prevention checklists - Monthly documentation maintenance and noise reduction - Pattern extraction and knowledge synthesis Two-Layer Orchestration System: 1. Task Execution Layer: Existing auto-activation handles task routing (unchanged) 2. Self-Improvement Layer: PM Agent meta-layer handles documentation (new) Files Modified: - SuperClaude/Agents/pm-agent.md: Complete rewrite with meta-layer design - Category: orchestration → meta - Triggers: All user interactions → Post-implementation, mistakes, monthly - Behavioral Mindset: Continuous learning system - Self-Improvement Workflow: BEFORE/DURING/AFTER/MISTAKE RECOVERY/MAINTENANCE - SuperClaude/Core/RULES.md: Agent Orchestration section updated - Split into Task Execution Layer + Self-Improvement Layer - Added orchestration flow diagram - Clarified PM Agent activates AFTER task completion - README.md: Updated PM Agent description - "orchestrates all interactions" → "ensures continuous learning" - Docs/User-Guide/agents.md: PM Agent section rewritten - Section: Orchestration Agent → Meta-Layer Agent - Expertise: Project orchestration → Self-improvement workflow executor - Examples: Task coordination → Post-implementation documentation - PR_DOCUMENTATION.md: Comprehensive PR documentation added - Summary, motivation, changes, testing, breaking changes - Two-layer orchestration system diagram - Verification checklist Integration Validated: Tested with agiletec project's self-improvement-workflow.md: ✅ PM Agent aligns with existing BEFORE/DURING/AFTER/MISTAKE RECOVERY phases ✅ Complements (not competes with) existing workflow ✅ agiletec workflow defines WHAT, PM Agent defines WHO executes it Breaking Changes: None - Existing auto-activation continues unchanged - Specialist agents unaffected - User workflows remain the same - New capability: Automatic documentation and knowledge maintenance Value Proposition: Transforms SuperClaude into a continuously learning system that accumulates knowledge, prevents recurring mistakes, and maintains fresh documentation without manual intervention. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * docs: add Claude Code conversation history management research Research covering .jsonl file structure, performance impact, and retention policies. Content: - Claude Code .jsonl file format and message types - Performance issues from GitHub (memory leaks, conversation compaction) - Retention policies (consumer vs enterprise) - Rotation recommendations based on actual data - File history snapshot tracking mechanics Source: Moved from agiletec project (research applicable to all Claude Code projects) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: add Development documentation structure Phase 1: Documentation Structure complete - Add Docs/Development/ directory for development documentation - Add ARCHITECTURE.md - System architecture with PM Agent meta-layer - Add ROADMAP.md - 5-phase development plan with checkboxes - Add TASKS.md - Daily task tracking with progress indicators - Add PROJECT_STATUS.md - Current status dashboard and metrics - Add pm-agent-integration.md - Implementation guide for PM Agent mode This establishes comprehensive documentation foundation for: - System architecture understanding - Development planning and tracking - Implementation guidance - Progress visibility Related: #pm-agent-mode #documentation #phase-1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat: PM Agent session lifecycle and PDCA implementation Phase 2: PM Agent Mode Integration (Design Phase) Commands/pm.md updates: - Add "Always-Active Foundation Layer" concept - Add Session Lifecycle (Session Start/During Work/Session End) - Add PDCA Cycle (Plan/Do/Check/Act) automation - Add Serena MCP Memory Integration (list/read/write_memory) - Document auto-activation triggers Agents/pm-agent.md updates: - Add Session Start Protocol (MANDATORY auto-activation) - Add During Work PDCA Cycle with example workflows - Add Session End Protocol with state preservation - Add PDCA Self-Evaluation Pattern - Add Documentation Strategy (temp → patterns/mistakes) - Add Memory Operations Reference Key Features: - Session start auto-activation for context restoration - 30-minute checkpoint saves during work - Self-evaluation with think_about_* operations - Systematic documentation lifecycle - Knowledge evolution to CLAUDE.md Implementation Status: - ✅ Design complete (Commands/pm.md, Agents/pm-agent.md) - ⏳ Implementation pending (Core components) - ⏳ Serena MCP integration pending Salvaged from mistaken development in ~/.claude directory Related: #pm-agent-mode #session-lifecycle #pdca-cycle #phase-2 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: disable Serena MCP auto-browser launch Disable web dashboard and GUI log window auto-launch in Serena MCP server to prevent intrusive browser popups on startup. Users can still manually access the dashboard at http://localhost:24282/dashboard/ if needed. Changes: - Add CLI flags to Serena run command: - --enable-web-dashboard false - --enable-gui-log-window false - Ensures Git-tracked configuration (no reliance on ~/.serena/serena_config.yml) - Aligns with AIRIS MCP Gateway integration approach 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: rename directories to lowercase for PEP8 compliance - Rename superclaude/Agents -> superclaude/agents - Rename superclaude/Commands -> superclaude/commands - Rename superclaude/Core -> superclaude/core - Rename superclaude/Examples -> superclaude/examples - Rename superclaude/MCP -> superclaude/mcp - Rename superclaude/Modes -> superclaude/modes This change follows Python PEP8 naming conventions for package directories. * style: fix PEP8 violations and update package name to lowercase Changes: - Format all Python files with black (43 files reformatted) - Update package name from 'SuperClaude' to 'superclaude' in pyproject.toml - Fix import statements to use lowercase package name - Add missing imports (timedelta, __version__) - Remove old SuperClaude.egg-info directory PEP8 violations reduced from 2672 to 701 (mostly E501 line length due to black's 88 char vs flake8's 79 char limit). * docs: add PM Agent development documentation Add comprehensive PM Agent development documentation: - PM Agent ideal workflow (7-phase autonomous cycle) - Project structure understanding (Git vs installed environment) - Installation flow understanding (CommandsComponent behavior) - Task management system (current-tasks.md) Purpose: Eliminate repeated explanations and enable autonomous PDCA cycles 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat(pm-agent): add self-correcting execution and warning investigation culture ## Changes ### superclaude/commands/pm.md - Add "Self-Correcting Execution" section with root cause analysis protocol - Add "Warning/Error Investigation Culture" section enforcing zero-tolerance for dismissal - Define error detection protocol: STOP → Investigate → Hypothesis → Different Solution → Execute - Document anti-patterns (retry without understanding) and correct patterns (research-first) ### docs/Development/hypothesis-pm-autonomous-enhancement-2025-10-14.md - Add PDCA workflow hypothesis document for PM Agent autonomous enhancement ## Rationale PM Agent must never retry failed operations without understanding root causes. All warnings and errors require investigation via context7/WebFetch/documentation to ensure production-quality code and prevent technical debt accumulation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat(installer): add airis-mcp-gateway MCP server option ## Changes - Add airis-mcp-gateway to MCP server options in installer - Configuration: GitHub-based installation via uvx - Repository: https://github.com/oraios/airis-mcp-gateway - Purpose: Dynamic MCP Gateway for zero-token baseline and on-demand tool loading ## Implementation Added to setup/components/mcp.py self.mcp_servers dictionary with: - install_method: github - install_command: uvx test installation - run_command: uvx runtime execution - required: False (optional server) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: kazuki <kazuki@kazukinoMacBook-Air.local> Co-authored-by: Claude <noreply@anthropic.com>
20 KiB
MCP Server Troubleshooting Guide
MCP Server Focus: Model Context Protocol (MCP) servers provide enhanced capabilities like documentation lookup (Context7), UI generation (Magic), and advanced reasoning (Sequential). This guide covers installation, configuration, and operational troubleshooting for all MCP servers.
Server-Specific Solutions: Each MCP server has unique requirements and common failure patterns. This guide provides targeted solutions for each server type and general MCP troubleshooting strategies.
MCP Server Overview
Available MCP Servers
Core MCP Servers:
- Context7: Official documentation lookup and framework patterns
- Sequential: Multi-step reasoning and complex analysis
- Magic: Modern UI component generation from 21st.dev patterns
- Playwright: Browser automation and E2E testing
- Morphllm: Pattern-based code editing with token optimization
- Serena: Semantic code understanding and project memory
Server Requirements:
- Node.js 16.0.0 or higher
- npm or yarn package manager
- Stable network connection for some servers
- Sufficient system memory (2GB+ recommended)
Installation and Configuration Issues
Node.js and npm Problems
Issue: Node.js Version Incompatibility
Error Message: ERROR: MCP servers require Node.js 16+ but found Node.js 14.x
Diagnosis:
node --version
npm --version
Solution 1: Update Node.js (Linux/Ubuntu)
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
Solution 2: Use Node Version Manager (nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source ~/.bashrc
nvm install node
nvm use node
Solution 3: Manual Node.js installation
- Download from https://nodejs.org/
- Follow platform-specific installation instructions
Verification:
node --version # Should be 16.0.0+
npm --version # Should be 8.0.0+
Issue: npm Permission Problems
# Error message
ERROR: EACCES: permission denied, access '/usr/local/lib/node_modules'
# Solution 1: Configure npm for user directory
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile
source ~/.profile
# Solution 2: Fix npm permissions
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
# Solution 3: Use npx for package execution
npx @context7/mcp-server --version
# Verification
npm list -g --depth=0
npm config get prefix
MCP Server Installation Failures
Issue: Context7 MCP Server Installation Failed
# Error message
ERROR: Failed to install @context7/mcp-server
# Diagnosis
npm list -g @context7/mcp-server
node --version
# Solution 1: Clean npm cache and reinstall
npm cache clean --force
npm install -g @context7/mcp-server
# Solution 2: Use alternative registry
npm install -g @context7/mcp-server --registry https://registry.npmjs.org/
# Solution 3: Manual installation verification
npm info @context7/mcp-server
npm install -g @context7/mcp-server@latest
# Verification
npm list -g @context7/mcp-server
node -e "console.log('Context7 installation test')"
Issue: Sequential MCP Server Dependencies Missing
# Error message
ERROR: Sequential MCP server missing required dependencies
# Diagnosis
npm list -g @sequential/mcp-server
npm list -g | grep -E "typescript|@types"
# Solution 1: Install dependencies explicitly
npm install -g typescript @types/node
npm install -g @sequential/mcp-server
# Solution 2: Force reinstall with dependencies
npm uninstall -g @sequential/mcp-server
npm install -g @sequential/mcp-server --save-dev
# Solution 3: Check package integrity
npm audit --global
npm update -g
# Verification
npm list -g @sequential/mcp-server
Issue: Magic UI Generator Installation Problems
# Error message
ERROR: @magic/ui-generator installation failed - build dependencies missing
# Diagnosis
npm list -g @magic/ui-generator
which gcc make # Check build tools
# Solution 1: Install build dependencies (Linux)
sudo apt install build-essential python3-dev
# Solution 2: Install build dependencies (macOS)
xcode-select --install
# Solution 3: Use pre-built binaries
npm install -g @magic/ui-generator --ignore-scripts
# Verification
npm list -g @magic/ui-generator
Connection and Communication Issues
MCP Server Connection Failures
Issue: Context7 Server Not Connecting
# Error message
ERROR: MCP server 'context7' failed to connect
# Diagnosis
# Check Node.js installation
node --version # Should be 16.0.0 or higher
npm list -g @context7/mcp-server
# Check server configuration
cat ~/.claude/CLAUDE.md | grep -i context7
# Solution 1: Restart Claude Code session
# MCP servers restart with Claude Code session restart
# Solution 2: Reconfigure MCP servers
python3 -m SuperClaude install --components mcp --force
# Solution 3: Manual server testing
node -e "console.log('Node.js working')"
npm test @context7/mcp-server
# Solution 4: Check network connectivity
ping context7-server.example.com # If server requires network
curl -I https://context7-api.example.com/health # Health check
# Verification
# Try Context7 functionality in Claude Code
# Should respond to documentation requests
Issue: MCP Server Communication Timeout
# Error message
ERROR: MCP server request timeout after 30 seconds
# Diagnosis
# Check network connectivity and server health
ping 8.8.8.8 # Basic connectivity
curl -I https://api.example.com/health # API health
# Check system resources
top
free -h
# Solution 1: Reduce operation complexity
# Break complex tasks into smaller parts
# Solution 2: Restart Claude Code session
# MCP servers restart with Claude Code session restart
# Solution 3: Disable problematic server temporarily
# Use --no-mcp flag for operations
# Solution 4: Increase timeout (if configurable)
# Check MCP server configuration files
# Verification
# Test with simple operations first
# Gradually increase complexity
Issue: Multiple MCP Servers Conflicting
# Error message
ERROR: MCP server port conflicts detected
# Diagnosis
netstat -tlnp | grep :8000 # Check port usage
ps aux | grep -E "context7|sequential|magic"
# Solution 1: Sequential server restart
# Restart Claude Code to reset all MCP servers
# Solution 2: Configure different ports
# Edit MCP server configuration files
# Usually in ~/.claude/ or server-specific directories
# Solution 3: Use selective server activation
# Use specific server flags instead of --all-mcp
# Verification
netstat -tlnp | grep -E "8000|8001|8002" # Check port assignments
Server-Specific Troubleshooting
Context7 Documentation Server
Issue: Context7 Not Finding Documentation
# Symptoms: Context7 activated but returns no documentation
# Diagnosis
# Test Context7 connection
node -e "const c7 = require('@context7/mcp-server'); console.log('Context7 loaded');"
# Solution 1: Update Context7 server
npm update -g @context7/mcp-server
# Solution 2: Clear Context7 cache
rm -rf ~/.context7/cache/ # If cache directory exists
# Solution 3: Use explicit library keywords
# Use specific framework names in requests
# Solution 4: Verify internet connection
curl -I https://docs.react.dev/ # Example API test
# Verification
# Try specific documentation requests
# Should return relevant framework information
Issue: Context7 Returning Outdated Information
# Symptoms: Context7 returns old documentation versions
# Solution 1: Update Context7 server
npm uninstall -g @context7/mcp-server
npm install -g @context7/mcp-server@latest
# Solution 2: Clear documentation cache
rm -rf ~/.context7/ # Clear cache if exists
# Solution 3: Force documentation refresh
# Restart Claude Code session completely
# Verification
# Check documentation dates in responses
# Should return current framework versions
Sequential Reasoning Server
Issue: Sequential Server Internal Errors
# Error message
ERROR: Sequential reasoning server encountered internal error
# Diagnosis
# Check Sequential server logs
tail -f ~/.claude/logs/sequential-mcp.log # If logs exist
# Check server installation
npm list -g @sequential/mcp-server
# Solution 1: Restart Claude Code session
# This restarts all MCP servers including Sequential
# Solution 2: Use alternative reasoning approach
# Use native Claude reasoning without MCP servers
# Solution 3: Reinstall Sequential MCP
npm uninstall -g @sequential/mcp-server
npm install -g @sequential/mcp-server@latest
# Solution 4: Check memory availability
free -h # Ensure sufficient memory for complex reasoning
# Verification
# Test with simple analysis tasks first
# Should provide structured reasoning output
Issue: Sequential Server Memory Overload
# Symptoms: Sequential server crashes or becomes unresponsive
# Diagnosis
top | grep -E "sequential|node"
free -h
# Solution 1: Reduce analysis complexity
# Break complex problems into smaller parts
# Solution 2: Increase system memory or swap
sudo swapon --show # Check swap status
# Solution 3: Use scope limiting
# Focus analysis on specific components
# Verification
ps aux | grep sequential # Check process status
Magic UI Generator
Issue: Magic Not Generating UI Components
# Symptoms: UI component requests not producing expected output
# Diagnosis
# Check Magic server installation
npm list -g @magic/ui-generator
cat ~/.claude/CLAUDE.md | grep -i magic
# Solution 1: Verify Magic server installation
npm list -g @magic/ui-generator
npm install -g @magic/ui-generator@latest
# Solution 2: Use explicit Magic activation
# Include "component", "UI", or "interface" keywords
# Solution 3: Check component request format
# Use descriptive requests for better Magic activation
# Solution 4: Test Magic server directly
node -e "const magic = require('@magic/ui-generator'); console.log('Magic loaded');"
# Verification
# Should produce complete UI components with modern patterns
Issue: Magic Components Not Framework-Compliant
# Symptoms: Generated components don't match framework patterns
# Solution 1: Use framework-specific keywords
# Include "React", "Vue", "Angular" in requests
# Solution 2: Combine with Context7
# Use both Magic and Context7 for framework-compliant components
# Solution 3: Update Magic server
npm update -g @magic/ui-generator
# Verification
# Generated components should follow framework conventions
Playwright Browser Automation
Issue: Playwright Browser Installation Failures
# Error message
ERROR: Playwright browser automation failed - browser not installed
# Diagnosis
npm list -g playwright
npx playwright --version
# Solution 1: Install Playwright browsers
npx playwright install
npx playwright install-deps
# Solution 2: Install specific browsers
npx playwright install chromium
npx playwright install firefox
npx playwright install webkit
# Solution 3: Fix browser dependencies (Linux)
sudo apt-get install libnss3 libatk-bridge2.0-0 libdrm2 libgtk-3-0
# Verification
npx playwright --version
ls ~/.cache/ms-playwright/ # Check browser installations
Issue: Playwright Browser Launch Failures
# Error message
ERROR: Browser launch failed - display not available
# Diagnosis
echo $DISPLAY # Check X11 display
ps aux | grep Xvfb # Check virtual display
# Solution 1: Use headless mode
# Set headless: true in Playwright configuration
# Solution 2: Install virtual display (Linux)
sudo apt-get install xvfb
export DISPLAY=:99
Xvfb :99 -screen 0 1024x768x24 &
# Solution 3: Use Docker for browser testing
docker run -it --rm playwright:latest
# Verification
# Should successfully launch browsers in headless mode
Morphllm Pattern Editor
Issue: Morphllm Pattern Application Failures
# Symptoms: Pattern-based edits not applying correctly
# Diagnosis
npm list -g @morphllm/mcp-server
# Solution 1: Update Morphllm server
npm update -g @morphllm/mcp-server
# Solution 2: Use more specific patterns
# Provide explicit pattern descriptions
# Solution 3: Check file permissions
ls -la target-files/ # Ensure write permissions
# Verification
# Pattern edits should be applied consistently across files
Serena Project Memory
Issue: Serena Session Persistence Failures
# Symptoms: Project context not persisting between sessions
# Diagnosis
ls ~/.claude/sessions/ # Check session storage
ls ~/.serena/ # Check Serena-specific storage
# Solution 1: Verify session save operations
# Ensure proper session saving before closing
# Solution 2: Check storage permissions
ls -la ~/.claude/sessions/
chmod 755 ~/.claude/sessions/
# Solution 3: Reinstall Serena server
# Remove existing Serena registration
claude mcp remove serena
# Reinstall using uvx
uvx --from git+https://github.com/oraios/serena serena --help
# Re-register with Claude
claude mcp add serena -- uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context ide-assistant
# Verification
# Session context should persist across Claude Code restarts
Performance and Optimization
MCP Server Performance Issues
Issue: Slow MCP Server Response Times
# Symptoms: MCP server operations causing delays
# Diagnosis
# Check MCP server installation and health
npm list -g | grep -E "context7|sequential|magic|playwright"
top | grep node
# Solution 1: Selective MCP server usage
# Use only needed servers for specific tasks
# Solution 2: Restart Claude Code session
# This restarts all MCP servers fresh
# Solution 3: Local fallback mode
# Use --no-mcp flag for pure native operations
# Solution 4: Update all MCP servers
npm update -g
# Verification
time node -e "console.log('Node.js speed test')"
# Should complete successfully
Issue: MCP Server Memory Leaks
# Symptoms: Increasing memory usage over time
# Diagnosis
top | grep node # Monitor Node.js processes
ps aux --sort=-%mem | head -10
# Solution 1: Regular Claude Code session restarts
# Restart sessions periodically during heavy usage
# Solution 2: Monitor specific servers
htop # Monitor individual MCP server processes
# Solution 3: Use memory-efficient patterns
# Avoid keeping large data sets in MCP server memory
# Verification
free -h # Monitor memory usage trends
Resource Management
Issue: Multiple MCP Servers Competing for Resources
# Symptoms: System slowdown when multiple servers active
# Diagnosis
top | grep -E "node|mcp"
iostat 1 3 # Check I/O usage
# Solution 1: Use targeted server activation
# Activate only needed servers per task
# Solution 2: Increase system resources
# Add more RAM or CPU cores if possible
# Solution 3: Queue MCP operations
# Avoid simultaneous heavy operations
# Solution 4: Use MCP server priorities
# Configure resource allocation in MCP settings
# Verification
top # Monitor resource usage during operations
Advanced MCP Configuration
Custom MCP Server Configuration
Issue: Default MCP Configuration Not Optimal
# Symptoms: MCP servers not performing optimally for specific use cases
# Solution 1: Locate configuration files
find ~/.claude/ -name "*mcp*" -type f
find ~/.config/ -name "*mcp*" -type f
# Solution 2: Customize server settings
# Edit server-specific configuration files
# Common locations: ~/.claude/mcp-config.json
# Solution 3: Environment variable configuration
export MCP_CONTEXT7_TIMEOUT=60
export MCP_SEQUENTIAL_MEMORY_LIMIT=2048
# Verification
# Test with custom configuration
# Should show improved performance for specific use cases
Issue: MCP Server Load Balancing
# Symptoms: Uneven load distribution across MCP servers
# Solution 1: Configure server priorities
# Edit MCP configuration to balance loads
# Solution 2: Use round-robin server selection
# Implement rotation logic in server calls
# Solution 3: Monitor server performance
# Track response times and adjust accordingly
# Verification
# Observe balanced resource usage across servers
Debugging and Diagnostics
MCP Server Health Monitoring
Comprehensive MCP Health Check:
# MCP Server System Diagnostics
echo "=== MCP Server Health Check ==="
# Node.js environment
echo "Node.js version: $(node --version)"
echo "npm version: $(npm --version)"
# Server installations
echo "=== Installed MCP Servers ==="
npm list -g | grep -E "context7|sequential|magic|playwright|morphllm|serena"
# Process monitoring
echo "=== Running MCP Processes ==="
ps aux | grep -E "node.*mcp|mcp.*server" | head -5
# Resource usage
echo "=== Resource Usage ==="
echo "Memory: $(free -h | grep Mem | awk '{print $3 "/" $2}')"
echo "CPU Load: $(uptime | awk -F'load average:' '{print $2}')"
# Network connectivity (if required)
echo "=== Network Status ==="
ping -c 1 8.8.8.8 > /dev/null && echo "✅ Network OK" || echo "❌ Network Issue"
MCP Server Functionality Test:
# Test each MCP server individually
echo "=== MCP Server Functionality Test ==="
# Context7 test
if npm list -g @context7/mcp-server > /dev/null 2>&1; then
echo "✅ Context7 installed"
else
echo "❌ Context7 missing"
fi
# Sequential test
if npm list -g @sequential/mcp-server > /dev/null 2>&1; then
echo "✅ Sequential installed"
else
echo "❌ Sequential missing"
fi
# Magic test
if npm list -g @magic/ui-generator > /dev/null 2>&1; then
echo "✅ Magic installed"
else
echo "❌ Magic missing"
fi
# Playwright test
if npx playwright --version > /dev/null 2>&1; then
echo "✅ Playwright installed"
else
echo "❌ Playwright missing"
fi
MCP Server Log Analysis
Log Collection and Analysis:
# Collect MCP server logs
echo "=== MCP Server Logs ==="
# Check common log locations
find ~/.claude/ -name "*.log" -type f 2>/dev/null
find /tmp/ -name "*mcp*.log" -type f 2>/dev/null
find /var/log/ -name "*mcp*.log" -type f 2>/dev/null
# Check npm logs
npm config get logs-max
ls ~/.npm/_logs/ 2>/dev/null | tail -5
# System logs for Node.js processes
journalctl -u node* --since "1 hour ago" 2>/dev/null | tail -10
Emergency Recovery
Complete MCP Reset
Full MCP Server Reset Procedure:
# Emergency MCP Reset
echo "=== Emergency MCP Server Reset ==="
# Step 1: Stop all Claude Code sessions
echo "Stop all Claude Code sessions and wait 30 seconds"
# Step 2: Backup current state
cp -r ~/.claude ~/.claude.mcp.backup.$(date +%Y%m%d)
# Step 3: Remove all MCP servers
npm list -g | grep -E "context7|sequential|magic|playwright|morphllm|serena" | awk '{print $2}' | xargs npm uninstall -g
# Step 4: Clear npm cache
npm cache clean --force
# Step 5: Reinstall MCP servers
python3 -m SuperClaude install --components mcp --force
# Step 6: Verification
npm list -g | grep -E "context7|sequential|magic|playwright|morphllm|serena"
# Step 7: Test functionality
echo "Test MCP servers in Claude Code after restart"
Related Resources
MCP-Specific Documentation
- Core SuperClaude Guide: ../User-Guide/mcp-servers.md - MCP server overview and usage
- Common Issues: common-issues.md - General troubleshooting procedures
- Diagnostic Reference: diagnostic-reference.md - Advanced diagnostic procedures
External Resources
- Node.js Official: https://nodejs.org/ - Node.js installation and documentation
- npm Documentation: https://docs.npmjs.com/ - Package manager documentation
- Playwright Guide: https://playwright.dev/ - Browser automation documentation
Support Channels
- GitHub Issues: MCP-specific problems
- GitHub Discussions: MCP server community support
MCP Server Priority: When troubleshooting, address servers in order of dependency: Node.js → npm → individual servers → Claude Code integration. Most MCP issues resolve with proper Node.js setup and server reinstallation.
Verification Pattern: After MCP solutions, always verify with:
- ✅
node --version- Should be 16.0.0+ - ✅
npm list -g | grep mcp- Should show installed servers - ✅ Test server functionality in Claude Code - Should respond without errors