What it actually takes to expose a REST API as an MCP server in Java — the SDK, a working tool, and the part that decides whether an agent uses it correctly.
A working server is where the effort ends and the selling starts. Point MCP Showcase at it and get a live playground your customers can try, with documentation generated for every tool.
Shown above, along with whether it is officially maintained or a community project — which matters more in some languages than others.
Start with a single tool, not your whole API. Tool definitions are sent to the model on every request, and selection accuracy falls as the list grows.
Run the deployed URL through the MCP Inspector to confirm the handshake completes and the tools appear as you intended.
Maven: io.modelcontextprotocol.sdk:mcp — modelcontextprotocol/java-sdk,
officially maintained.
The Java SDK exposes McpSyncServer and McpAsyncServer as distinct types rather than one API with a mode flag, and the transport is chosen at build time. Pick the wrong one and you are rewriting the wiring, not flipping a setting. Spring AI wraps this if you are already in that ecosystem.
An MCP server is a thin layer over code you already have. Each tool needs three things: a name, a description saying what it does and when to choose it, and an input schema. The Java SDK handles the protocol; what you write is the mapping from those arguments to your existing HTTP call.
Start with one endpoint rather than your whole API. Tool definitions are re-sent to the model on every single request, so each one is a permanent context cost, and the model's ability to pick correctly falls as the list grows. Eight well-described tools beat eighty.
Whatever language you use, the descriptions decide whether the agent behaves. They are read by the model, not by your colleagues, and a tool described in three words gets called by guesswork. You can check yours with the MCP schema linter, and see what the list costs per request with the token calculator.
Once it runs, the remaining problem is that nobody can tell what it does. A prospect cannot read your Java source and will not install a client to find out. MCP Showcase points at the same URL and produces a live playground with generated documentation for every tool, so evaluating your server takes a click.