0.20.0 (2026-06-28)
Highlights
- MCP Java SDK 2.0 GA - upgraded the underlying MCP Java SDK to 2.0.0, moving from the previous release-candidate dependency to the stable 2.0 line.
- JSON resource content support - resources declared with
MimeType.APPLICATION_JSONnow serialize invocation results as JSON text whileMimeType.TEXT_PLAINkeeps the existing string rendering behavior. - Typed resource MIME metadata -
@McpResource.mimeTypenow uses theMimeTypeenum instead of raw strings, making resource metadata less error-prone at compile time. - Classpath stream configuration loading - configuration YAML is now loaded through
InputStream, so packaged JAR deployments can readmcp-server.ymland profile overlays directly from the runtime classpath. - Executable fat JAR documentation - added Maven Shade plugin examples for
java -jardeployment, including manifest main-class configuration andcreateDependencyReducedPom=false. - Release verification coverage - added targeted tests for JSON/plain-text resource rendering and generated resource MIME metadata, keeping the full test suite green.
Dependency
<dependency>
<groupId>io.github.thought2code</groupId>
<artifactId>mcp-annotated-java-sdk</artifactId>
<version>0.20.0</version>
</dependency>implementation 'io.github.thought2code:mcp-annotated-java-sdk:0.20.0'Built against MCP Java SDK 2.0.0. Requires Java 17+ and Maven 3.9.16+ (use ./mvnw).
Changes since 0.19.0
Breaking / API Changes
- Change
@McpResource.mimeTypefromStringtoMimeType. - Add
MimeType.TEXT_PLAINandMimeType.APPLICATION_JSONfor resource metadata.
Runtime Behavior
- Serialize resource invocation results with JSON when the resource MIME type is
application/json. - Preserve existing string rendering for
text/plainresources. - Load base and profile configuration files from classpath
InputStreams instead of converting classpath resources to filesystem paths. - Remove the unused file-based YAML helper overloads after the configuration loader moved to stream-based YAML loading.
Build & Dependencies
- Upgrade MCP Java SDK to 2.0.0.
- Upgrade SpotBugs Maven plugin.
- Keep release version metadata aligned at 0.20.0.
Tests & Quality
- Add resource registration tests for JSON and plain-text resource content rendering.
- Add generated-provider assertion for
.mimeType("application/json"). - Update YAML helper tests to cover stream-based loading and profile merging.
- Verify the release with the full Maven test suite:
./mvnw test.
Documentation
- Align README, docs, and
llms*.txtdependency snippets with0.20.0. - Add executable fat JAR packaging guidance for Maven Shade and Gradle Shadow.
- Document Maven Shade
maven-shade-plugin3.6.2 withcreateDependencyReducedPom=falseand manifest main-class configuration. - Remove outdated prerelease wording for the MCP Java SDK dependency.
Upgrade notes
- Resource MIME type enum - update usages such as
@McpResource(mimeType = "application/json")to@McpResource(mimeType = MimeType.APPLICATION_JSON)and importcom.github.thought2code.mcp.annotated.enums.MimeType. - JSON resources - methods returning objects from JSON resources now produce JSON text instead of Java
toString()output. KeepMimeType.TEXT_PLAINwhen string rendering is desired. - Classpath configuration - keep
mcp-server.ymland profile files such asmcp-server-dev.ymlundersrc/main/resourcesso they are available in packaged JARs. - Fat JAR deployment - for
java -jardeployment, configure an executable JAR with the correct main class; the docs include a Maven Shade example. - Rebuild required - run a full Maven compile/test after upgrading so annotation-generated
ComponentProviderentries are refreshed. - Java and Maven requirements - use Java 17+ and the Maven Wrapper (
./mvnw) for the expected Maven 3.9.16+ build.
Full changelog: v0.19.0...v0.20.0