This repository contains a complete implementation of Assignment 5. The project includes:
- An MCP server exposing database tools for a customer support CRM.
- Three agents designed under the A2A specification: Router Agent, Customer Data Agent, and Support Agent.
- A LangGraph-based multi-agent coordination system supporting task allocation, negotiation, and multi-step workflows.
- An A2A HTTP server exposing each agent through AgentCards and Tasks.
- End-to-end test scenarios validating correct behavior.
- Full compliance with the Assignment 5 PDF and the TA’s stricter requirement that agents must use MCP for database operations and must expose A2A interfaces.
multiagent-a5/
└── src/assignment5/
├── database_setup.py
├── mcp_server.py
├── agents.py
└── a2a_http_server.py
scripts/
├── run_mcp_server.sh
└── run_a2a_server.sh
requirements.txt
README.md
The MCP server wraps the SQLite database (support.db) and exposes the following MCP tools:
- list_customers
- get_customer
- get_customer_history
- update_customer
- create_ticket
The server is implemented using FastMCP and provides both STDIO and SSE/HTTP transports. It fully supports tools/list and tools/call and is testable via MCP Inspector.
This satisfies the requirement that customer and ticket data must be accessed “via MCP”.
Three A2A-compliant agents are implemented:
-
Router Agent
Performs intent analysis and routes requests to Customer Data or Support Agent. -
Customer Data Agent
Retrieves customer information using MCP tools. Does not use raw SQL. -
Support Agent
Creates tickets, extracts missing details through negotiation, and interacts with MCP tools.
Each agent defines:
- An AgentCard
- Capabilities and Skills
- A
/tasksendpoint - Independent A2A-compliant operation
This meets the TA requirement that “each agent must have an A2A interface”.
A FastAPI-based server exposes A2A endpoints for each agent:
- /router/.well-known/agent-card.json
- /router/tasks
- /customer/.well-known/agent-card.json
- /customer/tasks
- /support/.well-known/agent-card.json
- /support/tasks
These endpoints may be tested using curl or the built-in test client in the notebook.
Create a virtual environment:
python -m venv .venv
source .venv/bin/activatepip install -r requirements.txt
Run the database setup script:
- python -m src.assignment5.database_setup
This creates the SQLite database with tables and seed data.
STDIO mode (MCP Inspector compatible):
- ./scripts/run_mcp_server.sh
- python -m src.assignment5.mcp_server
MCP Inspector configuration:
- Transport: STDIO
- Command: python
- Arguments: ["-m", "src.assignment5.mcp_server"]
Start the A2A server:
- ./scripts/run_a2a_server.sh
- python -m src.assignment5.a2a_http_server
Test AgentCard endpoint:
Router selects the appropriate agent based on user intent.
Support Agent requests missing fields (priority, issue details, customer ID).
Router → CustomerData → Support coordination to fulfill multi-part tasks.
All five test cases (simple, coordinated, complex, escalation, multi-intent) are implemented and demonstrated.
To meet the TA requirement, all agents interact with the database via MCP tool calls. No agent directly uses SQL. The MCP server encapsulates the database and provides the standardized API required by MCP Inspector and external clients.
This preserves correctness, avoids duplicate logic, and ensures full MCP compliance.
This repository provides a complete, standards-compliant solution for Assignment 5:
- Fully functional MCP server exposing database operations.
- Three A2A agents built using LangGraph and accessible via independent HTTP endpoints.
- Multi-agent orchestration implementing task allocation, negotiation, and multi-step workflows.
- End-to-end test scenarios available for grading.
- Full alignment with Assignment 5 requirements and the TA’s updated expectations.
This implementation demonstrates how MCP, A2A interfaces, and LangGraph can be combined to build reliable multi-agent systems for CRM-style workflows.