MCP Java SDK

Official Java SDK for MCP clients and servers, maintained with Spring AI, with sync and async APIs, JDK HttpClient and Servlet transports, and OAuth hooks.

Visit website

What is MCP Java SDK?

MCP Java SDK The MCP Java SDK is the official Java SDK for the Model Context Protocol. It is owned by the modelcontextprotocol organization and maintained in collaboration with Spring AI, giving Java applications a standardized interface to MCP servers and tools.

Core capabilities

Sync and async APIs: Supports blocking and asynchronous patterns with cancellation and streaming where needed.

Transport options: Ships JDK HttpClient for clients and Jakarta Servlet for servers, with Spring WebClient, WebFlux and WebMVC integrations in Spring AI.

Pluggable JSON: Uses Jackson behind an SDK abstraction, with Jackson 2 and Jackson 3 implementations available.

Modular structure: Separates core, JSON bindings, BOM, convenience bundle and test utilities so adopters include only what they need.

Conformance: Passes the server MCP conformance suite 40/40 and documents client and auth results.

Access and pricing

Open source under the MIT license. Requires Java 17 or later for the current SDK line. Spring Boot starters are available through Spring AI.

Developer details

Integrations
APISDK
Works with
Spring AI, Java 17+, JDK HttpClient, Jakarta Servlet, Jackson 2, Jackson 3, MCP spec
License
MIT

Features

  • Official Java implementation of MCP
  • Synchronous and asynchronous client and server APIs
  • JDK HttpClient and Servlet transports
  • Jackson 2 and Jackson 3 JSON bindings
  • Spring AI integration and starters
  • Server conformance suite 40/40