You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restructure javadoc documentation to eliminate duplicate overviews
- Merge Features and Architecture sections from `sdk-overview.md` into
`overview.md`
- Create `getting-started.md` with Dependency and BOM setup instructions
- Delete `sdk-overview.md` (content redistributed)
- Update links to point to `getting-started.html`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The core `mcp` module already includes default `STDIO`, `SSE` and `Streamable-HTTP` transport implementations and doesn't require external web frameworks.
17
+
18
+
If you're using the Spring Framework and want to use Spring-specific transport implementations, add one of the following optional dependencies:
19
+
20
+
```xml
21
+
<!-- Optional: Spring WebFlux-based SSE and Streamable-HTTP client and server transports -->
22
+
<dependency>
23
+
<groupId>io.modelcontextprotocol.sdk</groupId>
24
+
<artifactId>mcp-spring-webflux</artifactId>
25
+
</dependency>
26
+
27
+
<!-- Optional: Spring WebMVC-based SSE and Streamable-HTTP server transports -->
The core `mcp` module already includes default `STDIO`, `SSE` and `Streamable-HTTP` transport implementations and doesn't require external web frameworks.
46
+
47
+
If you're using the Spring Framework and want to use Spring-specific transport implementations, add one of the following optional dependencies:
48
+
49
+
```groovy
50
+
// Optional: Spring WebFlux-based SSE and Streamable-HTTP client and server transports
-`io.modelcontextprotocol.sdk:mcp-spring-webflux` - WebFlux-based Client and Server, `Streamable-HTTP` and `SSE` transport implementations.
64
+
The WebFlux implementation can be used in reactive applications while the WebClient-based MCP Client can be used in both reactive and imperative applications.
65
+
It is a highly scalable option and suitable and recommended for high-throughput scenarios.
66
+
-`io.modelcontextprotocol.sdk:mcp-spring-webmvc` - WebMVC-based Server, `Streamable-HTTP` and `SSE` transport implementation for servlet-based applications.
67
+
68
+
## Bill of Materials (BOM)
69
+
70
+
The Bill of Materials (BOM) declares the recommended versions of all the dependencies used by a given release.
71
+
Using the BOM from your application's build script avoids the need for you to specify and maintain the dependency versions yourself.
72
+
Instead, the version of the BOM you're using determines the utilized dependency versions.
73
+
It also ensures that you're using supported and tested versions of the dependencies by default, unless you choose to override them.
Copy file name to clipboardExpand all lines: mcp-core/src/main/javadoc/io/modelcontextprotocol/doc-files/server.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ Key features:
110
110
111
111
### WebFlux Transport
112
112
113
-
WebFlux-based SSE and Streamable-HTTP server transport. Requires the `mcp-spring-webflux` dependency (see [Dependencies](sdk-overview.html#dependencies)).
113
+
WebFlux-based SSE and Streamable-HTTP server transport. Requires the `mcp-spring-webflux` dependency (see [Getting Started](getting-started.html)).
-[Tool](https://modelcontextprotocol.io/specification/latest/server/tools/) discovery, execution, list change notifications
21
+
-[Resource](https://modelcontextprotocol.io/specification/latest/server/resources/) management with URI templates
22
+
-[Prompt](https://modelcontextprotocol.io/specification/latest/server/prompts/) handling and management
23
+
-[Completion](https://modelcontextprotocol.io/specification/latest/server/utilities/completion/) argument autocompletion suggestions for prompts and resource URIs
24
+
-[Progress](https://modelcontextprotocol.io/specification/latest/basic/utilities/progress/) progress tracking for long-running operations
25
+
-[Ping](https://modelcontextprotocol.io/specification/latest/basic/utilities/ping/) lightweight health check mechanism
26
+
-[Server Keepalive](https://modelcontextprotocol.io/specification/latest/basic/utilities/ping#implementation-considerations/) to maintain active server connections
27
+
-[Logging](https://modelcontextprotocol.io/specification/latest/server/utilities/logging/) for sending structured log messages to clients
28
+
-[Roots](https://modelcontextprotocol.io/specification/latest/client/roots/) list management and notifications
29
+
-[Sampling](https://modelcontextprotocol.io/specification/latest/client/sampling/) support for AI model interactions
30
+
-[Elicitation](https://modelcontextprotocol.io/specification/latest/client/elicitation/) for servers to request additional information from users through the client
31
+
- Multiple transport implementations:
32
+
- Default transports (included in core `mcp` module, no external web frameworks required):
33
+
- Stdio-based transport for process-based communication
34
+
- Java HttpClient-based `SSE` and `Streamable-HTTP` client transport
35
+
- Servlet-based `SSE` and `Streamable-HTTP` server transport
36
+
- Optional Spring-based transports (convenience if using Spring Framework):
37
+
- WebFlux `SSE` and `Streamable-HTTP` client and server transports
38
+
- WebMVC `SSE` and `Streamable-HTTP` transport for servlet-based HTTP streaming
39
+
- Supports Synchronous and Asynchronous programming paradigms
19
40
20
-
```xml
21
-
<dependency>
22
-
<groupId>io.modelcontextprotocol.sdk</groupId>
23
-
<artifactId>mcp</artifactId>
24
-
<version>${mcp.version}</version>
25
-
</dependency>
26
-
```
41
+
> **Tip:** The core `io.modelcontextprotocol.sdk:mcp` module provides default `STDIO`, `SSE` and `Streamable-HTTP` client and server transport implementations without requiring external web frameworks.
42
+
>
43
+
> Spring-specific transports are available as optional dependencies for convenience when using the [Spring AI](https://docs.spring.io/spring-ai/reference/1.1-SNAPSHOT/api/mcp/mcp-overview.html) Framework.
44
+
45
+
## Architecture
46
+
47
+
The SDK follows a layered architecture with clear separation of concerns:
48
+
49
+
-**Client/Server Layer (McpClient/McpServer)**: Both use McpSession for sync/async operations,
50
+
with McpClient handling client-side protocol operations and McpServer managing server-side protocol operations.
51
+
-**Session Layer (McpSession)**: Manages communication patterns and state using DefaultMcpSession implementation.
- StdioTransport (stdin/stdout) in the core module
54
+
- HTTP `Streamable-HTTP` and `SSE` transports in dedicated transport modules (Java HttpClient, Spring WebFlux, Spring WebMVC)
55
+
56
+
The [MCP Client](io/modelcontextprotocol/doc-files/client.html) is a key component in the Model Context Protocol (MCP) architecture, responsible for establishing and managing connections with MCP servers.
The [MCP Server](io/modelcontextprotocol/doc-files/server.html) is a foundational component in the Model Context Protocol (MCP) architecture that provides tools, resources, and capabilities to clients.
62
+
It implements the server-side of the protocol.
63
+
64
+
<imgsrc="io/modelcontextprotocol/doc-files/images/java-mcp-server-architecture.jpg"alt="Java MCP Server Architecture"style="max-height: 80vh;">
65
+
66
+
Key Interactions:
67
+
68
+
-**Client/Server Initialization**: Transport setup, protocol compatibility check, capability negotiation, and implementation details exchange.
69
+
-**Message Flow**: JSON-RPC message handling with validation, type-safe response processing, and error handling.
70
+
-**Resource Management**: Resource discovery, URI template-based access, subscription system, and content retrieval.
27
71
28
72
## SDK Documentation
29
73
30
-
-[Java SDK Overview](io/modelcontextprotocol/doc-files/sdk-overview.html) - Features, architecture, and dependencies
74
+
-[Getting Started](io/modelcontextprotocol/doc-files/getting-started.html) - Dependencies and setup
31
75
-[MCP Client](io/modelcontextprotocol/doc-files/client.html) - Client implementation and transport options
32
76
-[MCP Server](io/modelcontextprotocol/doc-files/server.html) - Server implementation and transport providers
0 commit comments