Skip to main content
Glama

Model Context Protocol server for cross-project Claude Code coordination

Build Status codecov npm version PRs Welcome License: MIT

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:

  1. Context Switch: Stop work, manually navigate to other project

  2. Launch New Claude: Start fresh Claude Code session, losing context

  3. Explain Everything: Re-explain what changed and why

  4. Copy/Paste: Manually transfer information between projects

  5. 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 (in frontend project): "Ask the backend team what their API versioning strategy is" Claude (frontend) โ†’ Iris MCP โ†’ Claude (backend) โ†’ analyzes backend code โ†’ responds โ†“ "The backend team uses semantic versioning with /api/v1, /api/v2 prefixes"

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/ configuration

  • Session/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:

Team Frontend Claude knows: โœ… React components, Tailwind classes, Redux patterns โœ… Frontend-specific MCP servers (Figma, Storybook) โœ… Frontend CLAUDE.md instructions โŒ Backend database schemas (not needed!) โŒ Mobile iOS/Android specifics (not needed!) Team Backend Claude knows: โœ… Database schemas, API endpoints, migrations โœ… Backend-specific MCP servers (PostgreSQL, Redis) โœ… Backend CLAUDE.md instructions โŒ Frontend component structure (not needed!)

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:

teams: team-production: remote: "ssh user@prod-server" claudePath: "~/.local/bin/claude" path: "/opt/production/app" enableReverseMcp: true # Enable bidirectional tunneling

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:

Local Machine โ†โ”€โ”€โ”€โ”€SSH Tunnelโ”€โ”€โ”€โ”€โ†’ Remote Machine (Iris MCP) -R 1615:... (Claude Code) โ†‘ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ HTTP via tunnel โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

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:

curl -fsSL https://raw.githubusercontent.com/jenova-marie/iris-mcp/main/setup.sh | bash

Windows (PowerShell):

iwr -useb https://raw.githubusercontent.com/jenova-marie/iris-mcp/main/setup.ps1 | iex

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

# Install globally from npm npm install -g @jenova-marie/iris-mcp # Verify installation iris-mcp --version # Add your projects as teams iris-mcp add-team frontend ~/code/my-frontend iris-mcp add-team backend ~/code/my-backend # Connect to Claude Code iris-mcp install # Start the server iris-mcp

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.

{ fromTeam: "team-frontend", toTeam: "team-backend", message: "What authentication strategy do you use?", timeout: 30000 // optional, default 30s }

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.

{ fromTeam: "team-frontend", toTeam: "team-backend", message: "What database migration system do you use?", timeout: 30000 }

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.

{ fromTeam: "team-backend", toTeam: "team-frontend", message: "New API endpoint deployed: GET /api/v2/users" }

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.

{ fromTeam: "team-iris", toTeam: "team-backend" }

Terminates existing process and creates new session with clean slate.


session_delete

Permanently delete a session without creating replacement.

{ fromTeam: "team-iris", toTeam: "team-backend" }

session_fork

Launch interactive terminal window for manual interaction.

{ fromTeam: "team-iris", toTeam: "team-backend" }

Opens separate terminal with claude --resume --fork-session for direct interaction.


session_cancel

Cancel a running session operation.

{ fromTeam: "team-iris", team: "team-backend" }

Attempts to interrupt long-running operations by sending ESC to stdin.


session_report

View conversation history for a session.

{ fromTeam: "team-iris", team: "team-backend" }

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.

{ fromTeam: "team-iris", team: "team-backend" }

Creates session-specific process (e.g., iris->backend) for conversation isolation.


team_launch

Semantic alias for team_wake emphasizing activation.

{ fromTeam: "team-iris", team: "team-backend" }

team_sleep

Put a team to sleep by terminating its process.

{ fromTeam: "team-iris", team: "team-backend", force: false // optional }

team_wake_all

Wake all configured teams sequentially.

{ fromTeam: "team-iris", parallel: false // NOT RECOMMENDED - unstable }

Warning: Parallel mode causes timeouts due to simultaneous Claude spawning.


team_status

Get status of teams, processes, and notifications.

{ fromTeam: "team-iris", team: "team-backend", // optional, omit for all teams includeNotifications: true // optional, default true }

Response:

{ "teams": [{ "name": "team-backend", "path": "/Users/you/projects/backend", "active": true, "processInfo": { "status": "idle", "pid": 12345, "uptime": 180000 }, "sessionInfo": { "sessionId": "abc-123", "messageCount": 47, "lastUsed": 1704067200000 } }], "pool": { "totalProcesses": 3, "maxProcesses": 10 } }

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.

{ logs_since: 1704067200000, // optional timestamp level: "error", // optional: 'trace'|'debug'|'info'|'warn'|'error'|'fatal' format: "parsed" // optional: 'raw'|'parsed' }

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

{ tool_name: "mcp__iris__team_wake", input: { team: "team-backend" }, reason: "Need to coordinate deployment" }

Auto-approves all mcp__iris__* tools, denies everything else.


๐Ÿ“ Project Structure

iris-mcp/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ index.ts # MCP server entry point โ”‚ โ”œโ”€โ”€ iris.ts # IrisOrchestrator (Business Logic Layer) โ”‚ โ”œโ”€โ”€ config/ โ”‚ โ”‚ โ”œโ”€โ”€ teams-config.ts # Configuration with Zod validation โ”‚ โ”‚ โ””โ”€โ”€ iris-config.ts # Config schema and types โ”‚ โ”œโ”€โ”€ session/ โ”‚ โ”‚ โ”œโ”€โ”€ session-manager.ts # Session database and file management โ”‚ โ”‚ โ”œโ”€โ”€ session-store.ts # SQLite session store โ”‚ โ”‚ โ”œโ”€โ”€ path-utils.ts # Session file path utilities โ”‚ โ”‚ โ””โ”€โ”€ types.ts # Session interfaces โ”‚ โ”œโ”€โ”€ process-pool/ โ”‚ โ”‚ โ”œโ”€โ”€ pool-manager.ts # Process pool with LRU eviction โ”‚ โ”‚ โ”œโ”€โ”€ claude-process.ts # Claude process wrapper โ”‚ โ”‚ โ””โ”€โ”€ types.ts # Process interfaces โ”‚ โ”œโ”€โ”€ transport/ โ”‚ โ”‚ โ”œโ”€โ”€ base-transport.ts # Transport abstraction interface โ”‚ โ”‚ โ”œโ”€โ”€ local-transport.ts # Local process execution โ”‚ โ”‚ โ”œโ”€โ”€ ssh-transport.ts # OpenSSH client execution โ”‚ โ”‚ โ””โ”€โ”€ remote-ssh2-transport.ts # ssh2 library execution โ”‚ โ”œโ”€โ”€ actions/ โ”‚ โ”‚ โ”œโ”€โ”€ send-message.ts # send_message tool โ”‚ โ”‚ โ”œโ”€โ”€ ask-message.ts # ask_message tool โ”‚ โ”‚ โ”œโ”€โ”€ quick-message.ts # quick_message tool โ”‚ โ”‚ โ”œโ”€โ”€ session-reboot.ts # session_reboot tool โ”‚ โ”‚ โ”œโ”€โ”€ session-delete.ts # session_delete tool โ”‚ โ”‚ โ”œโ”€โ”€ session-fork.ts # session_fork tool โ”‚ โ”‚ โ”œโ”€โ”€ session-cancel.ts # session_cancel tool โ”‚ โ”‚ โ”œโ”€โ”€ team-wake.ts # team_wake tool โ”‚ โ”‚ โ”œโ”€โ”€ team-launch.ts # team_launch tool โ”‚ โ”‚ โ”œโ”€โ”€ team-sleep.ts # team_sleep tool โ”‚ โ”‚ โ”œโ”€โ”€ team-wake-all.ts # team_wake_all tool โ”‚ โ”‚ โ”œโ”€โ”€ team-status.ts # team_status tool โ”‚ โ”‚ โ”œโ”€โ”€ session-report.ts # session_report tool โ”‚ โ”‚ โ”œโ”€โ”€ list-teams.ts # list_teams tool โ”‚ โ”‚ โ”œโ”€โ”€ get-logs.ts # get_logs tool โ”‚ โ”‚ โ”œโ”€โ”€ get-date.ts # get_date tool โ”‚ โ”‚ โ””โ”€โ”€ grant-permission.ts # permissions__approve tool โ”‚ โ”œโ”€โ”€ dashboard/ โ”‚ โ”‚ โ”œโ”€โ”€ app.tsx # React SPA entry point โ”‚ โ”‚ โ”œโ”€โ”€ components/ # React components โ”‚ โ”‚ โ””โ”€โ”€ server.ts # Express + WebSocket backend โ”‚ โ”œโ”€โ”€ notifications/ โ”‚ โ”‚ โ”œโ”€โ”€ queue.ts # SQLite notification queue โ”‚ โ”‚ โ””โ”€โ”€ schema.sql # Database schema โ”‚ โ”œโ”€โ”€ logging/ โ”‚ โ”‚ โ”œโ”€โ”€ wonder-logger.ts # Wonder Logger implementation โ”‚ โ”‚ โ””โ”€โ”€ opentelemetry.ts # OpenTelemetry integration โ”‚ โ””โ”€โ”€ utils/ โ”‚ โ”œโ”€โ”€ logger.ts # Structured logging to stderr โ”‚ โ”œโ”€โ”€ errors.ts # Custom error hierarchy โ”‚ โ”œโ”€โ”€ validation.ts # Input validation โ”‚ โ””โ”€โ”€ env-interpolation.ts # Environment variable interpolation โ”œโ”€โ”€ docs/ โ”‚ โ”œโ”€โ”€ CONCEPT.md # Vision and conceptual overview โ”‚ โ”œโ”€โ”€ ARCHITECTURE.md # System design and components โ”‚ โ”œโ”€โ”€ ACTIONS.md # All 17 MCP tools documentation โ”‚ โ”œโ”€โ”€ CONFIG.md # Configuration management โ”‚ โ”œโ”€โ”€ SESSION.md # Session management deep dive โ”‚ โ”œโ”€โ”€ REMOTE.md # Remote execution via SSH โ”‚ โ”œโ”€โ”€ REVERSE_MCP.md # Bidirectional SSH tunneling โ”‚ โ”œโ”€โ”€ DASHBOARD.md # Web dashboard documentation โ”‚ โ”œโ”€โ”€ FEATURES.md # Comprehensive feature inventory โ”‚ โ””โ”€โ”€ NOMENCLATURE.md # Core concepts and terminology โ”œโ”€โ”€ data/ โ”‚ โ”œโ”€โ”€ team-sessions.db # Session database (auto-created) โ”‚ โ””โ”€โ”€ notifications.db # Notification queue (auto-created) โ”œโ”€โ”€ config.yaml # Your team configuration โ””โ”€โ”€ package.json

๐Ÿ—๏ธ Architecture

Three-Layer Design

Iris uses a clean three-layer architecture with strict separation of concerns:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ IrisOrchestrator (BLL) โ”‚ โ”‚ Coordinates SessionManager + PoolManager โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ–ผ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚SessionManagerโ”‚ โ”‚ClaudeProcessPool โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚DB + Files โ”‚ โ”‚Process Lifecycle โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚NO processes โ”‚ โ”‚NO session lookup โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”‚ โ–ผ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚SessionStore โ”‚ โ”‚ClaudeProcess โ”‚ โ”‚SQLite โ”‚ โ”‚Transport Abstractionโ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ–ผ โ–ผ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚LocalTransportโ”‚ โ”‚SSHTransport โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

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@host

  • Requires 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}.jsonl

  • Database tracks metadata (message count, last used, status)

  • Sessions resume across process restarts

Schema:

CREATE TABLE sessions ( pool_key TEXT PRIMARY KEY, session_id TEXT NOT NULL, message_count INTEGER DEFAULT 0, last_used_at INTEGER, status TEXT DEFAULT 'active', created_at INTEGER NOT NULL, updated_at INTEGER NOT NULL );

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:

// Process events as Observable streams process.events$ .pipe( filter(event => event.type === 'message-response'), timeout(responseTimeout), catchError(err => of({ type: 'error', error: err })) ) .subscribe(handleResponse);

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:

teams: team-remote: remote: "ssh user@remote-host" sessionMcpEnabled: true sessionMcpPath: "/path/to/session-mcp-server"

Each session gets its own MCP server instance with session-specific context.

Wonder Logger

OpenTelemetry-based observability with structured logging:

logger.info('Process spawned', { poolKey: 'iris->backend', sessionId: 'abc-123', pid: 12345, transport: 'ssh' });

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

teams: team-production: grantPermission: ask # Require approval for all actions

๐ŸŽฏ Configuration

Example Configuration

settings: # Process Timeouts sessionInitTimeout: 30000 # 30 seconds for session creation spawnTimeout: 20000 # 20 seconds for process spawn responseTimeout: 120000 # 2 minutes for Claude response mcpTimeout: 5000 # 5 seconds for MCP server communication # Process Pool idleTimeout: 3600000 # 1 hour idle before termination maxProcesses: 10 # Max concurrent processes healthCheckInterval: 30000 # 30 seconds health check # Server httpPort: ${IRIS_HTTP_PORT:-1615} defaultTransport: http # stdio or http teams: # Local Team team-frontend: path: /Users/you/projects/frontend description: React frontend application idleTimeout: 600000 # 10 minutes (override) grantPermission: yes color: "#61DAFB" # Remote Team with Reverse MCP team-production: remote: "ssh user@prod-server" claudePath: "~/.local/bin/claude" path: "/opt/production/app" description: Production backend server enableReverseMcp: true # Enable bidirectional tunneling reverseMcpPort: 1615 # Port to tunnel allowHttp: false # Use HTTPS for production grantPermission: ask # Require approval for actions color: "#E34F26" # Remote Team with Session MCP team-mobile: remote: "ssh user@mobile-server" path: "/home/user/mobile-app" sessionMcpEnabled: true sessionMcpPath: "/usr/local/bin/session-mcp" color: "#3DDC84"

Environment Variable Interpolation

Use ${VAR:-default} syntax for dynamic configuration:

settings: httpPort: ${IRIS_HTTP_PORT:-1615} idleTimeout: ${IRIS_IDLE_TIMEOUT:-3600000} maxProcesses: ${IRIS_MAX_PROCESSES:-10} teams: team-production: path: ${PROD_PATH} # Required (throws if not set) idleTimeout: ${PROD_TIMEOUT:-1800000}

Example .env file:

IRIS_HTTP_PORT=1615 IRIS_MAX_PROCESSES=20 PROD_PATH=/opt/production/app PROD_TIMEOUT=3600000

Configuration Hot-Reload

Iris watches config.yaml with fs.watchFile() (1s interval) and automatically reloads configuration changes without server restart.


๐Ÿ”ง Development

Build

pnpm build

Watch Mode

pnpm dev

Testing

# Run all tests pnpm test # Unit tests only (fast, mocked) pnpm test:unit # Integration tests only (slow, real Claude processes) pnpm test:integration # Run specific test file pnpm test:run path/to/test.ts # Watch mode with UI pnpm test:ui

Run MCP Inspector

pnpm inspector

This opens the MCP inspector at http://localhost:5173 to test tools interactively.

Logs

All logs go to stderr in JSON format:

{"level":"info","context":"server","message":"Iris MCP Server initialized","teams":["frontend","backend"],"timestamp":"2025-01-15T10:30:00.000Z"} {"level":"info","context":"pool","message":"Process spawned","poolKey":"iris->backend","sessionId":"abc-123","pid":12345,"timestamp":"2025-01-15T10:30:15.000Z"}

Log Contexts:

  • server: MCP server lifecycle

  • config: Configuration loading

  • session-manager: Session operations

  • session-store: Database operations

  • pool: Process pool management

  • process:teamName: Individual process logs

  • transport: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) sessions

  • Full 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 beforeAll optimization

  • Timeout handling: Fixed spurious errors 20s after completion


๐Ÿšจ Troubleshooting

"Team not found" error

Symptom: TeamNotFoundError when using tools

Solutions:

  • Check that team name in config.yaml matches 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 claude

  • Check that the team's project directory exists and is accessible

  • Try running claude --session-id test-$(uuidgen) --print ping manually in the team directory

  • Check 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 responseTimeout in 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 sessionInitTimeout in config

"Session file was not created"

Symptom: Session initialization fails

Solutions:

  • Verify ~/.claude/projects/ directory exists: mkdir -p ~/.claude/projects

  • Check permissions: ls -la ~/.claude

  • Ensure 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 claudePath is correct on remote machine

  • For 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-shm

  • Check for zombie processes: ps aux | grep iris

Process Pool Full

Symptom: All process slots occupied

Solutions:

  • Increase maxProcesses in config.yaml settings

  • Reduce idleTimeout to free processes faster

  • Check 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 ask command

  • iris status monitoring

  • Interactive 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

Advanced Topics


๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

How to Contribute

  1. Fork the repository

  2. Create your feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add some amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

Development Setup

# Clone your fork git clone https://github.com/your-username/iris-mcp cd iris-mcp # Install dependencies pnpm install # Run tests pnpm test # Run in watch mode pnpm dev # Build the project pnpm build

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

-
security - not tested
A
license - permissive license
-
quality - not tested

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jenova-marie/iris-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server