Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ Versioning follows [Semantic Versioning](https://semver.org/); see

## Unreleased (2.2.0)

- Preview of a stateless server for the **2026-07-28** MCP specification revision, in
- A stateless server for the **2026-07-28** MCP specification revision, in
`io.modelcontextprotocol.modern`, with Servlet (Streamable HTTP) and STDIO transports. It supports
`server/discover`, multi round-trip requests with sealed `requestState`, `subscriptions/listen`, caching
hints, required client capabilities and SEP-2243 `Mcp-Param` header validation. The API may change in minor
releases until 3.0. See [MCP Server (2026-07-28)](docs/server-modern.md).
- A client for the **2026-07-28** MCP specification revision, in
`io.modelcontextprotocol.modern.client`, with Streamable HTTP (JDK `HttpClient`) and STDIO transports. It
needs no `initialize` handshake and supports multi round-trip requests with form and URL elicitation,
progress, `subscriptions/listen`, `server/discover` and SEP-2243 `Mcp-Param` headers. Sampling, roots and
logging are not supported. The API may change in minor releases until 3.0. See
[MCP Client (2026-07-28)](docs/client-modern.md).
- Add `McpTransportContext.putAll(Map)`, returning a context that combines an
existing context with additional entries, which take precedence.
- `McpTransportContext` no longer compares contexts by their contents in
Expand Down
751 changes: 751 additions & 0 deletions docs/client-modern.md

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions docs/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ The MCP Client is a key component in the Model Context Protocol (MCP) architectu
!!! tip
The core `io.modelcontextprotocol.sdk:mcp` module provides STDIO, SSE, and Streamable HTTP client transport implementations without requiring external web frameworks.

The Spring-specific WebFlux transport (`mcp-spring-webflux`) is now part of [Spring AI](https://docs.spring.io/spring-ai/reference/2.0-SNAPSHOT/api/mcp/mcp-overview.html) 2.0+ (group `org.springframework.ai`) and is no longer shipped by this SDK.
See the [MCP Client Boot Starter](https://docs.spring.io/spring-ai/reference/2.0-SNAPSHOT/api/mcp/mcp-client-boot-starter-docs.html) documentation for Spring-based client setup.
The Spring-specific WebFlux transport (`mcp-spring-webflux`) is now part of [Spring AI](https://docs.spring.io/spring-ai/reference/2.1.0-SNAPSHOT/api/mcp/mcp-overview.html) 2.0+ (group `org.springframework.ai`) and is no longer shipped by this SDK.
See the [MCP Client Boot Starter](https://docs.spring.io/spring-ai/reference/2.1.0-SNAPSHOT/api/mcp/mcp-client-boot-starter-docs.html) documentation for Spring-based client setup.

!!! note "2026-07-28 specification"
This page covers the legacy client, which implements the 2025-11-25 specification and earlier revisions.
A client for the stateless 2026-07-28 revision is also available; see
[MCP Client (2026-07-28)](client-modern.md).

The client provides both synchronous and asynchronous APIs for flexibility in different application contexts.

Expand Down Expand Up @@ -168,15 +173,15 @@ McpTransport transport = new StdioClientTransport(params, McpJsonDefaults.getMap

=== "Streamable WebClient (external)"

Creates Streamable HTTP WebClient-based client transport. Requires the `mcp-spring-webflux` dependency from [Spring AI](https://docs.spring.io/spring-ai/reference/2.0-SNAPSHOT/api/mcp/mcp-overview.html) 2.0+ (group `org.springframework.ai`):
Creates Streamable HTTP WebClient-based client transport. Requires the `mcp-spring-webflux` dependency from [Spring AI](https://docs.spring.io/spring-ai/reference/2.1.0-SNAPSHOT/api/mcp/mcp-overview.html) 2.0+ (group `org.springframework.ai`):

```java
McpTransport transport = WebFluxSseClientTransport
.builder(WebClient.builder().baseUrl("http://your-mcp-server"))
.build();
```

### SSE HTTP (Legacy)
### SSE HTTP (Deprecated)

=== "SSE HttpClient"

Expand All @@ -187,7 +192,7 @@ McpTransport transport = new StdioClientTransport(params, McpJsonDefaults.getMap
```
=== "SSE WebClient (external)"

Creates WebFlux-based SSE client transport. Requires the `mcp-spring-webflux` dependency from [Spring AI](https://docs.spring.io/spring-ai/reference/2.0-SNAPSHOT/api/mcp/mcp-overview.html) 2.0+ (group `org.springframework.ai`):
Creates WebFlux-based SSE client transport. Requires the `mcp-spring-webflux` dependency from [Spring AI](https://docs.spring.io/spring-ai/reference/2.1.0-SNAPSHOT/api/mcp/mcp-overview.html) 2.0+ (group `org.springframework.ai`):

```java
WebClient.Builder webClientBuilder = WebClient.builder()
Expand Down
15 changes: 9 additions & 6 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,17 @@ The built site will be output to the `site/` directory.

```
docs/
├── index.md # Overview page
├── index.md # Home page
├── overview.md # Architecture and modules
├── quickstart.md # Quickstart guide
├── client.md # MCP Client documentation
├── server.md # MCP Server documentation
├── contributing.md # Contributing guide
├── client-modern.md # MCP Client, modern (2026-07-28)
├── server-modern.md # MCP Server, modern (2026-07-28)
├── client.md # MCP Client, legacy (2025-11-25 and earlier)
├── server.md # MCP Server, legacy (2025-11-25 and earlier)
├── contribute.md # Contributing guide
├── development.md # This page
├── images/ # Images and diagrams
└── stylesheets/ # Custom CSS
├── blog/ # Blog posts
└── images/ # Images and diagrams
mkdocs.yml # MkDocs configuration
```

Expand Down
78 changes: 78 additions & 0 deletions docs/images/java-mcp-client-architecture-modern.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
121 changes: 121 additions & 0 deletions docs/images/java-mcp-client-architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading