Skip to content

Conversation

tzolov
Copy link
Contributor

@tzolov tzolov commented Aug 20, 2025

This commit reorganizes the Spring AI MCP (Model Context Protocol) server auto-configuration modules to improve separation of concerns and modularity:

Module Restructuring:

  • Rename spring-ai-autoconfigure-mcp-server → spring-ai-autoconfigure-mcp-server-common , spring-ai-autoconfigure-mcp-server-sse
  • Rename spring-ai-autoconfigure-mcp-streamable-server-* → spring-ai-autoconfigure-mcp-server-streamable-*
  • Rename spring-ai-autoconfigure-mcp-stateless-server-* → spring-ai-autoconfigure-mcp-server-stateless-*

New Common Modules:

  • Extract spring-ai-autoconfigure-mcp-server-properties for shared configuration properties
  • Create spring-ai-autoconfigure-mcp-server-common for shared auto-configuration logic between STDIO, SSE and Streamable-HTTP servers

Key Changes:

  • Move McpServerProperties and related properties classes to dedicated properties module shared with all server modules.
  • Extract McpServerChangeNotificationProperties and McpServerStreamableHttpProperties
  • Refactor auto-configuration classes to use common base configurations
  • Update package names from *.autoconfigure to *.common.autoconfigure.properties
  • Consolidate tool callback converter logic into common module

Configuration Updates:

  • Separate SSE-specific properties from general server properties
  • Improve conditional configuration with new condition classes
  • Update dependency references across all affected modules and starters
  • Maintain backward compatibility for existing property configurations

Impact:

  • Better separation between different MCP server transport mechanisms (SSE, Streamable HTTP, Stateless)
  • Reduced code duplication across auto-configuration modules
  • Cleaner dependency management and module boundaries
  • Improved maintainability and extensibility for future MCP server features

All existing functionality is preserved while providing a more modular and maintainable architecture for MCP server auto-configuration.

Thank you for taking time to contribute this pull request!
You might have already read the contributor guide, but as a reminder, please make sure to:

  • Add a Signed-off-by line to each commit (git commit -s) per the DCO
  • Rebase your changes on the latest main branch and squash your commits
  • Add/Update unit tests as needed
  • Run a build and make sure all tests pass prior to submission

For more details, please check the contributor guide.
Thank you upfront!

…r modularity

This commit reorganizes the Spring AI MCP (Model Context Protocol) server
auto-configuration modules to improve separation of concerns and modularity:

**Module Restructuring:**
- Rename  spring-ai-autoconfigure-mcp-server  →  spring-ai-autoconfigure-mcp-server-common ,  spring-ai-autoconfigure-mcp-server-sse
- Rename  spring-ai-autoconfigure-mcp-streamable-server-*  →  spring-ai-autoconfigure-mcp-server-streamable-*
- Rename  spring-ai-autoconfigure-mcp-stateless-server-*  →  spring-ai-autoconfigure-mcp-server-stateless-*

**New Common Modules:**
- Extract  spring-ai-autoconfigure-mcp-server-properties  for shared configuration properties
- Create  spring-ai-autoconfigure-mcp-server-common  for shared auto-configuration logic between
  STDIO, SSE and Streamable-HTTP servers

**Key Changes:**
- Move  McpServerProperties  and related properties classes to dedicated properties module
  shared with all server modules.
- Extract  McpServerChangeNotificationProperties  and  McpServerStreamableHttpProperties
- Refactor auto-configuration classes to use common base configurations
- Update package names from  *.autoconfigure  to  *.common.autoconfigure.properties
- Consolidate tool callback converter logic into common module

**Configuration Updates:**
- Separate SSE-specific properties from general server properties
- Improve conditional configuration with new condition classes
- Update dependency references across all affected modules and starters
- Maintain backward compatibility for existing property configurations

**Impact:**
- Better separation between different MCP server transport mechanisms (SSE, Streamable HTTP, Stateless)
- Reduced code duplication across auto-configuration modules
- Cleaner dependency management and module boundaries
- Improved maintainability and extensibility for future MCP server features

All existing functionality is preserved while providing a more modular and
maintainable architecture for MCP server auto-configuration.

Co-authored-by: yinh <yinh@133.cn>
@tzolov tzolov force-pushed the improve-mcp-streamable-auto-configuration branch from 3aca3ae to d3fec94 Compare August 20, 2025 17:05
tzolov added 2 commits August 20, 2025 19:21
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
|===

=== Stateless Connection Properties

All connection properties are prefixed with `spring.ai.mcp.server.streamable-http`:
Copy link
Member

Choose a reason for hiding this comment

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

this should be server.stateless?

@markpollack markpollack self-assigned this Aug 21, 2025
@markpollack markpollack added this to the 1.1.0.M1 milestone Aug 21, 2025
@markpollack
Copy link
Member

merged in a38aad8

@tzolov
Copy link
Contributor Author

tzolov commented Aug 21, 2025

@markpollack , this merge seems messed up. It containing code not related to this PR.
Also the PR authored by me and Fottas, after the merge appears authored by you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants