Model Context Protocol server for cross-project Claude Code coordination
Iris MCP enables Claude Code instances across different project directories to communicate and coordinate. Stay in one project while orchestrating teams across your entire codebase ecosystem.
๐ฏ What is Iris MCP?
Iris MCP is a groundbreaking Model Context Protocol server that enables direct communication between Claude Code instances across different project directories, machines, and networks, creating the first true cross-codebase AI collaboration system with remote orchestration.
The Problem
Modern software development involves multiple codebases (frontend, backend, mobile, infrastructure) that must stay synchronized. Currently, when you need to coordinate changes across projects:
Context Switch: Stop work, manually navigate to other project
Launch New Claude: Start fresh Claude Code session, losing context
Explain Everything: Re-explain what changed and why
Copy/Paste: Manually transfer information between projects
Repeat: Do this for every affected project
This workflow is slow, error-prone, and breaks your flow state. Studies show developers lose 23 minutes of productivity on average when context switching.
The Iris Solution
Stay in your current project while Claude coordinates with other teams automatically:
You never left the frontend project. Iris handled the coordination automatically.
What Makes Iris Revolutionary
Iris fills critical gaps that no existing multi-agent system addresses:
Feature | Iris MCP | Symphony of One | Claude-Flow | Agent-MCP | Others |
Cross-Project Communication | โ | โ | โ | โ | โ |
Independent Team Contexts | โ | โ | โ | โ | โ |
Direct Agent-to-Agent Messaging | โ | โ | โ | โ | โ |
Per-Team MCP Server Access | โ | โ | โ | โ | โ |
Zero Shared State | โ | โ | โ | โ | โ |
Natural Language Coordination | โ | โ | โ | โ | โ |
Remote Execution via SSH | โ | โ | โ | โ | โ |
Bidirectional SSH Tunneling | โ | โ | โ | โ | โ |
Session Persistence | โ | โ | โ | โ | โ |
All existing solutions work within a single project boundary. Iris breaks this limitation by enabling communication between completely independent codebases, each with their own:
Directory structure and dependencies
.claude/configurationSession/Context
MCP servers and tools
Git repositories
Team-specific context
Context Isolation = Better Results
Each team's Claude instance maintains complete context isolation, meaning more accurate, specialized responses:
Your frontend in TypeScript/React can coordinate with your backend in Python/Django, and your mobile app in Swiftโall simultaneously, all with perfect context.
Real Developer Pain Solved
From GitHub Issue #2929:
"Use cases are infinite. I could have a specialist claude run on my specific server answering to natural language requests, while a local generalist claude call it, having no clue of the specific API."
Developers are already asking for this! Iris MCP delivers it.
โจ Key Features
Core MCP Server (Phase 1) โ
17 MCP Tools for comprehensive team coordination
Process Pooling with LRU eviction (10-20x performance improvement)
Session Persistence with SQLite database
Transport Abstraction (Local, SSH, RemoteSSH2)
Remote Execution via OpenSSH client or ssh2 library
Reverse MCP Tunneling for bidirectional communication
Session MCP Configuration with sessionId-based routing
Permission Approval System (yes/no/ask/forward modes)
Hot-Reloadable Configuration with environment variable interpolation
Wonder Logger with OpenTelemetry integration
Event-Driven Architecture with RxJS observables
Web Dashboard (Phase 2) โ
React SPA with real-time monitoring
WebSocket Integration for live updates
Permission Approval Modal for interactive approval
Log Viewer with filtering and search
Process Monitoring with health metrics
Configuration Editor for team management
Remote Teams
Execute Claude Code on remote machines via SSH while maintaining local orchestration:
Capabilities:
Execute on remote servers without local codebase
Automatic SSH tunnel establishment
Reverse MCP tunneling for remoteโlocal communication
Dual SSH implementation (OpenSSH client + ssh2 library)
Session persistence across SSH connections
Reverse MCP Tunneling
Bidirectional orchestration where remote teams can coordinate local teams:
Remote Claude instances can use Iris MCP tools to:
Wake local teams
Send messages to local teams
Fork local sessions for debugging
List all configured teams
Security: SSH-encrypted tunneling, permission approval system, localhost-only binding.
๐ Quick Start
New to Iris? Check out GETTING_STARTED.md for a complete setup guide!
One-Command Installation
Linux/macOS:
Windows (PowerShell):
Note: The PowerShell script is untested on real Windows systems. If you encounter errors, please open an issue with error details or submit a PR with fixes. We appreciate your help! ๐
These interactive scripts will:
โ Check prerequisites (Node.js 18+)
โ Install Iris MCP globally
โ Guide you through team configuration
โ Connect to Claude Code
โ Start the server
That's it! You'll be coordinating AI teams in under 5 minutes. ๐
Manual Installation
See GETTING_STARTED.md for detailed usage examples and troubleshooting.
๐ ๏ธ MCP Tools
Iris MCP provides 17 comprehensive tools for team coordination:
Communication Tools
send_message
Send a message to a team and wait for response.
Modes:
timeout > 0: Wait for response (default)timeout: -1: Fire-and-forget (async)persist: true: Queue in database for later
Example prompts:
"Tell the backend team about the breaking API change"
"Ask mobile team if they support push notifications"
ask_message
Semantic alias for send_message emphasizing questions.
Example prompts:
"Ask the backend team about their authentication strategy"
"Find out from mobile team what iOS version they target"
quick_message
Fire-and-forget messaging without waiting for response.
Example prompts:
"Quickly tell frontend team the deployment is complete"
"Notify all teams about the maintenance window"
Session Management Tools
session_reboot
Create a brand new session with fresh UUID.
Terminates existing process and creates new session with clean slate.
session_delete
Permanently delete a session without creating replacement.
session_fork
Launch interactive terminal window for manual interaction.
Opens separate terminal with claude --resume --fork-session for direct interaction.
session_cancel
Cancel a running session operation.
Attempts to interrupt long-running operations by sending ESC to stdin.
session_report
View conversation history for a session.
Returns complete conversation cache including all messages and protocol responses.
Process Management Tools
team_wake
Wake up a team by ensuring its process is active.
Creates session-specific process (e.g., iris->backend) for conversation isolation.
team_launch
Semantic alias for team_wake emphasizing activation.
team_sleep
Put a team to sleep by terminating its process.
team_wake_all
Wake all configured teams sequentially.
Warning: Parallel mode causes timeouts due to simultaneous Claude spawning.
team_status
Get status of teams, processes, and notifications.
Response:
Utility Tools
list_teams
List all configured teams.
Returns team names with configuration details (path, description, color, settings).
get_logs
Query in-memory logs from Iris MCP server.
get_date
Get current system date and time.
Returns ISO 8601, UTC string, Unix timestamp, and detailed components.
permissions__approve
Permission approval handler for Claude Code's
Auto-approves all mcp__iris__* tools, denies everything else.
๐ Project Structure
๐๏ธ Architecture
Three-Layer Design
Iris uses a clean three-layer architecture with strict separation of concerns:
Layer 1: IrisOrchestrator (Business Logic Layer)
Coordinates SessionManager + ClaudeProcessPool
Implements complete message flow
Provides API for MCP tools
RxJS-based reactive architecture
Layer 2: SessionManager + ClaudeProcessPool
SessionManager: Session database management, file validation, 60s caching
ClaudeProcessPool: Process lifecycle, LRU eviction, health monitoring
Strict separation: SessionManager does NOT spawn processes, Pool does NOT manage sessions
Layer 3: SessionStore + ClaudeProcess
SessionStore: SQLite persistence with WAL mode
ClaudeProcess: Transport abstraction (Local, SSH, RemoteSSH2)
Transport Abstraction
Iris supports multiple execution modes via pluggable transports:
LocalTransport:
Direct child process execution via Node.js
spawn()Lowest latency, highest reliability
Used for local teams
SSHTransport (OpenSSH client):
Execute remote Claude via
ssh user@hostRequires OpenSSH client installed
Best performance for remote execution
Production-ready, battle-tested
RemoteSSH2Transport (ssh2 library):
Pure Node.js SSH implementation
No external dependencies
Platform-independent
Experimental, for environments without SSH client
Session Persistence
Persistent team-to-team sessions maintain conversation continuity:
Each
(fromTeam, toTeam)pair has exactly one session (e.g.,irisโbackend,backendโfrontend)ALL sessions require both fromTeam and toTeam (no null sessions)
Sessions stored at
~/.claude/projects/{escaped-path}/{sessionId}.jsonlDatabase tracks metadata (message count, last used, status)
Sessions resume across process restarts
Schema:
Process Pool Management
Iris maintains a pool of Claude Code processes with:
LRU Eviction: When pool is full, least recently used process is terminated
Idle Timeout: Processes automatically terminate after 1 hour of inactivity (configurable)
Health Checks: Regular monitoring ensures processes stay healthy (every 30s)
Warm Starts: Reuses existing processes for 10-20x faster responses
Session Resumption: Each process resumes its specific session via
--resume <sessionId>
Two-Timeout Architecture:
responseTimeout: How long to wait for Claude to respond (default: 2 minutes)mcpTimeout: Maximum time for MCP server communication (default: 5 seconds)
Reactive Architecture
Iris uses RxJS observables for event-driven communication:
Benefits:
Composable event handling
Automatic timeout management
Error recovery with retry logic
Backpressure handling
Session MCP Configuration
Remote teams can be configured with Session MCP - per-session MCP configuration:
Each session gets its own MCP server instance with session-specific context.
Wonder Logger
OpenTelemetry-based observability with structured logging:
Features:
Structured JSON logging to stderr
OpenTelemetry spans and traces
Context propagation across async boundaries
Log aggregation support (Grafana, Datadog, etc.)
Permission Approval System
Four modes for controlling team actions:
yes: Auto-approve all actions (default)no: Auto-deny all actions (read-only mode)ask: Prompt user for each action (via Dashboard)forward: Forward permission request to calling team
๐ฏ Configuration
Example Configuration
Environment Variable Interpolation
Use ${VAR:-default} syntax for dynamic configuration:
Example .env file:
Configuration Hot-Reload
Iris watches config.yaml with fs.watchFile() (1s interval) and automatically reloads configuration changes without server restart.
๐ง Development
Build
Watch Mode
Testing
Run MCP Inspector
This opens the MCP inspector at http://localhost:5173 to test tools interactively.
Logs
All logs go to stderr in JSON format:
Log Contexts:
server: MCP server lifecycleconfig: Configuration loadingsession-manager: Session operationssession-store: Database operationspool: Process pool managementprocess:teamName: Individual process logstransport:ssh: SSH transport operations
โก Performance
Process Pooling Benefits
Cold Start (first request to a team):
Session creation: ~7-12 seconds
Process spawn: ~1-2 seconds
Total: ~8-14 seconds
Warm Start (subsequent requests):
Session lookup: ~1ms (cache hit)
Process reuse: ~1ms (pool hit)
Total: ~500ms-2s (Claude API time only)
Speedup: 10-20x faster with pooling!
Session Persistence
Without Iris (each request):
New conversation context every time
No memory of previous interactions
Lost context between teams
With Iris:
Persistent
(fromTeam, toTeam)sessionsFull conversation history maintained
Claude remembers previous exchanges
Resource Efficiency
Process Pool Management:
LRU eviction keeps memory bounded
Idle timeout (1 hour) terminates unused processes
Health checks (30s) detect and clean unhealthy processes
Max 10 concurrent processes (configurable)
Memory Usage (typical):
10 processes: ~600 MB - 1.25 GB
Session database: ~2 MB per 10,000 sessions
Notification queue: ~5 MB per 10,000 notifications
Test Suite Performance
Test Optimizations:
Unit tests: 203 passing in <2 seconds
Integration tests: 85% faster (7min โ 1min) with
beforeAlloptimizationTimeout handling: Fixed spurious errors 20s after completion
๐จ Troubleshooting
"Team not found" error
Symptom: TeamNotFoundError when using tools
Solutions:
Check that team name in
config.yamlmatches exactly (case-sensitive)Verify the path exists and is absolute
Restart Iris after modifying
config.yaml(or wait for hot-reload)
"Process failed to spawn"
Symptom: Error during process creation
Solutions:
Ensure Claude CLI is installed:
which claudeCheck that the team's project directory exists and is accessible
Try running
claude --session-id test-$(uuidgen) --print pingmanually in the team directoryCheck logs for detailed error:
context:"process:teamName"For remote teams, verify SSH connectivity:
ssh user@host 'which claude'
"Timeout exceeded"
Symptom: Message takes longer than configured timeout
Solutions:
Increase
responseTimeoutin settings:responseTimeout: 180000(3 minutes)Check if the target team's Claude process is stuck (view logs)
Verify Claude API is responding (not rate-limited)
For session initialization timeouts, increase
sessionInitTimeoutin config
"Session file was not created"
Symptom: Session initialization fails
Solutions:
Verify
~/.claude/projects/directory exists:mkdir -p ~/.claude/projectsCheck permissions:
ls -la ~/.claudeEnsure team path is correct and accessible
Check available disk space:
df -h
SSH Connection Issues
Symptom: Remote team execution fails
Solutions:
Test SSH manually:
ssh user@host 'echo hello'Check SSH key authentication is configured
Verify
claudePathis correct on remote machineFor reverse MCP, ensure port 1615 is not blocked
Check SSH logs:
ssh -v user@host
Database Locked
Symptom: SQLite errors about locked database
Solutions:
Close other Iris MCP instances
Delete WAL files:
rm data/*.db-wal data/*.db-shmCheck for zombie processes:
ps aux | grep iris
Process Pool Full
Symptom: All process slots occupied
Solutions:
Increase
maxProcessesinconfig.yamlsettingsReduce
idleTimeoutto free processes fasterCheck health check logs to see which processes are active
๐บ๏ธ Roadmap
Phase 1: Core MCP Server โ
17 MCP Tools for team coordination
Process Pool with LRU eviction
Session Persistence with SQLite
Transport Abstraction (Local, SSH, RemoteSSH2)
Remote Execution via SSH
Reverse MCP Tunneling
Session MCP Configuration
Wonder Logger with OpenTelemetry
Permission Approval System
Hot-Reloadable Configuration
Event-Driven Architecture with RxJS
Phase 2: Web Dashboard โ
React SPA with real-time monitoring
WebSocket Integration for live updates
Permission Approval Modal
Log Viewer with filtering
Process Monitoring with health metrics
Configuration Editor
Status: Fully implemented and production-ready!
Phase 3: Programmatic API ๐ฎ
RESTful HTTP endpoints
WebSocket streaming
API key authentication
Official SDKs (TypeScript, Python)
See src/api/README.md
Phase 4: CLI Interface ๐ฎ
iris askcommandiris statusmonitoringInteractive shell mode
Built with Ink (React for terminals)
See src/cli/README.md
Phase 5: Intelligence Layer ๐ฎ
Loop detection
Destructive action prevention
Pattern recognition
Self-aware coordination
Autonomous multi-team orchestration
See src/intelligence/README.md
๐ Documentation
Core Documentation
Getting Started - Installation and quick start guide
Concept - Vision and conceptual overview
Architecture - System design and component interaction
Actions - All 17 MCP tools documentation
Configuration - Complete YAML config reference
Features - Comprehensive feature inventory
Nomenclature - Core concepts and terminology
Advanced Topics
Session Management - Session database and file management
Remote Execution - SSH transport and remote teams
Reverse MCP - Bidirectional SSH tunneling
Dashboard - Web dashboard documentation
๐ค Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
How to Contribute
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Development Setup
Please ensure all tests pass before submitting a PR.
๐ License
MIT License - see LICENSE file for details
๐ Why "Iris"?
Iris was the Greek goddess of the rainbow and messenger of the gods, bridging heaven and earth. Similarly, Iris MCP bridges your AI agents across project boundaries.
One messenger. Many teams. Infinite coordination.
Built with โค๏ธ by Jenova Marie
This server cannot be installed