Skip to content

v0.20.0

Latest

Choose a tag to compare

@codeboyzhou codeboyzhou released this 28 Jun 10:34

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_JSON now serialize invocation results as JSON text while MimeType.TEXT_PLAIN keeps the existing string rendering behavior.
  • Typed resource MIME metadata - @McpResource.mimeType now uses the MimeType enum 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 read mcp-server.yml and profile overlays directly from the runtime classpath.
  • Executable fat JAR documentation - added Maven Shade plugin examples for java -jar deployment, including manifest main-class configuration and createDependencyReducedPom=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.mimeType from String to MimeType.
  • Add MimeType.TEXT_PLAIN and MimeType.APPLICATION_JSON for resource metadata.

Runtime Behavior

  • Serialize resource invocation results with JSON when the resource MIME type is application/json.
  • Preserve existing string rendering for text/plain resources.
  • 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*.txt dependency snippets with 0.20.0.
  • Add executable fat JAR packaging guidance for Maven Shade and Gradle Shadow.
  • Document Maven Shade maven-shade-plugin 3.6.2 with createDependencyReducedPom=false and manifest main-class configuration.
  • Remove outdated prerelease wording for the MCP Java SDK dependency.

Upgrade notes

  1. Resource MIME type enum - update usages such as @McpResource(mimeType = "application/json") to @McpResource(mimeType = MimeType.APPLICATION_JSON) and import com.github.thought2code.mcp.annotated.enums.MimeType.
  2. JSON resources - methods returning objects from JSON resources now produce JSON text instead of Java toString() output. Keep MimeType.TEXT_PLAIN when string rendering is desired.
  3. Classpath configuration - keep mcp-server.yml and profile files such as mcp-server-dev.yml under src/main/resources so they are available in packaged JARs.
  4. Fat JAR deployment - for java -jar deployment, configure an executable JAR with the correct main class; the docs include a Maven Shade example.
  5. Rebuild required - run a full Maven compile/test after upgrading so annotation-generated ComponentProvider entries are refreshed.
  6. 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