Feat: Complete configuration of STDIO & SSE/HTTP transport modes#3
Conversation
There was a problem hiding this comment.
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
stdioandsseSpring 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.
| # ─── 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 |
There was a problem hiding this comment.
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.
| # ─── Active profile (override with --spring.profiles.active=stdio or sse) ─── | ||
| spring.profiles.active=sse |
There was a problem hiding this comment.
Applied in 22a49f8. Changed to spring.profiles.default=sse to allow profile composition without overriding user-specified active profiles.
Agent-Logs-Url: https://github.com/askeita/atomic-context/sessions/cc1e1a05-16bc-44d8-9b6d-ef74d8d1a718 Co-authored-by: askeita <28827545+askeita@users.noreply.github.com>
Agent-Logs-Url: https://github.com/askeita/atomic-context/sessions/0a9214ef-2961-4918-ab88-d4489d5019bc Co-authored-by: askeita <28827545+askeita@users.noreply.github.com>
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
@Toolmethods.Transport Mode Support and Configuration:
--spring.profiles.active=stdioor--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]README.mdto clearly explain both transport modes, their configuration, and example client setups for each. Also added details for production deployment and HTTPS reverse proxying.McpServerConfig.javato describe the new profile-based transport selection and clarify that no tool code changes are needed when switching modes.Dependency Updates:
spring-ai-starter-mcp-server(stdio only) tospring-ai-starter-mcp-server-webmvcto enable SSE/HTTP transport.Configuration File Organization:
application.properties,application-sse.properties, andapplication-stdio.propertiesfor better separation and easier overrides. [1] [2] [3]