Agent-MCP is a framework for creating multi-agent systems that enables coordinated, efficient AI collaboration through the Model Context Protocol (MCP). The sys
Agent-MCP is a framework for creating multi-agent systems that enables coordinated, efficient AI collaboration through the Model Context Protocol (MCP). The sys
Advanced Tool Notice: This framework is designed for experienced AI developers who need sophisticated multi-agent orchestration capabilities. Agent-MCP requires familiarity with AI coding workflows, MCP protocols, and distributed systems concepts. We're actively working to improve documentation and ease of use. If you're new to AI-assisted development, consider starting with simpler tools and returning when you need advanced multi-agent capabilities.
Join the Community: Connect with us on Discord to get help, share experiences, and collaborate with other developers building multi-agent systems.
Multi-Agent Collaboration Protocol for coordinated AI software development.
Think Obsidian for your AI agents - a living knowledge graph where multiple AI agents collaborate through shared context, intelligent task management, and real-time visualization. Watch your codebase evolve as specialized agents work in parallel, never losing context or stepping on each other's work.
Beyond the philosophical issues, traditional AI coding assistants hit practical limitations:
Agent-MCP transforms AI development from a single assistant to a coordinated team:
Real-time visualization shows your AI team at work - purple nodes represent context entries, blue nodes are agents, and connections show active collaborations. It's like having a mission control center for your development team.
Parallel Execution
Multiple specialized agents work simultaneously on different parts of your codebase. Backend agents handle APIs while frontend agents build UI components, all coordinated through shared memory.
Persistent Knowledge Graph
Your project's entire context lives in a searchable, persistent memory bank. Agents query this shared knowledge to understand requirements, architectural decisions, and implementation details. Nothing gets lost between sessions.
Intelligent Task Management
Monitor every agent's status, assigned tasks, and recent activity. The system automatically manages task dependencies, prevents conflicts, and ensures work flows smoothly from planning to implementation.
…# Clone and setup
git clone https://github.com/rinadelph/Agent-MCP.git
cd Agent-MCP/agent-mcp-node
# Install dependencies
npm install
# Configure environment
cp .env.example .env # Add your OpenAI API key
# Start the server
npm run server
# Or use the built version
npm run build
npm start
# Or install globally
npm install -g agent-mcp-node
agent-mcp --port 8080 --project-dir path-to-directoryThe Model Context Protocol (MCP) is an open standard that enables AI assistants to securely connect to external data sources and tools. Agent-MCP leverages MCP to provide seamless integration with various development tools and services.
Agent-MCP can function as an MCP server, exposing its multi-agent capabilities to MCP-compatible clients like Claude Desktop, Cline, and other AI coding assistants.
# 1. Install Agent-MCP
uv venv
uv install
# 2. Start the MCP server
uv run -m agent_mcp.cli --port 8080
# 3. Configure your MCP client to connect to:
# HTTP: http://localhost:8000/mcp
# WebSocket: ws://localhost:8000/mcp/wsCreate an MCP configuration file (mcp_config.json):
…Add to Claude Desktop Config:
Open ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or equivalent:
{
"mcpServers": {
"agent-mcp": {
"command": "uv",
"args": ["run", "-m", "agent_mcp.cli", "--port", "8080"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key"
}
}
}
}Restart Claude Desktop to load the MCP server
Verify Connection: Claude should show " agent-mcp" in the conversation
Once connected, you can use these MCP tools directly in Claude:
Agent Management
create_agent - Spawn specialized agents (backend, frontend, testing, etc.)list_agents - View all active agents and their statusterminate_agent - Safely shut down agentsTask Orchestration
assign_task - Delegate work to specific agentsview_tasks - Monitor task progress and dependenciesupdate_task_status - Track completion and blockersKnowledge Management
ask_project_rag - Query the persistent knowledge graphupdate_project_context - Add architectural decisions and patternsview_project_context - Access stored project informationCommunication
send_agent_message - Direct messaging between agentsbroadcast_message - Send updates to all agentsrequest_assistance - Escalate complex issuesCustom Transport Options:
# HTTP with custom port
uv run -m agent_mcp.cli --port 8080
# WebSocket with authentication
uv run -m agent_mcp.cli --port 8080 --auth-token your-secret-token
# Unix socket (Linux/macOS)
uv run -m agent_mcp.cli --port 8080Environment Variables:
export AGENT_MCP_HOST=0.0.0.0 # Server host
export AGENT_MCP_PORT=8000 # Server port
export AGENT_MCP_LOG_LEVEL=INFO # Logging level
export AGENT_MCP_PROJECT_DIR=/your/project # Default project directory
export AGENT_MCP_MAX_AGENTS=10 # Maximum concurrent agents…import { MCPClient } from '@modelcontextprotocol/client';
const client = new MCPClient('http://localhost:8000/mcp');
async function createAgent() {
await client.connect();
const agent = await client.callTool('create_agent', {
role: 'frontend',
specialization: 'React components'
});
console.log('Created agent:', agent.agent_id);
await client.disconnect();
}
createAgent().catch(console.error);Connection Issues:
# Check if MCP server is running
curl http://localhost:8000/mcp/health
# Verify WebSocket connection
wscat -c ws://localhost:8000/mcp/ws
# Check server logs
uv run -m agent_mcp.cli --port 8080 --log-level DEBUGCommon Issues:
--port flaglist_agentsVS Code with MCP: Use the MCP extension to integrate Agent-MCP directly into your editor workflow.
Terminal Usage:
# Quick task assignment via curl
curl -X POST http://localhost:8000/mcp/tools/assign_task \
-H "Content-Type: application/json" \
-d '{"task": "Add error handling to API endpoints", "agent_role": "backend"}'CI/CD Integration:
# GitHub Actions example
- name: Run Agent-MCP Code Review
run: |
uv run -m agent_mcp.cli --port 8080 --daemon
curl -X POST localhost:8000/mcp/tools/assign_task \
-d '{"task": "Review PR for security issues", "agent_role": "security"}'graph LR
A[Step 1] --> B[Step 2] --> C[Step 3] --> D[Step 4] --> E[Done!]
style A fill:#4ecdc4,color:#fff
style E fill:#ff6b6b,color:#fffEvery task can be broken down into linear steps. This is the core insight that makes Agent-MCP powerful.
graph TD
A["Build User Authentication"] -->|Single Agent Tries Everything| B{???}
B --> C[Database?]
B --> D[API?]
B --> E[Frontend?]
B --> F[Security?]
B --> G[Tests?]
C -.->|Confused| H[Incomplete Implementation]
D -.->|Overwhelmed| H
E -.->|Context Lost| H
F -.->|Assumptions| H
G -.->|Forgotten| H
style A fill:#ff6b6b,color:#fff
style H fill:#666,color:#fffgraph TD
A["Build User Authentication"] -->|Break Down| B[Linear Tasks]
B --> C["Agent 1: Database"]
B --> D["Agent 2: API"]
B --> E["Agent 3: Frontend"]
C --> C1[Create users table]
C1 --> C2[Add indexes]
C2 --> C3[Create sessions table]
D --> D1[POST /register]
D1 --> D2[POST /login]
D2 --> D3[POST /logout]
E --> E1[Login Form]
E1 --> E2[Register Form]
E2 --> E3[Auth Context]
C3 --> F[Working System]
D3 --> F
E3 --> F
style A fill:#4ecdc4,color:#fff
style F fill:#4ecdc4,color:#fffEach agent focuses on their linear chain. No confusion. No context pollution. Just clear, deterministic progress.
You are the admin agent.
Admin Token: "your_admin_token_from_server"
Your role is to:
- Coordinate all development work
- Create and manage worker agents
- Maintain project context
- Assign tasks based on agent specializationsAdd this MCD (Main Context Document) to project context:
[paste your MCD here - see docs/mcd-guide.md for structure]
Store every detail in the knowledge graph. This becomes the single source of truth for all agents.The MCD (Main Context Document) is your project's comprehensive blueprint - think of it as writing the book of your application before building it. It includes:
See our MCD Guide for detailed examples and templates.
Create specialized agents for parallel development:
- backend-worker: API endpoints, database operations, business logic
- frontend-worker: UI components, state management, user interactions
- integration-worker: API connections, data flow, system integration
- test-worker: Unit tests, integration tests, validation
- devops-worker: Deployment, CI/CD, infrastructureEach agent specializes in their domain, leading to higher quality implementations and faster development.
# In new window for each worker:
You are [worker-name] agent.
Your Admin Token: "worker_token_from_admin"
Query the project knowledge graph to understand:
1. Overall system architecture
2. Your specific responsibilities
3. Integration points with other components
4. Coding standards and patterns to follow
5. Current implementation status
Begin implementation following the established patterns.
AUTO --worker --memoryImportant: Setting Agent Modes
Agent modes (like --worker, --memory, --playwright) are not just flags - they activate specific behavioral patterns. In Claude Code, you can make these persistent by:
# to open Claude's memory featureExample for Claude Code memory:
# When I use "AUTO --worker --memory", follow these patterns:
- Always check file status before editing
- Query project RAG for context before implementing
- Document all changes in task notes
- Work on one file at a time, completing it before moving on
- Update task status after each completionThis ensures consistent behavior across your entire session without
No open issues yet, or sync has not completed.