Claude Orchestrator MCP
An MCP server for coordinating multiple Claude Code sessions across related projects.
README
Claude Orchestrator MCP
An MCP server for coordinating multiple Claude Code sessions across related projects. When you're working on a multi-service system with separate repos (e.g., auth service, API gateway, frontend), this orchestrator enables sessions to communicate changes, request sync points, and stay aware of what's happening in related services.
The Problem
You have 6 repos for a platform, each with its own Claude Code session. When the auth service session modifies the User schema:
- The API gateway session has no idea
- The frontend session keeps using old types
- Someone has to manually copy/paste context between terminals
- Changes get out of sync, causing integration issues
The Solution
Claude Orchestrator acts as a coordination layer:
┌─────────────────────────────────────────────────────────────┐
│ claude-orchestrator-mcp │
│ │
│ Sessions register → Changes detected → Updates routed │
│ │
└─────────────────────────────────────────────────────────────┘
│ │ │ │
┌────┴───┐ ┌────┴───┐ ┌────┴───┐ ┌────┴───┐
│ Auth │ │ API │ │ Catalog│ │Frontend│
│Session │ │Session │ │Session │ │Session │
└────────┘ └────────┘ └────────┘ └────────┘
Installation
# Clone and build
git clone <repo>
cd claude-orchestrator-mcp
npm install
npm run build
# Or install globally
npm install -g claude-orchestrator-mcp
Quick Start
1. Initialize configuration
# Create example topology
npx claude-orchestrator init
# Or manually create your topology
npx claude-orchestrator group create my-platform
npx claude-orchestrator member add my-platform ~/repos/auth-service --role auth
npx claude-orchestrator member add my-platform ~/repos/api-gateway --role gateway --depends-on auth
npx claude-orchestrator member add my-platform ~/repos/frontend --role frontend --depends-on gateway
2. Add to Claude Code MCP configuration
Add to your ~/.claude.json:
{
"mcpServers": {
"claude-orchestrator": {
"command": "node",
"args": ["/path/to/claude-orchestrator-mcp/dist/index.js"]
}
}
}
Or if installed globally:
{
"mcpServers": {
"claude-orchestrator": {
"command": "npx",
"args": ["-y", "claude-orchestrator-mcp"]
}
}
}
3. Use in your Claude Code sessions
When starting work in a repo:
> Use the register_session tool with repoPath="/Users/me/repos/auth-service",
projectGroup="my-platform", role="auth"
Check for updates from other sessions:
> Use get_cross_project_updates with my session ID
Notify others about a change:
> Use notify_related_sessions to broadcast that I modified the User schema
Configuration
The topology configuration lives at ~/.config/claude-orchestrator/topology.yml:
version: "1.0"
groups:
my-platform:
name: my-platform
description: "My multi-service platform"
members:
- path: ~/repos/auth-service
role: auth
exports: [UserToken, AuthContext]
- path: ~/repos/api-gateway
role: gateway
dependsOn: [auth]
- path: ~/repos/frontend
role: frontend
dependsOn: [gateway]
communicationRules:
- when: schema_change
from: "*"
notify: dependents
priority: high
- when: breaking_change
from: "*"
notify: all
priority: critical
Change Types
schema_change- Database/GraphQL/Protobuf schema changesapi_endpoint_change- Route/controller/API changestype_definition_change- TypeScript/interface changesconfig_change- Configuration file changesdependency_update- package.json/requirements.txt changesbreaking_change- Detected via commit message patternsany_change- Catch-all for any file change
Notification Targets
"all"- Notify all members in the group"dependents"- Notify only members that depend on the source["role1", "role2"]- Notify specific roles
MCP Tools
Session Management
| Tool | Description |
|---|---|
register_session |
Register this session with the orchestrator |
unregister_session |
Unregister when done |
heartbeat |
Keep session active, update current task |
Cross-Project Updates
| Tool | Description |
|---|---|
get_cross_project_updates |
Check for updates from related sessions |
notify_related_sessions |
Broadcast a change to related sessions |
State Queries
| Tool | Description |
|---|---|
query_project_state |
Query another project's status/changes |
list_group_sessions |
List all sessions in a project group |
Sync Points
| Tool | Description |
|---|---|
request_sync_point |
Request coordination barrier |
acknowledge_sync_point |
Acknowledge a sync request |
get_pending_sync_points |
Get pending sync requests |
Topology
| Tool | Description |
|---|---|
get_topology |
Get project topology configuration |
CLI Commands
# Group management
claude-orchestrator group create <name>
claude-orchestrator group list
claude-orchestrator group show <name>
claude-orchestrator group delete <name>
# Member management
claude-orchestrator member add <group> <path> --role <role> --depends-on <roles>
claude-orchestrator member remove <group> <path>
# Rule management
claude-orchestrator rule add <group> --when <type> --from <roles> --notify <targets>
# Utilities
claude-orchestrator validate
claude-orchestrator init
claude-orchestrator config-path
How It Works
-
Session Registration: Each Claude Code session registers with the orchestrator, providing its repo path, project group, and role.
-
Change Detection: The orchestrator watches registered repos for file changes (via chokidar) and git commits (via polling). Changes are classified by type based on file patterns.
-
Event Routing: When changes are detected, the topology manager determines which sessions should be notified based on communication rules and dependency relationships.
-
Update Queuing: Updates are queued for target sessions. When a session calls
get_cross_project_updates, it receives all pending notifications. -
Sync Points: Sessions can request sync points for coordinated changes. Other sessions are notified and can acknowledge before the requester proceeds.
Example Workflow
Terminal 1 (auth-service):
> Register session for auth-service in my-platform group
> [Working on User schema changes...]
> Notify related sessions: "Modified User schema, added refreshToken field"
Terminal 2 (api-gateway):
> Register session for api-gateway in my-platform group
> Check for cross-project updates
> [Receives notification about User schema change]
> "Update UserToken type to include refreshToken"
Terminal 3 (frontend):
> Register session for frontend in my-platform group
> Check for cross-project updates
> [Receives notification via gateway dependency chain]
> "Update auth context to handle new token field"
Development
# Install dependencies
npm install
# Build
npm run build
# Run in development mode
npm run dev
# Run CLI
npm run cli -- group list
# Type check
npm run typecheck
# Run tests
npm test
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。