Overview
The Model Context Protocol (MCP) is Routa’s primary coordination interface. It exposes specialized tools that enable agents to collaborate on complex tasks through delegation, messaging, and shared state management. Key Purpose: Enable AI agents (Claude Code, OpenCode, Gemini, etc.) to coordinate work across multiple agents without direct implementation details. Built on: Anthropic’s Model Context ProtocolWhen to Use MCP
Use MCP when you need agents to:- Delegate tasks to other agents (coordinators spawning implementers)
- Share context through notes and conversation history
- Track progress across multiple concurrent tasks
- Coordinate workflows with task dependencies and parallel execution
Architecture
MCP server is created and configured insrc/core/mcp/routa-mcp-server.ts:39:
Tool Modes
MCP supports two tool registration modes:Tool registration mode for the MCP server
essential— 12 core coordination tools (Agent + Note) for weak modelsfull— All 34 tools (Task, Agent, Note, Workspace, Git) for stronger models
Available Tools
Essential Mode (12 tools)
Minimum viable set for multi-agent coordination:Agent Tools (7)
list_agents
list_agents
List all agents in the workspace with their status and roles.
read_agent_conversation
read_agent_conversation
Read conversation history of another agent.
create_agent
create_agent
Create a new agent with a specific role.
set_agent_name
set_agent_name
Set your agent’s display name to reflect current task.
delegate_task
delegate_task
Assign a task to an existing agent and activate it.
delegate_task_to_agent
delegate_task_to_agent
Primary delegation tool — spawns a real agent process.Important:
taskId must be a UUID from create_task, NOT a task name.send_message_to_agent
send_message_to_agent
Send a message from one agent to another.
report_to_parent
report_to_parent
Submit completion report to parent agent.
Note Tools (5)
Shared document management for agent collaboration:create_note
create_note
Create a new note for agent collaboration.
read_note
read_note
Read note content. Use
noteId='spec' for workspace spec.list_notes
list_notes
List all notes, optionally filtered by type.
set_note_content
set_note_content
Replace note content. Spec note is auto-created if missing.
convert_task_blocks
convert_task_blocks
Convert Parses markdown blocks like:
@@@task blocks in notes into structured Task records.Full Mode (34 tools)
Includes all essential tools plus:- Task tools (4) —
create_task,list_tasks,update_task_status,update_task - Extended agent tools (6) —
wake_or_create_task_agent,send_message_to_task_agent,get_agent_status,get_agent_summary,subscribe_to_events,unsubscribe_from_events - Extended note tools (2) —
append_to_note,get_my_task - Workspace tools (8) —
git_status,git_diff,git_commit,get_workspace_info,get_workspace_details,set_workspace_title,list_workspaces,create_workspace,list_specialists
Configuration Options
Workspace identifier for all operations
Tool registration mode:
"essential"— 12 core tools for weak models"full"— All 34 tools for strong models
Optional existing RoutaSystem instance (auto-created if omitted)
ACP session ID to scope note/task creation to a specific session
Example Usage
Coordinator Delegating Work
Spec-Driven Workflow
Connection Types
MCP server supports multiple transport mechanisms:SSE (Server-Sent Events)
For web-based agents (Claude Code):WebSocket
For real-time bidirectional communication:stdio
For local process communication (OpenCode, Codex):Tool Execution
Tool calls are executed viasrc/core/mcp/mcp-tool-executor.ts:30:
Best Practices
Use Essential Mode for Weak Models
Use Essential Mode for Weak Models
Models with limited context windows (Claude Haiku, GPT-3.5) should use
toolMode: "essential" to reduce token usage.The 12 essential tools provide full coordination capabilities without overwhelming the model.Always Use UUIDs for Task Delegation
Always Use UUIDs for Task Delegation
Never pass task names to
delegate_task_to_agent. Always use UUIDs returned by create_task:Use Spec Notes for Complex Workflows
Use Spec Notes for Complex Workflows
For multi-task projects, create a spec note with
@@@task blocks, then convert them:Report Completion to Parent
Report Completion to Parent
All child agents must call
report_to_parent when done:Related Protocols
- ACP (Agent Client Protocol) — Spawns and manages agent processes
- A2A (Agent-to-Agent) — Exposes agents as A2A-compatible tasks for external federation
API Reference
MCP Server
Create and configure MCP servers
Tool Manager
Register and execute coordination tools
Agent Tools
Core agent coordination operations
Note Tools
Shared document management