
MCP Mediator
A Java-based implementation of the Model Context Protocol (MCP) mediator, providing seamless integration between MCP clients and servers.
What is MCP Mediator?
MCP Mediator is a Java-based implementation of the Model Context Protocol (MCP) mediator, designed to facilitate seamless integration between MCP clients and servers, enabling efficient communication and tool execution in the MCP ecosystem.
How to use MCP Mediator?
To use MCP Mediator, ensure you have Java 17 or later and Maven 3.6 or later installed. You can integrate it with Spring Boot for automatic configuration of the MCP server for available endpoints.
Key features of MCP Mediator?
- Support for stdio transport
- Extensible request handling system
- Integration with Spring Framework and Spring Boot (WIP)
- Comprehensive error handling (WIP)
- Configurable server capabilities
- Support for multiple tool implementations
Use cases of MCP Mediator?
- Facilitating communication between different MCP clients and servers.
- Managing tool execution in a distributed environment.
- Integrating various services like Docker and Dropbox into the MCP ecosystem.
FAQ from MCP Mediator?
- What are the prerequisites for using MCP Mediator?
You need Java 17 or later, Maven 3.6 or later, and Spring Boot 3.2.2 or later for Spring Boot integration.
- Is MCP Mediator open for contributions?
Yes! Contributions are welcome, and you can submit a Pull Request.
MCP Mediator
A Java-based implementation of the Model Context Protocol (MCP) mediator, providing seamless integration between MCP clients and servers. This project enables efficient communication and tool execution in the MCP ecosystem.
Overview
The MCP Mediator implements the Model Context Protocol specification, providing a robust framework for:
- Handling MCP requests and responses
- Managing tool execution
- Supporting various transport mechanisms
- Integrating with Spring Framework and Spring Boot
Features
- Support for stdio transport
- Extensible request handling system
- Spring Framework and Spring Boot integration (WIP)
- Comprehensive error handling (WIP)
- Configurable server capabilities
- Support for multiple tool implementations
Modules
mcp-mediator-api
: Core API interfaces and contractsmcp-mediator-core
: Core implementation and common functionalitymcp-mediator-spring
: Spring Framework and Spring AI integrationmcp-mediator-spring-boot-starter
: Spring Boot auto-configuration to generate MCP server automatically for the available endpoints- Implementation modules for various services:
mcp-mediator-implementation-docker
: Docker service integration (WIP)mcp-mediator-implementation-dropbox
: Dropbox service integration (WIP)
Getting Started
Prerequisites
- Java 17 or later
- Maven 3.6 or later
- Spring Boot 3.2.2 or later (for Spring Boot integration)
Architecture
The MCP Mediator follows the Model Context Protocol architecture:
-
Protocol Layer
- Handles message framing
- Manages request/response patterns
- Implements JSON-RPC 2.0
-
Transport Layer
- Supports stdio transport
- Handles message serialization/deserialization
- Manages connection lifecycle
-
Tool Layer
- Implements tool execution
- Handles request routing
- Manages tool capabilities
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. Read this first!
License
This project is licensed under the GPL3 License - see the LICENSE file for details.