MCPSERV.CLUB
makbn

MCP Mediator

MCP Server

Generate MCP Servers from existing code automatically

Stale(55)
5stars
3views
Updated Jul 28, 2025

About

A Java framework that aggregates service classes, helper methods, and external tools into a unified MCP Server, streamlining client-server communication without manual maintenance.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

MCP Mediator High Level Diagram

The MCP Mediator is a Java‑based engine that turns any existing codebase—service classes, helper methods, or third‑party MCP tools—into a fully compliant Model Context Protocol (MCP) server with minimal effort. By aggregating these disparate components into a single, unified server, it removes the burden of maintaining multiple independent MCP services. Developers can expose new or legacy functionality to AI assistants without refactoring their code, simply by registering the desired classes with the mediator.

At its core, the Mediator implements the full MCP specification: it parses incoming requests, dispatches them to the appropriate tool or service, and streams responses back through configurable transports such as stdio or Server‑Sent Events (SSE). The framework is intentionally extensible; custom request handlers can be plugged in, and server capabilities—like tool listings or prompt templates—are configurable through a fluent builder API. This makes it straightforward to tailor the server’s surface area to the needs of a particular AI workflow.

Key capabilities include:

  • Automatic tool generation: Methods and services are introspected to produce MCP Tool definitions on the fly, eliminating manual boilerplate.
  • Transport flexibility: Support for stdio and SSE allows the Mediator to operate both as a command‑line tool and as a web‑based service.
  • Proxying: Multiple MCP servers can be exposed behind a single Mediator, simplifying network topology for complex systems.
  • Spring integration: Upcoming modules provide seamless autoconfiguration for Spring and Spring Boot, enabling a declarative approach to MCP server creation.
  • Service adapters: Dedicated implementations for Docker, Dropbox, and public query APIs illustrate how the Mediator can bridge to external platforms.

Real‑world scenarios that benefit from MCP Mediator include:

  • A data science team exposing a legacy Java library to Claude for on‑the‑fly analytics.
  • An enterprise deploying multiple microservices that need a single MCP entry point for AI agents to orchestrate workflows.
  • A research lab generating an MCP server from OpenAPI definitions, allowing AI assistants to call REST endpoints without manual wrapper code.

By centralizing MCP functionality, the Mediator reduces operational complexity and accelerates AI integration. Developers can focus on business logic while the Mediator handles protocol compliance, request routing, and transport concerns—making it a powerful tool for any organization looking to unlock AI capabilities across existing Java ecosystems.