-
Notifications
You must be signed in to change notification settings - Fork 792
Moves mcp-json API back into mcp-core for simplified dependencies and support of osgi runtimes #762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Moves mcp-json API back into mcp-core for simplified dependencies and support of osgi runtimes #762
Conversation
…n API back into mcp-core so that mcp-json API is no longer needed and mcp-core has fewer dependencies.
mcp-core/src/main/java/io/modelcontextprotocol/util/McpServiceLoader.java
Outdated
Show resolved
Hide resolved
mcp-core/src/main/java/io/modelcontextprotocol/json/McpJsonDefaults.java
Show resolved
Hide resolved
mcp-core/src/main/java/io/modelcontextprotocol/json/internal/DefaultMcpJsonMapperSupplier.java
Outdated
Show resolved
Hide resolved
…Loader.java Co-authored-by: Luca Chang <131398524+LucaButBoring@users.noreply.github.com>
and DefaultMcpJsonSchemaSupplier as they were originally committed accidently. Thanks to LucaButBoring for pointing out the error.
…cp-java-sdk into issue_612_jackson3
|
@scottslewis, I'm not familiar with OSGi that much, but I have some general questions about the PR.
|
I could have...but chose to leave it so that the pr was not as large. If doing it in one step is preferable then that can be done.
The impl of McpJsonDefaults is key to working (for json defaults) in non osgi and osgi environments. In non osgi environments, the serviceloader is used to find and load jackson2 or jackson3 impl for defaults as done previously. In osgi, the serviceloader does not work the same...because of classloader-per-bundle as per osgi issue #562. In osgi, mcpjsondefaults is created and configured on start by the osgi sevice registry using scr metadata in manifests. |
mcp-core so that mcp-json API is no longer needed and mcp-core has fewer dependencies.
See issue #612 and previous pr #682
Motivation and Context
Simplifies dependency structure, and reenables ability to use OSGi runtimes #562
How Has This Been Tested?
Have tested in OSGi environments running OSGi application.
Breaking Changes
This eliminates the need to deploy mcp-json jar, meaning that users will only have to (minimally) deploy mcp-core and either mcp-json-jackson2 or mcp-json-jackson3
Types of changes
Checklist
Additional context
To deal with the testing dependencies issues as described here: #682 (comment)
it may be necessary to add further changes/refactoring/moving of the test code (in mcp-core specifically). I'm willing to do or contribute to this refactoring if needed, once consensus is achieved.