Skip to content

Conversation

@ChrisJBurns
Copy link
Collaborator

@ChrisJBurns ChrisJBurns commented Oct 3, 2025

Summary

Updates the yardstick project to use the Model Context Protocol (MCP) go-sdk version 1.0.0, ensuring compliance with the latest MCP specification.

Changes

Dependencies

  • ✅ Upgraded github.com/modelcontextprotocol/go-sdk from v0.1.0 to v1.0.0
  • ✅ Added github.com/google/jsonschema-go v0.3.0 for JSON schema validation
  • ✅ Updated github.com/stretchr/testify to v1.11.1 (merged from main)
  • ✅ Updated Go version requirement to 1.24.5 with toolchain 1.24.7

Server Implementation (cmd/yardstick-server/main.go)

  • Updated imports to use github.com/google/jsonschema-go/jsonschema instead of the removed internal jsonschema package
  • Modified server initialization to use the new mcp.Implementation struct pattern
  • Updated tool handler signature from CallToolParamsFor/CallToolResultFor to the new simpler API
  • Changed tool registration to use mcp.AddTool() with explicit schema definition
  • Fixed transport initialization for StdioTransport, SSE, and Streamable HTTP transports
  • Updated SSE handler to include nil options parameter

Client Implementation (cmd/yardstick-client/main.go)

  • Updated client initialization to use mcp.Implementation struct
  • Fixed Connect() method call to include the required third parameter (options)
  • Updated transport constructors:
    • CommandTransport for stdio connections
    • SSEClientTransport for SSE connections
    • StreamableClientTransport for HTTP connections

Test Updates

  • Fixed all test files to match new MCP SDK v1.0.0 API signatures
  • Updated mock server creation to use new patterns
  • Adjusted test assertions to match new handler response patterns
  • All tests now pass with race detection enabled

Claude Integration

  • Added claude.md documentation file for future Claude interactions with the repository

Testing

  • ✅ All unit tests pass (go test ./...)
  • ✅ Race condition testing passes (go test -v -race ./...)
  • ✅ Both binaries build successfully
  • ✅ Integration tests for SSE and Streamable HTTP transports pass

Breaking Changes

The API has changed significantly from v0.1.0 to v1.0.0. Any code using the yardstick server or client will need to be updated to match the new interfaces.

MCP 1.0.0 Compliance

This update ensures full compliance with the official MCP specification v1.0.0, including:

  • Proper schema validation using google/jsonschema-go
  • Updated transport patterns that align with MCP spec
  • Simplified tool registration pattern with mcp.AddTool
  • Correct handling of tool responses and errors

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
- Changed 'req *mcp.CallToolRequest' to '_ *mcp.CallToolRequest' in echoHandler
- Fixes revive unused-parameter lint warning
- All tests continue to pass
- Set Go version to 1.23.0 (the actual minimum requirement)
- Removed unnecessary toolchain directive
- The previous 1.24.x versions appear to be future/development versions
Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
@ChrisJBurns ChrisJBurns enabled auto-merge (squash) October 3, 2025 23:49
@ChrisJBurns ChrisJBurns merged commit d030400 into main Oct 4, 2025
2 checks passed
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.

3 participants