Skip to content

Conversation

@SamMorrowDrums
Copy link
Collaborator

Summary

The go-SDK migration changed MCP protocol handling to require proper initialization before tool calls. The script/get-me script was broken as a result.

Changes

Updates the script to:

  • Add initialize request with protocol version and client info
  • Add notifications/initialized notification
  • Add arguments field to tools/call params
  • Keep stdin open with sleep for response
  • Gracefully handle missing jq dependency (outputs raw JSON if jq not installed)

Testing

GITHUB_PERSONAL_ACCESS_TOKEN=$(gh auth token) script/get-me

Returns the authenticated user's profile information.

The go-SDK migration changed MCP protocol handling to require proper
initialization before tool calls. This updates the script to:

- Add initialize request with protocol version and client info
- Add notifications/initialized notification
- Add arguments field to tools/call params
- Keep stdin open with sleep for response
- Gracefully handle missing jq dependency
@SamMorrowDrums SamMorrowDrums requested a review from a team as a code owner December 8, 2025 10:26
Copilot AI review requested due to automatic review settings December 8, 2025 10:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the script/get-me test script to work with the updated go-SDK MCP protocol requirements. The go-SDK migration introduced proper protocol initialization requirements that the script was missing.

Key Changes

  • Adds proper MCP protocol initialization sequence (initialize → notifications/initialized → tools/call)
  • Adds the arguments field to the tools/call request
  • Implements graceful handling for missing jq dependency
  • Uses subshell pattern with sleep to keep stdin open for server responses

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