Skip to content

Conversation

@vishalmysore
Copy link
Contributor

@vishalmysore vishalmysore commented May 10, 2025

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

  • Server:
  • Changes to:

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

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.

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. Developers can quickly define, expose, and orchestrate agent skills and actions within a shared context, enabling powerful, multi-agent workflows with minimal boilerplate
Copy link
Member

@olaservo olaservo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, could you add this to the Resources section instead? Thanks!

@olaservo olaservo added the waiting for submitter Waiting for the submitter to provide more info label Jun 13, 2025
@olaservo olaservo merged commit 1af87d6 into modelcontextprotocol:main Jul 28, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting for submitter Waiting for the submitter to provide more info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants