[BUG] MCP numeric parameters broken in v2.1.33 - Go-based MCP servers fail with float64 type assertion

Resolved 💬 2 comments Opened Feb 6, 2026 by kmy504 Closed Mar 6, 2026

Bug Description

After upgrading from Claude Code 2.1.32 to 2.1.33, all MCP tools that accept numeric parameters fail on Go-based MCP servers. The server expects float64 type (standard Go JSON unmarshaling behavior for interface{}), but Claude Code 2.1.33 appears to send the value in an incompatible format (likely as a string or different numeric type).

Error Messages

parameter pullNumber is not of type float64

or:

'PullNumber' expected type 'int32', got unconvertible type 'string'

Affected Versions

| Version | Status |
|---------|--------|
| 2.1.30 | ✅ Working |
| 2.1.32 | ✅ Working |
| 2.1.33 | ❌ Broken |

This is a regression introduced in 2.1.33.

Reproduction Steps

  1. Set up a Go-based MCP server (e.g., github-mcp-server using mcp-go v0.32.0)
  2. Configure it in Claude Code settings
  3. Call any tool that requires a numeric parameter (e.g., get_pull_request with pullNumber: 17415)
  4. On v2.1.32: works fine
  5. On v2.1.33: fails with the error above

Scope of Impact

All MCP tools with numeric parameters are affected, including:

  • get_pull_request (pullNumber)
  • get_pull_request_reviews (pullNumber)
  • get_pull_request_diff (pullNumber)
  • get_pull_request_files (pullNumber)
  • add_issue_comment (issue_number)
  • get_issue_comments (issue_number)
  • Any other tool accepting numeric parameters

String-only parameter tools work fine:

  • search_pull_requests (query: string) → works
  • list_pull_requests → works

Root Cause Analysis

The MCP server's Go code uses standard JSON unmarshaling where numbers in interface{} become float64:

// mcp-go server.go
func RequiredInt(r mcp.CallToolRequest, p string) (int, error) {
    v, err := RequiredParam[float64](r, p)  // expects float64 type assertion
    ...
}

The MCP server itself works correctly when called directly via JSON-RPC:

echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{...}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_pull_request","arguments":{"owner":"BAND","repo":"BAND_iOS","pullNumber":17415}}}' | docker run -i --rm server-image

This returns data correctly, confirming the issue is in how Claude Code 2.1.33 serializes numeric parameters before sending them to the MCP server.

Environment

  • OS: macOS (Darwin 25.2.0)
  • MCP Server: github-mcp-server (Go, mcp-go v0.32.0) running in Podman container
  • Transport: stdio

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗