A2A + MCP 브리지 패턴
에이전트고급
에이전트 간 협업은 A2A로, 툴/데이터 연결은 MCP로 분리해 대규모 멀티에이전트 구조를 안정화합니다.
A2AMCP멀티에이전트상호운용성
패턴 코드
# A2A + MCP Bridge Architecture
## Overview
Agent-to-Agent (A2A) handles **inter-agent communication**
MCP handles **agent-to-tool communication**
```
┌─────────────────────────────────────────┐
│ Orchestrator │
│ (A2A Client + MCP Host) │
└──────┬──────────┬──────────┬────────────┘
│ A2A │ A2A │ A2A
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Research │ │ Coding │ │ Review │
│ Agent │ │ Agent │ │ Agent │
│ (Remote) │ │ (Local) │ │ (Remote) │
└────┬─────┘ └────┬─────┘ └────┬─────┘
│ MCP │ MCP │ MCP
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ Web │ │ GitHub │ │ Sentry │
│ Search │ │ MCP │ │ MCP │
│ MCP │ │ Server │ │ Server │
└─────────┘ └─────────┘ └─────────┘
```
## Agent Card (A2A Discovery)
```json
{
"name": "coding-agent",
"description": "Implements code changes per specification",
"url": "https://agents.example.com/coding",
"capabilities": {
"streaming": true,
"pushNotifications": true
},
"skills": [
{ "id": "implement", "name": "Code Implementation" },
{ "id": "refactor", "name": "Code Refactoring" }
],
"mcpServers": [
{ "name": "github", "transport": "stdio" },
{ "name": "postgres", "transport": "streamable-http" }
]
}
```
## Orchestration Flow
```typescript
// 1. Discover available agents via A2A
const agents = await a2aClient.discover();
// 2. Create task for research agent
const researchTask = await a2aClient.createTask(
agents.find(a => a.skills.includes('research')),
{ message: "Research best practices for auth middleware" }
);
// 3. Wait for research, then delegate to coding agent
const researchResult = await a2aClient.waitForTask(researchTask.id);
const codingTask = await a2aClient.createTask(
agents.find(a => a.skills.includes('implement')),
{
message: "Implement auth middleware based on research",
context: researchResult.artifacts
}
);
// 4. Each agent uses MCP internally for tool access
// coding-agent → GitHub MCP (create branch, commit)
// coding-agent → PostgreSQL MCP (check schema)
// review-agent → Sentry MCP (check error patterns)
```
## Key Design Principles
1. **A2A for delegation**: agents don't call each other's tools directly
2. **MCP for tools**: each agent manages its own MCP connections
3. **Agent Cards for discovery**: no hardcoded agent endpoints
4. **Task lifecycle via A2A**: submitted → working → completed/failed
이 패턴을 프로젝트 설정에 복사하여 적용하세요.
실행 미리보기
A2A + MCP 브리지 패턴
A2A + MCP 브리지 패턴에 대해
Claude Code 패턴은 복잡한 개발 시나리오를 효과적으로 다루기 위한 검증된 아키텍처 설계와 워크플로우 구조입니다. A2A + MCP 브리지 패턴은(는) 고급 수준의 에이전트 패턴으로, 프로젝트에 맞게 응용할 수 있는 테스트된 반복 가능한 접근 방식을 제공하여 더 효율적이고 일관된 결과를 만들어 냅니다.