liveBook · Manning

Http+sse transport

As explained in Spring AI in Action

An HTTP+SSE client transport is a communication transport that uses HTTP and Server-Sent Events for an MCP client connection.

An HTTP+SSE transport connects an MCP client and server through HTTP and Server-Sent Events. Unlike STDIO, it lets both applications deploy, scale, log, and operate independently, with the server reachable on another host. section 7.4 section 7.1

Configure the transport incrementally in a Spring Boot MCP application:

  • Replace the server’s standard MCP starter with the Spring MVC HTTP+SSE starter for embedded Tomcat, or the WebFlux starter for Netty and reactive request handling. section 7.4.1
  • Restore normal Spring Boot logging and the banner, then optionally set server.port=3001 for convenient MCP Inspector access. section 7.4.1
  • Run the server separately, select SSE in MCP Inspector, connect to its /sse endpoint, list tools, and invoke one with parameters. section 7.4.2
  • Configure the client under spring.ai.mcp.client.sse.connections with a connection name and the MCP server URL; use the standard or optional reactive client. section 7.4.3

Connecting a client to a Board Game DB server

A client can connect to a separately running server at localhost:3001 with a named SSE connection. Once configured, it can answer questions such as which game suits ten players. section 7.4.3

Figure 7.7 Setting up the MCP Inspector to inspect the HTTP+SSE-enabled MCP Server
figure

Use the MCP Inspector setup to verify the SSE endpoint and inspect the HTTP+SSE server interactively. section 7.4.2

How Spring AI in Action covers it

How deep it goes
Explains server dependencies, client properties, startup, inspection, and tool invocation, but defers Streamable HTTP implementation details.
Examples
Uses a Board Game DB server, localhost:3001, MCP Inspector, tool invocation, and game recommendations for five or ten players.
What it assumes
Assumes MCP client-server roles and Spring Boot configuration; teaches the transport conversion and setup explicitly.
What you can do after
Operate/configure an MCP client-server connection with Spring Boot, MCP Inspector, HTTP+SSE dependencies, and URL properties.
How it connects
Connects MCP clients, MCP servers, STDIO, Streamable HTTP, Spring MVC, Spring WebFlux, and MCP Inspector.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring AI in Action. The section links point to the parts of the book it draws on.