Claude Code MCP - Agent Orchestration Platform
Orchestrates multiple Claude Code agents across iTerm2 sessions with process-level isolation, enabling collaborative AI development workflows on multiple codebases with task-based inter-agent communication and persistent state management.
README
Claude Code MCP - Agent Orchestration Platform
Overview
A sophisticated FastMCP Python server that orchestrates multiple Claude Code agents across iTerm2 sessions, providing centralized management and inter-agent communication through task-based workflows.
Architecture
Agent Orchestration Platform with:
- iTerm2 Tab-Based Sessions: No window complexity, pure tab management
- Persistent Agent State: Survives iTerm restarts with state recovery
- Codebase-Linked Sessions: Sessions tied to specific root filepaths
- Maximum Security Isolation: Process-level separation between agents
- Task-Based Inter-Agent Communication: ADDER+ workflow coordination
- System Prompt Injection: Automatic Agent_# naming and prompt prepending
Core MCP Tools
| Tool | Purpose | Security Level |
|---|---|---|
create_agent |
Creates new Claude Code agent instance | HIGH |
delete_agent |
Removes agent from system | HIGH |
create_session |
Creates session tied to root filepath | MEDIUM |
get_session_status |
Returns status of all agents in session | LOW |
delete_session |
Removes entire session and all agents | HIGH |
send_message_to_agent |
Sends message with ADDER+ prepending | MEDIUM |
clear_agent_conversation |
Closes current iTerm tab for agent | MEDIUM |
start_new_agent_conversation |
Opens new iTerm tab for agent | MEDIUM |
ADDER+ Workflow Integration
Each agent operates with the comprehensive ADDER+ (Advanced Development, Documentation & Error Resolution) protocol, enabling:
- Autonomous Task Management: TODO.md-driven execution with real-time progress tracking
- Advanced Programming Synthesis: Design by Contract + defensive programming + type-driven development + property-based testing + functional programming patterns
- Systematic Error Resolution: Root Cause Analysis with automatic task generation
- Inter-Agent Coordination: Task-based communication through documentation files
Security Model
- Process Isolation: Each Claude Code agent runs in separate process
- Session Boundaries: Agents cannot access other session codebases
- State Encryption: Persistent agent state encrypted at rest
- Audit Logging: All agent interactions logged for security analysis
- Permission Model: Role-based access control for agent operations
Quick Start
# Install dependencies
uv sync
# Start the MCP server
python src/main.py
Claude Desktop Configuration
To use this Agent Orchestration Platform with Claude Desktop, you need to configure it as an MCP server in Claude's configuration file.
Configuration File Location
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Windows:
%APPDATA%/Claude/claude_desktop_config.json
Configuration Steps
-
Open Configuration File: Navigate to the configuration file location above. Create the file if it doesn't exist.
-
Add Server Configuration: Add the following configuration to your
claude_desktop_config.json:
Option 1: Using UV (Recommended)
{
"mcpServers": {
"claude-code-mcp": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/Claude_Code_MCP",
"run",
"python",
"src/main.py"
],
"env": {
"PYTHONPATH": "/ABSOLUTE/PATH/TO/Claude_Code_MCP/src"
}
}
}
}
Option 2: Using Python Directly
{
"mcpServers": {
"claude-code-mcp": {
"command": "python",
"args": [
"/ABSOLUTE/PATH/TO/Claude_Code_MCP/src/main.py"
],
"env": {
"PYTHONPATH": "/ABSOLUTE/PATH/TO/Claude_Code_MCP/src"
}
}
}
}
Option 3: Using Virtual Environment
{
"mcpServers": {
"claude-code-mcp": {
"command": "/ABSOLUTE/PATH/TO/Claude_Code_MCP/.venv/bin/python",
"args": [
"/ABSOLUTE/PATH/TO/Claude_Code_MCP/src/main.py"
],
"env": {
"PYTHONPATH": "/ABSOLUTE/PATH/TO/Claude_Code_MCP/src"
}
}
}
}
Configuration Notes
- Replace
/ABSOLUTE/PATH/TO/Claude_Code_MCPwith the actual absolute path to your project directory - On Windows, use backslashes in paths:
C:\\path\ o\\Claude_Code_MCP - Server Name: You can change
"claude-code-mcp"to any name you prefer - Virtual Environment: If using a virtual environment, adjust the Python path accordingly
Advanced Configuration Options
With Custom Security Level
{
"mcpServers": {
"claude-code-mcp": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/Claude_Code_MCP",
"run",
"python",
"src/main.py",
"--security-level",
"HIGH",
"--max-agents",
"16",
"--max-sessions",
"8"
],
"env": {
"PYTHONPATH": "/ABSOLUTE/PATH/TO/Claude_Code_MCP/src"
}
}
}
}
With Custom Log Directory
{
"mcpServers": {
"claude-code-mcp": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/Claude_Code_MCP",
"run",
"python",
"src/main.py",
"--log-dir",
"/ABSOLUTE/PATH/TO/Claude_Code_MCP/logs"
],
"env": {
"PYTHONPATH": "/ABSOLUTE/PATH/TO/Claude_Code_MCP/src"
}
}
}
}
Verification Steps
- Save Configuration: Save the
claude_desktop_config.jsonfile - Restart Claude Desktop: Completely quit and restart Claude Desktop
- Check MCP Status: Look for MCP server indicators in the Claude Desktop interface:
- Hammer icon (🔨) indicating available tools
- Connector icon indicating MCP server connection
- Test Functionality: Try using one of the agent orchestration tools
Troubleshooting
Server Not Loading
- Verify all paths are absolute (not relative)
- Check that
uvorpythonis in your system PATH - Ensure the project directory exists and has correct permissions
- Review Claude Desktop logs at:
- macOS:
~/Library/Logs/Claude/mcp*.log - Windows:
%APPDATA%\Claude\logs\mcp*.log
- macOS:
Manual Testing
Test the server manually before configuring Claude Desktop:
# Navigate to project directory
cd /path/to/Claude_Code_MCP
# Test with UV
uv run python src/main.py --help
# Test with Python directly
python src/main.py --help
Common Issues
- Permission Errors: Ensure Claude Desktop has permission to execute the Python interpreter
- Import Errors: Verify
PYTHONPATHis correctly set in the configuration - Port Conflicts: If using HTTP transport, ensure the port (default 8000) is available
Available MCP Tools
Once configured, Claude Desktop will have access to these agent orchestration tools:
create_agent- Create new Claude Code agent instancesdelete_agent- Remove agents from the systemcreate_session- Create sessions tied to specific codebasesget_session_status- Get status of all agents in a sessiondelete_session- Remove entire sessions and all agentssend_message_to_agent- Send messages with ADDER+ protocol integrationclear_agent_conversation- Close current iTerm tab for agentstart_new_agent_conversation- Open new iTerm tab for agent
Development Workflow
- Session Creation: Link sessions to specific codebases
- Agent Spawning: Create specialized agents with custom system prompts
- Task Coordination: Agents communicate through TODO.md and task files
- Status Monitoring: Real-time visibility into agent progress and health
- Session Management: Persistent state with recovery capabilities
Integration Points
- FastMCP Framework: High-performance MCP server implementation
- iTerm2 Python API: Advanced terminal session management
- Claude Code: AI agent process orchestration
- Asyncio Architecture: Event-driven concurrent agent management
This platform enables sophisticated AI development workflows with multiple specialized agents working collaboratively on complex codebases while maintaining strict security isolation and comprehensive audit trails.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。