Skip to content

fix: upgrade MCP SDK 0.12.1 → 1.1.2, fix Copilot compatibility, rewrite docs#8

Open
TuxLux40 wants to merge 2 commits into
dsp:mainfrom
TuxLux40:main
Open

fix: upgrade MCP SDK 0.12.1 → 1.1.2, fix Copilot compatibility, rewrite docs#8
TuxLux40 wants to merge 2 commits into
dsp:mainfrom
TuxLux40:main

Conversation

@TuxLux40

@TuxLux40 TuxLux40 commented May 4, 2026

Copy link
Copy Markdown

Summary

  • Fixes Copilot (and other modern MCP clients) crashing on connect. The MCP Java SDK 0.12.1 hard-fails with MCP error -32603 when a client sends "elicitation" in ClientCapabilities (added in a recent MCP spec revision). SDK 1.1.2 handles unknown capability fields gracefully.
  • Migrates all breaking API changes introduced between 0.12.1 and 1.1.2:
    • StdioServerTransportStdioServerTransportProvider (now takes McpJsonMapper)
    • mcp artifact split into mcp-core + mcp-json-jackson3
    • AsyncToolRegistrationAsyncToolSpecification
    • Tool handlers now BiFunction<McpAsyncServerExchange, CallToolRequest, Mono<CallToolResult>> instead of Function<Map, Mono<CallToolResult>>
    • Tool and CallToolResult direct constructors replaced with builders
    • Bump compiler target 19 → 21
  • Fixes startup protocol ordering. Previously addTool() was called inside run(), which triggered notifications/tools/list_changed before the client sent initialize. Tools are now registered at build time via .tools() on the server builder.
  • Rewrites README with full installation instructions (native + Docker + Claude Desktop), architecture diagram, tool reference, environment variable table, and development guide.

Test plan

  • Server starts and responds to initialize with no crash when "elicitation" is in client capabilities
  • tools/list returns both get-games and get-recent-games after handshake
  • Tested with GitHub Copilot CLI (previously failing) and Claude Code
  • Fat JAR builds cleanly via mvn package

🤖 Generated with Claude Code

Oliver and others added 2 commits May 4, 2026 16:36
…eference

Also fixes startup protocol ordering: tools now registered at build time
via .tools() on the server builder instead of addTool() calls in run(),
preventing tool-list-changed notifications from arriving before initialize.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot sends `"elicitation"` in ClientCapabilities, which SDK 0.12.1
hard-failed on (unknown field, not marked ignorable). 1.1.2 handles
unknown capabilities gracefully.

Breaking API changes in 1.1.2 migrated:
- StdioServerTransport → StdioServerTransportProvider (takes McpJsonMapper)
- AsyncToolRegistration → AsyncToolSpecification
- Tool/CallToolResult direct constructors → builders
- Tool handler: Function<Map> → BiFunction<McpAsyncServerExchange, CallToolRequest>
- Bump compiler target 19 → 21

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 4, 2026 15:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Upgrades the MCP Java integration to the newer 1.1.2 SDK, adapts the server/bootstrap code to the new APIs, and rewrites the README so this Steam MCP server is easier to install and use with current MCP clients.

Changes:

  • Migrates MCP SDK usage from the old monolithic dependency/API surface to mcp-core + Jackson 3 JSON support and the newer transport/tool registration types.
  • Registers tools during server construction instead of at runtime to avoid protocol-ordering problems during initialization.
  • Expands the README with setup, tool reference, architecture, and development instructions.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/main/java/net/experimentalworks/SteamGamesServer.java Updates server construction, JSON mapper usage, tool registration, and tool result builders for the new MCP SDK.
src/main/java/net/experimentalworks/App.java Switches the entrypoint to the new stdio transport provider and mapper setup.
README.md Rewrites end-user and contributor documentation with install, architecture, and usage guidance.
pom.xml Raises the Java target to 21 and replaces the old MCP dependency with the split 1.1.2 artifacts.
dependency-reduced-pom.xml Refreshes generated reduced POM metadata to reflect the new compiler release.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
stdin/stdout (MCP JSON-RPC)
StdioServerTransport ← MCP Java SDK 0.7.0
Comment thread README.md
Steam Web API (HTTPS)
```

The server is fully reactive: it never blocks a thread while waiting for Steam API responses. Tools are registered at build time (not dynamically added at runtime), which ensures the MCP handshake completes cleanly before any tool notifications are sent.
Comment thread README.md

| Class | Role |
|---|---|
| `App` | Entry point. Creates `StdioServerTransport` and calls `server.run().block()`. |
Comment thread README.md
Comment on lines +212 to +218
# initialize
echo '{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | \
STEAM_API_KEY=<key> STEAM_ID=<id> java -jar target/mcp-steam-1.0-SNAPSHOT.jar

# list tools (after initialized notification)
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","method":"tools/list","id":2,"params":{}}
Comment thread README.md
## Contributing
| Artifact | Version | Purpose |
|---|---|---|
| `io.modelcontextprotocol.sdk:mcp` | 0.7.0 | MCP protocol implementation |
Comment thread README.md
| `org.json:json` | 20250107 | JSON serialization |

Contributions are welcome! Please feel free to submit a Pull Request.
Build tooling: Java 19+, Maven 3.x, maven-shade-plugin (fat JAR), Spotless (formatting).
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.

2 participants