Improve docs

This commit is contained in:
Christian Tzolov 2025-01-29 14:32:43 +01:00
commit 8cd3cfdf3f
9 changed files with 18 additions and 1721 deletions

View file

@ -64,41 +64,3 @@ The following dependencies are available and managed by the BOM:
- `org.modelcontextprotocol.sdk:mcp-test` - Testing utilities and support for MCP-based applications.
### Milestone and Snapshot Repositories
To use the Milestone and Snapshot version, you need to add references to the Spring Milestone and/or Snapshot repositories in your build file.
Add the following repository definitions to your Maven or Gradle build file:
<Tabs>
<Tab title="Maven">
```xml
<repositories>
<repository>
<id>spring-milestones</id>
<n>Spring Milestones</n>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshots</id>
<n>Spring Snapshots</n>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
```
</Tab>
<Tab title="Gradle">
```groovy
repositories {
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }
}
```
</Tab>
</Tabs>

View file

@ -7,8 +7,8 @@ description: Overview of the Model Context Protocol (MCP) architecture and key c
Java SDK implementation of the [Model Context Protocol](https://modelcontextprotocol.io/introduction), enabling seamless integration with language models and AI tools.
![Spring AI MCP Client Architecture](/images/spring-ai-mcp-client-architecture.jpg)
![Spring AI MCP Server Architecture](/images/spring-ai-mcp-server-architecture.jpg)
![Spring AI MCP Client Architecture](/images/java-mcp-client-architecture.jpg)
![Spring AI MCP Server Architecture](/images/java-mcp-server-architecture.jpg)
## Features
@ -43,7 +43,7 @@ The SDK follows a layered architecture with clear separation of concerns:
Following class diagram illustrates the layered architecture of the MCP SDK, showing the relationships between core interfaces (McpTransport, McpSession), their implementations, and the client/server components. It highlights how the transport layer connects to sessions, which in turn support both synchronous and asynchronous client/server implementations.
![MCP SDK Class Diagram](/images/spring-ai-mcp-uml-classdiagram.svg)
![MCP SDK Class Diagram](/images/java-mcp-uml-classdiagram.svg)
Key Interactions:

View file

@ -3,36 +3,12 @@ title: Overview
description: Introduction to the Model Context Protocol (MCP) Java SDK
---
# Java & Spring MCP
# MCP Java SDK
Java SDK and Spring Framework integration for the [Model Context Protocol](https://modelcontextprotocol.org/docs/concepts/architecture), enabling standardized interaction with AI models and tools through both synchronous and asynchronous communication.
Java SDK for the [Model Context Protocol](https://modelcontextprotocol.org/docs/concepts/architecture), enabling standardized interaction with AI models and tools through both synchronous and asynchronous communication.
![Spring AI MCP Client Architecture](/images/spring-ai-mcp-client-architecture.jpg)
![Spring AI MCP Server Architecture](/images/spring-ai-mcp-server-architecture.jpg)
## Core Components
### [MCP Java SDK](/docs/mcp)
Core implementation of the Model Context Protocol specification, providing:
- Synchronous and asynchronous [Client](/docs/mcp#mcp-client) and [Server](/docs/mcp#mcp-server) implementations
- Tool discovery and execution
- Resource management with URI templates
- Prompt handling and management
- Structured logging
- Request and Notification handling
### MCP Transports
#### Core Transports
- Stdio-based (`StdioClientTransport`, `StdioServerTransport`) for process-based communication
- Java HttpClient-based SSE client (`HttpClientSseClientTransport`) for HTTP SSE Client-side streaming
- Servlet-based SSE server (`HttpServletSseServerTransport`) for HTTP SSE Server streaming using traditional Servlet API
#### Optional SSE Transports
- [WebFlux SSE Transport](https://github.com/modelcontextprotocol/java-sdk/tree/main/mcp-spring/mcp-spring-webflux) - Reactive HTTP streaming with Spring WebFlux (Client & Server)
- [WebMvc SSE Transport](https://github.com/modelcontextprotocol/java-sdk/tree/main/mcp-spring/mcp-spring-webmvc) - Spring MVC based SSE transport (Server only).
You can use the core `HttpClientSseClientTransport` transport as a SSE client.
![Java MCP Client Architecture](/images/java-mcp-client-architecture.jpg)
![Java MCP Server Architecture](/images/java-mcp-server-architecture.jpg)
## Getting Started

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 840 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 686 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 791 KiB

View file

@ -33,7 +33,7 @@
"docs/mcp-overview",
"docs/mcp-client",
"docs/mcp-server",
"docs/mcp-spring",
"docs/mcp-transport",
"docs/mcp-capabilities"
]
}