Repository navigation
Description
Proposal
Follow-up to #252 and this discussion.
Motivation
The production tutorials added in #252 demonstrate realistic A2A discovery and agent-to-agent delegation, but their input data is still provided directly from local sample files.
A useful next step is to demonstrate how A2A and MCP work together:
- A2A remains responsible for agent discovery, delegation, and exchanging results between independent agents.
- MCP gives an individual agent access to external tools and resources such as documents, ticket systems, databases, or other application data.
This would make the tutorials more representative of real production agent workflows.
Goal
Extend the existing production tutorials so at least one agent in each workflow retrieves its working data through MCP instead of receiving all source data directly from local files.
The resulting examples should clearly demonstrate:
User / client
|
| A2A
v
Coordinator agent
|
| A2A
v
Specialist agent
|
| MCP
v
External tool / resource
A2A should continue to be used only for agent-to-agent communication. MCP should be used for access to tools and external resources.
Proposed tutorial scenarios
Job Application Assistant
Instead of always passing the resume contents directly from samples/resume.txt, allow the workflow to reference a resume stored externally.
Example flow:
application_client
|
| A2A: prepare application for resume <resource-id>
v
application_coordinator
|
| A2A
v
profile_analyst
|
| MCP
v
document / resume store
The MCP-backed resource could represent a Google Drive-like document source.
The profile analyst should retrieve the resume through MCP and then perform the same structured analysis currently demonstrated by the tutorial.
Customer Support Copilot
Instead of always passing the complete support ticket from samples/*.txt, allow the workflow to reference a ticket stored in an external issue/support system.
Example flow:
support_client
|
| A2A: resolve ticket <ticket-id>
v
support_coordinator
|
| A2A
v
support_specialist
|
| MCP
v
ticket / support system
The MCP-backed resource could represent a Linear-like ticket system.
The specialist should fetch the ticket and relevant context through MCP before producing its diagnosis and structured response.
Local and CI-friendly execution
The tutorials must remain runnable without external SaaS accounts or credentials.
Provide a local MCP-backed data source that can run as part of the tutorial Docker Compose stack and contains deterministic fixture data corresponding to the existing samples.
For example:
docker compose
├── application-coordinator
├── profile-analyst
└── document-mcp-server
and:
docker compose
├── support-coordinator
├── support-specialist
└── ticket-mcp-server
The exact backing store is an implementation choice. The important requirement is that the agent accesses it through MCP rather than reading the fixture directly from the local filesystem.
The local implementation should:
- require no API keys;
- start together with the tutorial Compose stack;
- contain seeded deterministic fixtures;
- be usable from CI;
- have bounded startup/readiness checks;
- be cleaned up automatically after tests.
Optional real integrations
Documentation may additionally show how the same pattern can be connected to a real service such as:
- Google Drive or another document store for resumes;
- Linear or another issue/ticket system for support tickets.
Real third-party integrations should be optional. The default tutorial and CI path must remain fully local and deterministic.
Do not commit credentials or make external SaaS availability a test dependency.
Implementation considerations
- Keep MCP integration tutorial-specific unless a reusable SDK-level abstraction is independently justified.
- Do not add MCP concepts to the A2A protocol implementation itself.
- Preserve the current A2A Agent Card discovery and coordinator-to-specialist delegation flow.
- Prefer a small, explicit MCP client integration over introducing a large framework dependency only for the tutorials.
- If an external C++ MCP client library is introduced, document why it was selected and keep the dependency isolated from the core
a2a-cpptargets where possible. - Reuse the current deterministic model backend so MCP/A2A interoperability can be tested independently of an AI provider.
- The existing OpenAI-compatible model mode should continue to work with the MCP-backed flows.
- All network operations should use bounded timeouts and actionable errors.
Documentation
Update the tutorial READMEs to explain the responsibility split:
A2A connects independent agents. MCP connects an individual agent to its tools and resources.
Each tutorial should include:
- architecture diagram showing both A2A and MCP boundaries;
- local Docker Compose instructions;
- host-native instructions where practical;
- how fixture/resource IDs are supplied to the client;
- optional instructions or guidance for replacing the local MCP service with a real external integration.
Acceptance criteria
- At least one MCP-backed external resource is added to each production tutorial.
- Job Application Assistant can retrieve resume data through MCP using a resource/document identifier.
- Customer Support Copilot can retrieve ticket data through MCP using a ticket identifier.
- Coordinator-to-specialist communication continues to use A2A.
- MCP is used only for agent-to-tool/resource access and is not mixed into A2A transport semantics.
- Both tutorials have a fully local, deterministic MCP setup that requires no external credentials.
- Docker Compose starts the required MCP service(s) together with the tutorial agents.
- Automated smoke tests verify the complete
client -> A2A -> agent -> MCP -> resourceflow. - Existing deterministic model mode continues to pass.
- OpenAI-compatible model mode remains supported.
- MCP service readiness and network calls use bounded timeouts.
- Tutorial documentation clearly explains the A2A/MCP responsibility split.
- Core SDK public APIs are unchanged unless a separate, justified SDK-level requirement is identified.
- Existing tutorial behavior remains available or has a documented migration path.
Non-goals
- Building a general-purpose MCP framework inside
a2a-cpp. - Requiring Google Drive, Linear, or any other external SaaS service for CI.
- Replacing A2A delegation with MCP tool calls.
- Adding provider-specific credentials to the repository.
- Turning the tutorials into production-ready Google Drive or Linear integrations.
Validation
The implementation should include automated coverage for at least:
- successful MCP resource retrieval;
- missing resource / unknown identifier;
- MCP service unavailable or timeout;
- successful end-to-end A2A delegation using MCP-retrieved data;
- deterministic backend execution without external AI calls.
All repository requirements from AGENTS.md must continue to pass, including formatting, clang-tidy, tests, tutorial smoke tests, and the normal validation gates for the files touched by the implementation.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity