Skip to content

Conversation

@liugddx
Copy link
Contributor

@liugddx liugddx commented Oct 26, 2025

Close #4451

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!

…per configuration

Signed-off-by: liugddx <liugddx@gmail.com>
…per configuration

Signed-off-by: liugddx <liugddx@gmail.com>
Copy link
Member

@ericbottard ericbottard left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution @liugddx!

I've got a couple of questions, I hope you have the time to address

@ericbottard ericbottard self-assigned this Oct 29, 2025
…rFactory

Signed-off-by: liugddx <liugddx@gmail.com>
@ericbottard
Copy link
Member

Merged to main as 4273328

Thanks for your prompt feedback @liugddx

@ericbottard ericbottard added this to the 1.1.0.RC1 milestone Oct 31, 2025
@ericbottard
Copy link
Member

Hi @liugddx, @sivaprasadreddy,

unfortunately, we ran into last minute issues with this PR which interferes with other ObjectMapper definitions in Spring AI.
This is just a heads up to let you know that the fix will not be part of M4, but hopefully RC1.

We're trying to find the best way to make the mcp ObjectMapper correctly configured, yet still overridable by users and ALSO not messing with potential other ObjectMappers in their app (be them provided by Boot or not).

@ericbottard ericbottard reopened this Oct 31, 2025
@liugddx
Copy link
Contributor Author

liugddx commented Oct 31, 2025

Hi @liugddx, @sivaprasadreddy,

unfortunately, we ran into last minute issues with this PR which interferes with other ObjectMapper definitions in Spring AI. This is just a heads up to let you know that the fix will not be part of M4, but hopefully RC1.

We're trying to find the best way to make the mcp ObjectMapper correctly configured, yet still overridable by users and ALSO not messing with potential other ObjectMappers in their app (be them provided by Boot or not).

If there's anything I can do to help, just let me know.

ericbottard added a commit to ericbottard/spring-ai that referenced this pull request Nov 3, 2025
Adjust tests

Closes spring-projects#4730

Signed-off-by: Eric Bottard <eric.bottard@broadcom.com>
ericbottard added a commit to ericbottard/spring-ai that referenced this pull request Nov 3, 2025
Adjust tests

Closes spring-projects#4730

Signed-off-by: Eric Bottard <eric.bottard@broadcom.com>
ralla0405 pushed a commit to ralla0405/spring-ai that referenced this pull request Nov 28, 2025
 - Add McpServerObjectMapperAutoConfiguration which includes mcpServerObjectMapper with the explicit bean name qualifier "mcpServerObjectMapper" and the configuration "defaultCandidate = false"
   - The "defaultCandidate = false" configuration makes sure the mcpServerObjectMapper doesn't get injected as the ObjectMapper bean when the qualifier "mcpServerObjectMapper" isn't explciitly specified. This allows other default or custom ObjectMapper beans to be in used in other parts of the applications.
   - Use qualified "mcpServerObjectMapper" bean name for the MCP specific ObjectMapper beans
 - Adjust tests

Closes spring-projects#4730

Co-authored-by: liugddx <liugddx@gmail.com>
Signed-off-by: Eric Bottard <eric.bottard@broadcom.com>
Signed-off-by: logan-mac <ralla0405@gmail.com>
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.

MCP Server with STDIO protocol fails to load @MCPTool annotated methods

2 participants