A2A & MCP Integration Framework
Spring Actions is a powerful framework that enables your Spring Boot applications to communicate with AI agents through multiple protocols. The framework supports both Google's Agent-to-Agent (A2A) protocol and Anthropic's Model Context Protocol (MCP). a2ajava is a Swiss Army knife for building agentic applications. It is multi-protocol — works seamlessly with both A2A (Agent-to-Agent) and MCP (Model Context Protocol). It is multi-language — supports Java, Kotlin, and Groovy. It is multi-platform — compatible with Gemini, OpenAI, Claude, and Grok. It is multi-client — includes A2A and MCP clients with connectors in Java, Node, and Python. It offers multi-integration — out-of-the-box support for Selenium, human-in-the-loop workflows, and multi-LLM voting for consensus-based decision making. Agents built using the A2A protocol with a2ajava run seamlessly on MCP as well, ensuring maximum interoperability across platforms.
Google's A2A protocol enables seamless communication between AI agents and services through a standardized discovery and interaction format.
Anthropic's MCP provides structured interactions between AI models and external tools with runtime validation and standardized error handling.
Agent Card Endpoint:
https://vishalmysore-a2amcpspring.hf.space/.well-known/agent.json
MCP Connector Configuration:
{
"customerservice": {
"command": "java",
"args": [
"-jar",
"/work/a2a-mcp-bridge/target/mcp-connector-full.jar",
"https://vishalmysore-a2amcpspring.hf.space/"
],
"timeout": 30000
}
}
Access Swagger UI at:
http://localhost:7860/swagger-ui/index.html
Access deployed demo at:
https://vishalmysore-a2amcpspring.hf.space/swagger-ui/index.html
MCP List Tools:
curl -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"method": "tools/list",
"params": {},
"id": 1
}' https://vishalmysore-a2amcpspring.hf.space/
MCP Tool Call:
{
"method": "tools/call",
"params": {
"name": "whatThisPersonFavFood",
"arguments": {
"provideAllValuesInPlainEnglish": "vishal is coming home what should i cook"
}
},
"jsonrpc": "2.0",
"id": 17
}