Skip to content

Feat: Complete configuration of STDIO & SSE/HTTP transport modes#3

Merged
askeita merged 3 commits into
mainfrom
feat-sse-atomic-mcp
May 19, 2026
Merged

Feat: Complete configuration of STDIO & SSE/HTTP transport modes#3
askeita merged 3 commits into
mainfrom
feat-sse-atomic-mcp

Conversation

@askeita
Copy link
Copy Markdown
Owner

@askeita askeita commented May 19, 2026

This pull request transitions the project from a single stdio transport mode to supporting both stdio (for local clients like Claude Desktop) and SSE/HTTP (for networked clients) via Spring profiles. It updates configuration files, documentation, and dependencies to make transport selection seamless and clearly documented, with no changes required to existing @Tool methods.

Transport Mode Support and Configuration:

  • Added support for both stdio and SSE/HTTP transport modes, selectable via --spring.profiles.active=stdio or --spring.profiles.active=sse, with SSE/HTTP as the new default. (README.md, application.properties, application-sse.properties, application-stdio.properties, [1] [2] [3] [4]
  • Updated the documentation in README.md to clearly explain both transport modes, their configuration, and example client setups for each. Also added details for production deployment and HTTPS reverse proxying.
  • Updated the JavaDoc in McpServerConfig.java to describe the new profile-based transport selection and clarify that no tool code changes are needed when switching modes.

Dependency Updates:

  • Changed the Maven dependency from spring-ai-starter-mcp-server (stdio only) to spring-ai-starter-mcp-server-webmvc to enable SSE/HTTP transport.

Configuration File Organization:

  • Split shared and transport-specific configuration into application.properties, application-sse.properties, and application-stdio.properties for better separation and easier overrides. [1] [2] [3]

Copilot AI review requested due to automatic review settings May 19, 2026 20:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds profile-driven transport selection for the Spring AI MCP server, supporting both local stdio clients and networked SSE/HTTP clients, and updates project config/docs/dependencies to match.

Changes:

  • Introduces stdio and sse Spring profiles with transport-specific property files and sets SSE as the intended default.
  • Updates documentation and JavaDoc to explain transport selection and client configuration.
  • Switches the Spring AI MCP dependency to the WebMVC-enabled starter to support SSE/HTTP.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/resources/application.properties Moves MCP settings to “shared” config and sets the default transport profile to SSE.
src/main/resources/application-stdio.properties Adds stdio-specific transport config and attempts to silence logging for clean stdin/stdout.
src/main/resources/application-sse.properties Adds SSE transport configuration (endpoint + port).
src/main/java/com/atomiccontext/config/McpServerConfig.java Updates JavaDoc to describe profile-based transport selection.
README.md Documents both transports, example client configs, and production/reverse-proxy notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +6
# ─── stdio Transport (Claude Desktop / local MCP clients) ────────────────────
spring.ai.mcp.server.transport=stdio
# Silence all console output — stdio pipe must stay clean
logging.level.root=OFF
logging.level.com.atomiccontext=OFF
logging.level.org.springframework=OFF
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in c673a63. The stdio profile now sets spring.main.banner-mode=off and spring.main.web-application-type=none so stdout remains clean for MCP transport. No UI changes in this update.

Comment on lines +9 to +10
# ─── Active profile (override with --spring.profiles.active=stdio or sse) ───
spring.profiles.active=sse
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in 22a49f8. Changed to spring.profiles.default=sse to allow profile composition without overriding user-specified active profiles.

@askeita askeita merged commit f2aed5e into main May 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants