Title: fix: add MCP initialize handshake to mcpcurl by ra-n-dom · Pull Request #2009 · github/github-mcp-server · GitHub
Open Graph Title: fix: add MCP initialize handshake to mcpcurl by ra-n-dom · Pull Request #2009 · github/github-mcp-server
X Title: fix: add MCP initialize handshake to mcpcurl by ra-n-dom · Pull Request #2009 · github/github-mcp-server
Description: mcpcurl was sending tools/list and tools/call requests without first performing the MCP initialize handshake, causing the server to silently reject all requests and discover zero tools. Before: $ mcpcurl --stdio-server-cmd "github-mcp-server stdio" tools --help (no tools listed) After: $ mcpcurl --stdio-server-cmd "github-mcp-server stdio" tools --help Available Commands: add_comment_to_pending_review ... add_issue_comment ... create_branch ... Summary Added MCP initialize handshake (initialize → read response → notifications/initialized) before sending actual requests Switched from buffered stdout to line-by-line scanning via bufio.Scanner for proper JSON-RPC message handling Added readJSONRPCResponse to skip server-initiated notifications interleaved with responses Ignore server exit code after stdin close (expected EOF) Added 7 unit tests in cmd/mcpcurl/main_test.go Why mcpcurl has never worked — it silently discovers zero tools because the MCP protocol requires an initialization handshake before any requests. The server rejects pre-handshake requests but mcpcurl swallowed the error. What changed cmd/mcpcurl/main.go: Rewrote executeServerCommand() to perform MCP handshake; added buildInitializeRequest(), buildInitializedNotification(), readJSONRPCResponse() cmd/mcpcurl/main_test.go: New file with 7 unit tests MCP impact No tool or API changes Security / limits No security or limits impact Tool renaming I am not renaming tools as part of this PR Lint & tests go test -v ./cmd/mcpcurl/ — 7/7 passing go vet ./cmd/mcpcurl/ — clean
Open Graph Description: mcpcurl was sending tools/list and tools/call requests without first performing the MCP initialize handshake, causing the server to silently reject all requests and discover zero tools. Before: $ m...
X Description: mcpcurl was sending tools/list and tools/call requests without first performing the MCP initialize handshake, causing the server to silently reject all requests and discover zero tools. Before: $ m...
Opengraph URL: https://github.com/github/github-mcp-server/pull/2009
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9f60a5c6-b6f8-69b0-dc09-195b809c4cf0 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E4A0:FB091:DCF250:13C4A60:6A634F68 |
| html-safe-nonce | c7fab8fdd8026948a34385ccbf79369f828d6e79b54004314c6f5f03e4d0b299 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNEEwOkZCMDkxOkRDRjI1MDoxM0M0QTYwOjZBNjM0RjY4IiwidmlzaXRvcl9pZCI6IjM4NDg1NDEzMjc1MjI0ODQwNzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 863145cfd7378d9f4b123d0315f8f089a8f8e9db2cf8977541eb438edaf705cb |
| hovercard-subject-tag | pull_request:3279222170 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/github/github-mcp-server/pull/2009/files |
| twitter:image | https://avatars.githubusercontent.com/u/94629641?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/94629641?s=400&v=4 |
| og:image:alt | mcpcurl was sending tools/list and tools/call requests without first performing the MCP initialize handshake, causing the server to silently reject all requests and discover zero tools. Before: $ m... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 59e55daad7174ca59d63c6974d58276ccb5477442e550bebb3c035e1bef11c94 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/github/github-mcp-server git https://github.com/github/github-mcp-server.git |
| octolytics-dimension-user_id | 9919 |
| octolytics-dimension-user_login | github |
| octolytics-dimension-repository_id | 942771284 |
| octolytics-dimension-repository_nwo | github/github-mcp-server |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 942771284 |
| octolytics-dimension-repository_network_root_nwo | github/github-mcp-server |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 990295d92a4cc7b63fbbd83a046217cd7d77d49c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width