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:
# Use the preferred streamable HTTP transportspring.ai.mcp.server.protocol=streamableserver.port=3001Why 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:
# SSE transport (deprecated, use only if necessary)spring.ai.mcp.server.protocol=sseserver.port=3001The 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 supportThis 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:
{ "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:
{ "mcpServers": { "my-mcp-server": { "transport": "streamable-http", "url": "http://localhost:3001/mcp" } }}Common Mistakes I Made
- Using default settings - Spring AI defaults to SSE (deprecated), not Streamable HTTP
- Forgetting the
/mcppath - The full endpoint ishttp://localhost:3001/mcp, not just the host - Not using mcp-remote for Claude Desktop - Expected direct HTTP connection to work
- Using port 8080 - Had conflicts with other services; 3001 is the MCP convention
Full Configuration Example
Here’s my complete setup:
# MCP Server Configurationspring.ai.mcp.server.protocol=streamableserver.port=3001
# Optional: Server name for loggingspring.application.name=my-mcp-serverProject Structure├── src/main/resources/│ └── application.properties├── src/main/java/│ └── com/example/│ └── McpServerApplication.java└── pom.xmlSummary
| Setting | Recommended Value | Reason |
|---|---|---|
spring.ai.mcp.server.protocol | streamable | Preferred transport, SSE is deprecated |
server.port | 3001 | MCP convention, avoids 8080 conflicts |
| Claude Desktop | Use mcp-remote proxy | Claude Desktop requires stdio transport |
| MCP Jam / Goose | Direct HTTP connection | Support 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