docs: Minor documentation improvements
This commit is contained in:
parent
18951d5f84
commit
ea49afccf5
4 changed files with 4 additions and 5 deletions
105
mcp-docs/0.5.0-BREAKING-CHANGES.md
Normal file
105
mcp-docs/0.5.0-BREAKING-CHANGES.md
Normal file
|
|
@ -0,0 +1,105 @@
|
||||||
|
# Breaking Changes for Spring AI MCP 0.5.0-SNAPSHOT
|
||||||
|
|
||||||
|
## Major Changes
|
||||||
|
|
||||||
|
1. Transport Implementation Modularization
|
||||||
|
- SSE transport implementations have been moved to dedicated modules:
|
||||||
|
- `mcp-webflux-sse-transport`: WebFlux-based SSE transport
|
||||||
|
- `mcp-webmvc-sse-transport`: WebMVC-based SSE transport
|
||||||
|
- Base MCP module no longer includes transport implementations
|
||||||
|
|
||||||
|
2. Class Renames
|
||||||
|
- `SseClientTransport` → `WebFluxSseClientTransport`
|
||||||
|
- `SseServerTransport` → `WebFluxSseServerTransport`
|
||||||
|
|
||||||
|
3. Project Structure
|
||||||
|
- Test utilities moved to new `mcp-test` module
|
||||||
|
- All samples moved to the the https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol
|
||||||
|
|
||||||
|
## Migration Guide
|
||||||
|
|
||||||
|
### 1. Update Dependencies
|
||||||
|
|
||||||
|
If using SSE transport, add the appropriate transport module to your pom.xml:
|
||||||
|
|
||||||
|
For WebFlux SSE transport:
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.experimental</groupId>
|
||||||
|
<artifactId>mcp-webflux-sse-transport</artifactId>
|
||||||
|
<version>0.5.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
For WebMVC SSE transport:
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.experimental</groupId>
|
||||||
|
<artifactId>mcp-webmvc-sse-transport</artifactId>
|
||||||
|
<version>0.5.0-SNAPSHOT</version>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Update Transport Class References
|
||||||
|
|
||||||
|
Replace:
|
||||||
|
```java
|
||||||
|
import org.springframework.ai.mcp.client.transport.SseClientTransport;
|
||||||
|
import org.springframework.ai.mcp.server.transport.SseServerTransport;
|
||||||
|
```
|
||||||
|
|
||||||
|
With:
|
||||||
|
```java
|
||||||
|
// For WebFlux
|
||||||
|
import org.springframework.ai.mcp.client.transport.WebFluxSseClientTransport;
|
||||||
|
import org.springframework.ai.mcp.server.transport.WebFluxSseServerTransport;
|
||||||
|
|
||||||
|
// Or for WebMVC
|
||||||
|
import org.springframework.ai.mcp.server.transport.WebMvcSseServerTransport;
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Update Transport Instantiation
|
||||||
|
|
||||||
|
Replace:
|
||||||
|
```java
|
||||||
|
var transport = new SseClientTransport(webClientBuilder);
|
||||||
|
```
|
||||||
|
|
||||||
|
With:
|
||||||
|
```java
|
||||||
|
var transport = new WebFluxSseClientTransport(webClientBuilder);
|
||||||
|
```
|
||||||
|
|
||||||
|
Replace:
|
||||||
|
```java
|
||||||
|
var serverTransport = new SseServerTransport(objectMapper, messageEndpoint);
|
||||||
|
```
|
||||||
|
|
||||||
|
With:
|
||||||
|
```java
|
||||||
|
// For WebFlux
|
||||||
|
var serverTransport = new WebFluxSseServerTransport(objectMapper, messageEndpoint);
|
||||||
|
|
||||||
|
// Or for WebMVC
|
||||||
|
var serverTransport = new WebMvcSseServerTransport(objectMapper, messageEndpoint);
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Test Dependencies
|
||||||
|
|
||||||
|
If you're using MCP test utilities, add the test module dependency:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.experimental</groupId>
|
||||||
|
<artifactId>mcp-test</artifactId>
|
||||||
|
<version>0.5.0-SNAPSHOT</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Other Changes
|
||||||
|
|
||||||
|
- Spring AI dependency updated to 1.0.0-M5
|
||||||
|
- Improved dependency management and reduced transitive dependencies
|
||||||
|
- Sample application restructured under samples/ directory
|
||||||
|
- New test utilities and base test classes in mcp-test module
|
||||||
|
|
@ -22,7 +22,7 @@ Maven::
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.experimental</groupId>
|
<groupId>org.springframework.experimental</groupId>
|
||||||
<artifactId>mcp-bom</artifactId>
|
<artifactId>mcp-bom</artifactId>
|
||||||
<version>0.5.0-SNAPSHOT</version>
|
<version>0.5.0</version>
|
||||||
<type>pom</type>
|
<type>pom</type>
|
||||||
<scope>import</scope>
|
<scope>import</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
@ -35,8 +35,7 @@ Gradle::
|
||||||
[source,groovy,indent=0,subs="verbatim,quotes"]
|
[source,groovy,indent=0,subs="verbatim,quotes"]
|
||||||
----
|
----
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation platform("org.springframework.experimental:mcp-bom:0.5.0-SNAPSHOT")
|
implementation platform("org.springframework.experimental:mcp-bom:0.5.0")
|
||||||
// Replace the following with the starter dependencies of specific modules you wish to use
|
|
||||||
//...
|
//...
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
@ -45,6 +44,8 @@ This is implemented by adding a 'platform' dependency handler method to the depe
|
||||||
As shown in the snippet below this can then be followed by version-less declarations of the Starter Dependencies for the one or more spring-ai modules you wish to use, e.g. spring-ai-openai.
|
As shown in the snippet below this can then be followed by version-less declarations of the Starter Dependencies for the one or more spring-ai modules you wish to use, e.g. spring-ai-openai.
|
||||||
======
|
======
|
||||||
|
|
||||||
|
Replace the version number with the version of the BOM you want to use.
|
||||||
|
|
||||||
[[dependencies]]
|
[[dependencies]]
|
||||||
== Available Dependencies
|
== Available Dependencies
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.experimental</groupId>
|
<groupId>org.springframework.experimental</groupId>
|
||||||
<artifactId>mcp-webflux-sse-transport</artifactId>
|
<artifactId>mcp-webflux-sse-transport</artifactId>
|
||||||
<version>0.5.0-SNAPSHOT</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.experimental</groupId>
|
<groupId>org.springframework.experimental</groupId>
|
||||||
<artifactId>mcp-webmvc-sse-transport</artifactId>
|
<artifactId>mcp-webmvc-sse-transport</artifactId>
|
||||||
<version>0.5.0-SNAPSHOT</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue