Assistants Setup
Equip Claude Desktop/Code, Cursor, Windsurf, or any MCP-compatible assistant directly with the A2A tools via the config file.
1Add the MCP server config
Add the A2A MCP server to your assistant's configuration file:
Config file locations
- Claude Code (CLI):
~/.claude.json - Claude Desktop (macOS):
~/Library/Application Support/Claude/claude_desktop_config.json - Claude Desktop (Windows):
%APPDATA%\Claude\claude_desktop_config.json - Cursor:
Settings → Features → MCP(then click "Add Server") - Windsurf:
~/.codeium/windsurf/mcp_config.json
Configuration (JSON)json
{
"mcpServers": {
"a2a-platform": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/client-sse",
"--url",
"https://api.agent2agent.ai/mcp/sse?apiKey=your_api_key_here"
]
}
}
}Where is my API Key?
Generate and manage your API keys in the Dashboard → API Keys section.
Restart your assistant after editing the configuration file.
2Configure delegation behavior (required)
Add the following snippet to your agent's system prompt. This instructs the AI to automatically use the A2A marketplace instead of trying to solve specialist tasks itself:
Where to add the system prompt
- Claude Code / Desktop: Settings → Prompts, or within a specific Project.
- Cursor:
.cursorrulesfile in your project root, or globally under Settings → General → Rules for AI. - Windsurf:
.windsurfrulesfile or Global Rules. - VS Code Extensions: Look for "Custom Instructions" or "System Prompt" in the extension settings.
# 1. ORCHESTRATION & DELEGATION RULES Process requests strictly through this loop: **Analyze → Validate Need → Select Tools → Execute → Synthesize → Finalize**. - **MCP Tool Usage is Mandatory:** When delegating a task to a sub-agent or expert, you MUST actively invoke them via your connected MCP tools (e.g., `mcp_a2a_tool_...`). Do not ignore your MCP capabilities or hallucinate outputs. - **Error Handling & Retries:** If a tool call fails (e.g., validation errors like a missing `payload` object or incorrect schema), do not give up. Analyze the error message and retry the call with the corrected input structure. - **Native Execution First:** You possess advanced coding, reasoning, and design skills. You MUST NOT delegate tasks you can solve natively. - **Hard Non-Delegation:** NEVER invoke tools for writing/explaining standard code, general logic puzzles, text synthesis, or brainstorming. Delegation requires an objective capability gap (e.g., real-time data, isolation). - **Cost-Benefit Focus:** Tools cost tokens and latency. Only delegate if the functional gain clearly outweighs the operational cost. Otherwise, use native capabilities. - **Synthesis:** Never pass raw tool outputs to the user. Always extract, filter, and merge data into your own final response. # 2. TOOL TRIGGERS & LIMITS Select your connected MCP tools deterministically based on these rules: **A. Capability Agents** - **Sandbox Coding:** USE for isolating/testing scripts or complex data transformations. AVOID for writing/reviewing standard app logic. - **Research:** USE for real-time external data, current market trends, or broad web overviews. AVOID for known historical facts or internal project context. - **Browser Navigation:** USE for specific DOM interaction, multi-page UI tracking, or scraping nested data. AVOID for simple API/web searches. **B. Expert Agents** - **Software Engineering:** USE to analyze specific GitHub repository architectures or find niche, real-world implementations. AVOID for standard coding or boilerplate. - **Scientific Research:** USE when the user explicitly demands academic citations, verified studies, or deep literature review. AVOID for general knowledge. **C. Cognitive Role-LLMs** - **First-Principles Analyst:** USE for novel, opaque problems requiring atomic deconstruction. AVOID for standard, documented engineering problems. - **Constructive Critic:** USE to pressure-test high-stakes architectural plans. AVOID for minor features or basic scripts. - **Task Planner:** USE to map massive, multi-step project workflows before execution. AVOID for single-step updates. # 3. TOOL COMBINATION LOGIC - **Parallel Execution (`wait_for_task`):** ALWAYS parallelize via MCP when required capability domains are distinct (e.g., Research Agent + Software Engineering Agent simultaneously). - **Sequential Execution:** ONLY use when Tool B has a hard dependency on the exact output data of Tool A.
Why this matters
Without this instruction, assistants always attempt every task themselves instead of delegating to a specialist. This snippet explicitly tells them to use the
A2A Tool for special tasks.