Iris MCP

Iris MCP

Enables Claude Code instances across different project directories to communicate and coordinate. Stay in one project while asking questions to teams in other codebases through cross-project messaging and coordination.

Category
访问服务器

README

Iris MCP 🌈

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 asking questions to teams in other codebases.


🎯 What is Iris MCP?

Iris MCP is a revolutionary MCP server that lets Claude Code teams talk to each other. Instead of manually context-switching between projects, you can:

You (in frontend project):
"Using Iris, ask the backend team what their API versioning strategy is"

Claude (in frontend) → Iris MCP → Claude (in 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.


🚀 Quick Start

Installation

# Install globally
npm install -g @iris-mcp/server

# Or use locally
git clone https://github.com/your-org/iris-mcp
cd iris-mcp
pnpm install
pnpm build

Configuration

Create a teams.json file (copy from src/config/teams.example.json):

{
  "settings": {
    "idleTimeout": 300000,
    "maxProcesses": 10,
    "healthCheckInterval": 30000
  },
  "teams": {
    "frontend": {
      "path": "/Users/you/projects/acme-frontend",
      "description": "React TypeScript frontend with Tailwind",
      "skipPermissions": true,
      "color": "#61dafb"
    },
    "backend": {
      "path": "/Users/you/projects/acme-backend",
      "description": "Node.js Express REST API",
      "skipPermissions": true,
      "color": "#68a063"
    },
    "mobile": {
      "path": "/Users/you/projects/acme-mobile",
      "description": "React Native mobile app",
      "skipPermissions": true,
      "color": "#0088cc"
    }
  }
}

Add to Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "iris": {
      "command": "node",
      "args": ["/path/to/iris-mcp/dist/index.js"]
    }
  }
}

Start Using

Restart Claude Desktop and start a conversation:

> "Ask the backend team what database they use"

Claude will automatically use Iris MCP to coordinate!


🛠️ MCP Tools

teams_ask

Ask a team a question and wait for response.

{
  team: "backend",
  question: "What database migration system do you use?",
  timeout: 30000  // optional, default 30s
}

Response:

{
  "team": "backend",
  "question": "What database migration system do you use?",
  "response": "We use Prisma for database migrations...",
  "duration": 2847,
  "timestamp": 1704067200000
}

Example prompts:

  • "Ask the backend team about their authentication strategy"
  • "Using Iris, find out from mobile team if they support push notifications"
  • "Check with frontend team what state management library they use"

teams_send_message

Send a message to another team, optionally wait for response.

{
  fromTeam: "frontend",      // optional
  toTeam: "backend",
  message: "Breaking change: User model now requires email field",
  waitForResponse: true,     // optional, default true
  timeout: 30000            // optional
}

Response (if waitForResponse = true):

{
  "from": "frontend",
  "to": "backend",
  "message": "Breaking change: User model now requires email field",
  "response": "Acknowledged. Updating user schema and creating migration.",
  "duration": 3200,
  "timestamp": 1704067200000,
  "async": false
}

Example prompts:

  • "Tell the backend team we're deprecating the old API endpoint"
  • "Send a message to mobile team about the new authentication flow"
  • "Coordinate with all teams to update the User model"

teams_notify

Fire-and-forget notification (queued for later).

{
  fromTeam: "backend",    // optional
  toTeam: "frontend",
  message: "New API endpoint available: GET /api/v2/users",
  ttlDays: 30            // optional, default 30
}

Response:

{
  "notificationId": "abc-123-def-456",
  "from": "backend",
  "to": "frontend",
  "message": "New API endpoint available: GET /api/v2/users",
  "expiresAt": 1706745600000,
  "timestamp": 1704067200000
}

Example prompts:

  • "Notify all teams about the scheduled maintenance window"
  • "Send a notification to mobile team about the API changes"

teams_get_status

Get status of teams, processes, and notifications.

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

Response:

{
  "teams": [
    {
      "name": "backend",
      "description": "Node.js Express REST API",
      "path": "/Users/you/projects/acme-backend",
      "active": true,
      "processMetrics": {
        "pid": 12345,
        "status": "idle",
        "messagesProcessed": 47,
        "lastUsed": 1704067200000,
        "uptime": 180000,
        "queueLength": 0
      },
      "notifications": {
        "pending": 2,
        "total": 15
      }
    }
  ],
  "pool": {
    "totalProcesses": 3,
    "maxProcesses": 10
  },
  "queue": {
    "total": 25,
    "pending": 2,
    "read": 20,
    "expired": 3
  },
  "timestamp": 1704067200000
}

Example prompts:

  • "Show me the status of all teams"
  • "Check if the backend team is currently active"
  • "How many pending notifications does frontend have?"

📁 Project Structure

iris-mcp/
├── src/
│   ├── index.ts                 # MCP server entry point
│   ├── config/
│   │   ├── teams-config.ts      # Configuration loader with Zod validation
│   │   └── teams.example.json   # Example configuration
│   ├── process-pool/
│   │   ├── pool-manager.ts      # Process pool with LRU eviction
│   │   ├── claude-process.ts    # Individual Claude process wrapper
│   │   └── types.ts             # TypeScript interfaces
│   ├── tools/
│   │   ├── teams-ask.ts         # teams_ask tool
│   │   ├── teams-send-message.ts
│   │   ├── teams-notify.ts
│   │   ├── teams-get-status.ts
│   │   └── index.ts
│   ├── notifications/
│   │   ├── queue.ts             # SQLite notification queue
│   │   └── schema.sql
│   └── utils/
│       ├── logger.ts            # Structured logging to stderr
│       ├── errors.ts            # Custom error types
│       └── validation.ts        # Input validation
├── teams.json                    # Your team configuration
├── package.json
└── README.md

🏗️ Architecture

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 5 minutes of inactivity
  • Health Checks: Regular monitoring ensures processes stay healthy
  • Connection Pooling: Reuses existing processes for 52%+ faster responses

Notification Queue

Persistent SQLite database stores notifications with:

  • 30-day retention: Automatic cleanup of old notifications
  • Status tracking: pending, read, expired
  • Team filtering: Get notifications for specific teams
  • TTL support: Configurable expiration per notification

Event System

All process events are emitted for future Intelligence Layer integration:

  • process-spawned
  • process-terminated
  • process-exited
  • process-error
  • message-sent
  • message-response

🎯 Configuration Options

Settings

{
  "settings": {
    "idleTimeout": 300000,         // 5 minutes in milliseconds
    "maxProcesses": 10,            // Max concurrent processes
    "healthCheckInterval": 30000   // 30 seconds
  }
}

Team Configuration

{
  "teams": {
    "teamName": {
      "path": "/absolute/path",      // Required: project directory
      "description": "Team description",
      "idleTimeout": 600000,         // Optional: override global timeout
      "skipPermissions": true,       // Optional: auto-approve Claude actions
      "color": "#ff6b6b"            // Optional: hex color for UI (future)
    }
  }
}

🔧 Development

Build

pnpm build

Watch Mode

pnpm dev

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","mobile"],"timestamp":"2025-01-15T10:30:00.000Z"}

🚨 Troubleshooting

"Team not found" error

  • Check that team name in teams.json matches exactly (case-sensitive)
  • Verify the path exists and is absolute

"Process failed to spawn"

  • Ensure claude-code CLI is installed and in PATH
  • Check that the team's project directory is valid
  • Try running claude-code --headless manually in the team directory

"Timeout exceeded"

  • Increase timeout parameter in tool call
  • Check if the target team's Claude process is stuck
  • View logs for error details

Database locked

  • Close other Iris MCP instances
  • Delete data/notifications.db-wal and data/notifications.db-shm

🗺️ Roadmap

✅ Phase 1: Core MCP Server (CURRENT)

  • MCP tools for team coordination
  • Process pool management
  • Notification queue
  • Configuration system

🚧 Phase 2: Web Dashboard

  • React SPA for monitoring
  • Real-time WebSocket updates
  • Team management UI
  • Analytics dashboard

See src/dashboard/README.md

🔮 Phase 3: Programmatic API

  • RESTful HTTP endpoints
  • WebSocket streaming
  • API key authentication
  • Official SDKs (TypeScript, Python)

See src/api/README.md

🔮 Phase 4: CLI

  • 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

See src/intelligence/README.md


📚 Documentation


🤝 Contributing

Contributions welcome! This is Phase 1 - there's lots of exciting work ahead.


📄 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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选