Spring AI MCP 0.3.0 (Milestone) Released

Releases | Christian Tzolov | December 29, 2024 | ...

We're pleased to announce Spring AI MCP 0.2.0 milestone release.

Repository Configuration

Add this Spring milestone repository to your POM:

<repositories>
  <repository>
    <id>spring-milestones</id>
    <name>Spring Milestones</name>
    <url>https://repo.spring.io/libs-milestone-local</url>
    <snapshots>
      <enabled>false</enabled>
    </snapshots>
  </repository>
</repositories>

Major Features

MCP Server Enhancements

  • Introduced new McpServer factory with builder pattern for flexible configuration
  • Added McpAsyncServer with non-blocking operations and reactive support
  • Implemented McpSyncServer as synchronous wrapper around async implementation
  • Added runtime tool management capabilities
  • Introduced server capabilities and implementation information support

Transport Layer Improvements

  • Implemented SseServerTransport with SSE endpoints and message routing
  • Added StdioServerTransport for process-based communication
  • Enhanced transport error handling and graceful shutdown mechanisms
  • Reorganized client transports into dedicated transport package

Documentation

  • Added comprehensive MCP reference documentation
  • Included detailed client/server architecture documentation
  • Provided transport implementation and protocol guides
  • Added session management and message handling documentation
  • Included error handling and recovery strategy guides
  • Added architectural diagrams for component relationships
  • Provided API documentation with usage examples

Testing Improvements

  • Added extensive test coverage for server components
  • Implemented transport-specific test suites
  • Added integration tests for client-server interactions

Breaking Changes

Package Reorganization

  • Relocated transport-related classes to dedicated package:
    • StdioClientTransport: o.s.ai.mcp.client.stdioo.s.ai.mcp.client.transport
    • SseClientTransport: o.s.ai.mcp.client.sseo.s.ai.mcp.client.transport
    • ServerParameters: o.s.ai.mcp.client.stdioo.s.ai.mcp.client.transport

API Changes

  • Modified StdioClientTransport.errorHandler to private with setter method
  • Updated ServerCapabilities to use builder pattern:
    // Old
    new ServerCapabilities(experimental, logging, prompts, resources, tools)
    
    // New
    ServerCapabilities.builder()
        .experimental(experimental)
        .logging(logging)
        .prompts(listChanged)
        .resources(subscribe, listChanged)
        .tools(listChanged)
        .build()
    

Module Restructuring

  • Renamed artifacts for clarity:
    • spring-ai-mcp-coremcp
    • spring-ai-mcp-springspring-ai-mcp
    • spring-ai-mcpmcp-parent

Other Improvements

  • Optimized scheduler usage by removing unnecessary Schedulers.boundedElastic()

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all