Skip to content

Spring AI MCP Server Configuration: Transport Protocols and Settings

I was setting up a Spring AI MCP server the other day and got confused by the transport protocol options. The documentation mentioned SSE transport, Streamable HTTP transport, and something about deprecation. I just wanted my MCP server to work with Claude Desktop. Here’s what I learned.

The Problem: Multiple Transports, Different Client Support

I started with the default Spring AI MCP server configuration and expected it to work with Claude Desktop. It didn’t. Then I read the docs more carefully and found this:

“Spring AI’s MCP server support defaults to using the SSE transport. But the SSE transport is deprecated and the Streamable HTTP transport is the preferred transport.”

Wait, so the default is deprecated? And there’s a preferred transport that might not work with my client? Let me figure this out.

Understanding the Transport Options

Spring AI MCP server supports two transport protocols:

+-------------------+ +------------------+
| MCP Client | | MCP Server |
| (Claude Desktop) | | (Spring AI) |
+---------+---------+ +--------+---------+
| |
| Which transport? |
v v
+------+-------+ +------+-------+
| SSE | | Streamable |
| (deprecated)| | HTTP |
+--------------+ + (preferred) |
+--------------+

The key insight: SSE transport is deprecated but still the default. Streamable HTTP is the preferred protocol.

Configuring the Server

Here’s the basic configuration in application.properties:

application.properties
# Use the preferred streamable HTTP transport
spring.ai.mcp.server.protocol=streamable
server.port=3001

Why port 3001? The documentation says “port 3001 is commonly used for MCP servers.” It’s a convention, not a requirement, but it helps avoid conflicts with other Spring Boot services on port 8080.

Alternative: SSE Transport (Deprecated)

If you need to use SSE for some reason:

application.properties
# SSE transport (deprecated, use only if necessary)
spring.ai.mcp.server.protocol=sse
server.port=3001

The Client Compatibility Problem

Here’s where things got tricky. I configured my server with Streamable HTTP and tried to connect from Claude Desktop. It didn’t work. The docs explained:

“Claude Desktop does not support the Streamable HTTP transport. So if you choose to use Claude Desktop, you’ll need to configure the ‘mcp-remote’ MCP server to proxy communication.”

Let me map out the client compatibility:

+----------------+-------------------+------------+----------------------+
| Client | Streamable HTTP | SSE | Solution |
+----------------+-------------------+------------+----------------------+
| MCP Jam | Yes | Yes | Direct connection |
| Claude Desktop | No | No | Use mcp-remote proxy |
| Goose | Yes | Yes | Direct connection* |
+----------------+-------------------+------------+----------------------+
* Goose has limited context update support

This was surprising: Claude Desktop doesn’t support either HTTP transport directly. It only supports stdio transport, so you need a proxy.

Setting Up mcp-remote Proxy for Claude Desktop

To connect Claude Desktop to my HTTP-based MCP server, I needed the mcp-remote proxy:

claude_desktop_config.json
{
"mcpServers": {
"my-mcp-server": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://localhost:3001/mcp"
]
}
}
}

The proxy translates between Claude Desktop’s stdio transport and the server’s HTTP transport.

Direct Connection for MCP Jam

MCP Jam supports HTTP transports directly, so the configuration is simpler:

mcp_jam_config.json
{
"mcpServers": {
"my-mcp-server": {
"transport": "streamable-http",
"url": "http://localhost:3001/mcp"
}
}
}

Common Mistakes I Made

  1. Using default settings - Spring AI defaults to SSE (deprecated), not Streamable HTTP
  2. Forgetting the /mcp path - The full endpoint is http://localhost:3001/mcp, not just the host
  3. Not using mcp-remote for Claude Desktop - Expected direct HTTP connection to work
  4. Using port 8080 - Had conflicts with other services; 3001 is the MCP convention

Full Configuration Example

Here’s my complete setup:

application.properties
# MCP Server Configuration
spring.ai.mcp.server.protocol=streamable
server.port=3001
# Optional: Server name for logging
spring.application.name=my-mcp-server
Project Structure
├── src/main/resources/
│ └── application.properties
├── src/main/java/
│ └── com/example/
│ └── McpServerApplication.java
└── pom.xml

Summary

SettingRecommended ValueReason
spring.ai.mcp.server.protocolstreamablePreferred transport, SSE is deprecated
server.port3001MCP convention, avoids 8080 conflicts
Claude DesktopUse mcp-remote proxyClaude Desktop requires stdio transport
MCP Jam / GooseDirect HTTP connectionSupport HTTP transports natively

The key takeaway: use streamable transport on port 3001. If you’re using Claude Desktop, don’t forget to configure the mcp-remote proxy. Other clients like MCP Jam and Goose can connect directly via HTTP.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments