Claude Flow is a powerful Model Context Protocol (MCP) server that provides advanced AI swarm orchestration, memory management, and performance monitoring capabilities. It enables sophisticated multi-agent coordination with real-time tracing and observability.
- π€ AI Swarm Orchestration: Coordinate multiple AI agents with different topologies (mesh, hierarchical, ring, star)
- π§ Persistent Memory: SQLite-based memory storage for cross-session context retention
- π Real-time Monitoring: Live performance tracking and visualization
- π MCP Integration: Full Model Context Protocol server implementation
- π Langfuse Tracing: Comprehensive observability with Langfuse integration
- π Performance Optimization: Automatic bottleneck detection and optimization
- Neural Pattern Learning: Agents learn from successful operations
- GitHub Integration: Repository-aware swarms for code management
- Hooks System: Pre/post operation hooks for automation
- Session Management: Persistent state across sessions
- Parallel Execution: 2.8-4.4x speed improvements through parallelization
# Add Claude Flow MCP server to Claude Code
claude mcp add claude-flow npx claude-flow@alpha mcp start# Global installation
npm install -g claude-flow@alpha
# Or use directly with npx
npx claude-flow@alpha [command]# Using Docker Compose
docker-compose -f docker-compose.yml up -d
# Minimal setup
docker-compose -f docker-compose.minimal.yml up -d
# Full stack with monitoring
docker-compose -f docker-compose.stack.yml up -d# Start MCP server
npx claude-flow@alpha mcp start
# Initialize a swarm
npx claude-flow@alpha swarm init --topology mesh --agents 5
# Spawn an agent
npx claude-flow@alpha agent spawn --type researcher --name "API Explorer"
# Use hooks
npx claude-flow@alpha hooks pre-task --description "Analyze codebase"
npx claude-flow@alpha hooks post-edit --file "src/app.js" --format trueOnce configured as an MCP server, use these tools:
mcp__claude-flow__swarm_init- Initialize swarm coordinationmcp__claude-flow__agent_spawn- Create specialized agentsmcp__claude-flow__task_orchestrate- Coordinate complex tasksmcp__claude-flow__memory_usage- Store/retrieve persistent memorymcp__claude-flow__swarm_monitor- Real-time monitoring
claude-flow/
βββ src/
β βββ agents/ # Agent implementations
β βββ mcp/ # MCP server
β βββ memory/ # Memory management
β βββ monitoring/ # Performance monitoring
β βββ tracing/ # Langfuse integration
β βββ hooks/ # Hook system
βββ bin/ # CLI executables
βββ scripts/ # Utility scripts
βββ docs/ # Documentation
-
MCP Server (
src/mcp/server.js)- Handles MCP protocol communication
- Provides tool interfaces for Claude
-
Swarm Manager (
src/agents/swarm-manager.js)- Orchestrates multi-agent coordination
- Manages different topology patterns
-
Memory Store (
src/memory/store.js)- SQLite-based persistent storage
- Cross-session context retention
-
Trace Manager (
src/instrumentation/trace-manager.js)- Langfuse integration for observability
- Performance metrics collection
# Langfuse Configuration (optional)
LANGFUSE_SECRET_KEY=your-secret-key
LANGFUSE_PUBLIC_KEY=your-public-key
LANGFUSE_HOST=https://cloud.langfuse.com
# Performance Settings
MAX_AGENTS=10
PARALLEL_EXECUTION=true
MEMORY_DB_PATH=.swarm/memory.dbHooks are configured in .claude/settings.json:
- Automatic agent assignment
- Code formatting on save
- Performance optimization
- Session persistence
- 84.8% SWE-Bench solve rate - Superior problem-solving
- 32.3% token reduction - Efficient task coordination
- 2.8-4.4x speed improvement - Through parallelization
- 27+ neural models - Diverse cognitive approaches
claude-flow:latest- Full server with all featuresclaude-flow:worker- Lightweight worker imageclaude-flow:dashboard- Monitoring dashboard
docker-compose.yml- Standard deploymentdocker-compose.minimal.yml- Minimal setupdocker-compose.stack.yml- Full monitoring stack
npm test
npm run test:integration
npm run test:performancenpm run build
npm run docker:build- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
MIT License - see LICENSE file for details
- Issues: GitHub Issues
- Documentation: Full Docs
- Examples: See
/docsdirectory
Claude Flow - Empowering AI coordination and collaboration π