Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A2AJava has built-in support for Model Context Protocol (MCP) using intuitive Java annotations, this project serves as an excellent starting point for building MCP-compliant servers in Java that are also cross compliant with Google A2A protocol. Developers can quickly define, expose, and orchestrate agent skills and actions within a shared context, enabling powerful, multi-agent workflows with minimal boilerplate
Description
This submission introduces a Java-based server framework (A2AJava) that provides seamless integration between Google’s A2A protocol and the Model Context Protocol (MCP). It allows developers to register annotated Java methods as MCP-compatible tools and resources, auto-generating task interfaces and exposing them to LLM-based clients.
The project demonstrates task execution, context sharing, and skill orchestration using lightweight annotations and Spring Boot, making it ideal for scalable agent development in Java environments
Server Details
Motivation and Context
There is currently limited support for building MCP servers in Java, despite its widespread enterprise adoption. A2AJava fills this gap by enabling Java developers to create and deploy agent-capable MCP servers quickly and efficiently, reducing boilerplate and lowering the barrier to entry. It also bridges A2A and MCP, promoting greater interoperability between AI tools and services.
How Has This Been Tested?
Tested using local LLM clients including OpenAI and Claude via Tools4AI framework.
Sample use case: Airline ticket booking agent that receives structured tasks, processes them via annotated Java methods, and returns contextual responses.
Tested multipart message handling, tool discovery, and task chaining.
Breaking Changes
Types of changes
Checklist
Additional context
A2AJava enables seamless context sharing between the A2A protocol and Model Context Protocol (MCP) in Java-based applications. It also supports intelligent task dispatching, making it ideal for multi-agent workflows, dynamic task routing, and context-driven skill activation. The framework integrates effortlessly with Kafka, REST APIs, and local LLM clients, leveraging Java reflection to reduce boilerplate. With built-in annotations like Agent and Action, and support for dynamic task state transitions, A2AJava makes it incredibly easy to build a fully A2A- and MCP-compliant server in Java — often in under an hour, from the ground up.