[BUG] GitHub MCP tool calls fail with ByteString error when session contains non-ASCII (Cyrillic) content
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Bug description:
Calling any mcp__github__* tool in a Claude Code session fails with the following error when the session contains Cyrillic characters (e.g., in CLAUDE.md or user messages):
MCP error -32603: Cannot convert argument to a ByteString because the character
at index 7 has a value of 1042 which is greater than 255.
Character 1042 is Unicode В (Cyrillic capital B).
Steps to reproduce:
Configure github-mcp-server in ~/.claude/settings.json (stdio transport, PAT token — all ASCII)
Add a CLAUDE.md that contains Cyrillic text (or start a session with a Cyrillic user message)
Call any GitHub MCP tool, e.g. search_repositories with a plain ASCII query
Expected: Tool call succeeds and returns GitHub API data.
Actual: MCP error -32603: Cannot convert argument to a ByteString because the character at index 7 has a value of 1042 which is greater than 255.
Investigation:
The local binary works correctly when called directly:
Direct stdio test → returns valid GitHub API JSON ✅
printf '{"jsonrpc":"2.0","id":1,"method":"initialize",...}\n{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"search_repositories","arguments":{"query":"octocat"}}}\n' \
| GITHUB_PERSONAL_ACCESS_TOKEN=<token> /opt/homebrew/bin/github-mcp-server stdio
Token is valid (curl to api.github.com/user returns HTTP 200). The token contains only ASCII characters.
The error originates in Claude Code's internal Node.js layer when proxying the tool call — likely a Cyrillic character from the session context (CLAUDE.md or user message) is being placed into an HTTP header, which Node.js rejects with this exact error.
Environment:
macOS 26.5.1 (Sequoia)
Node.js v26.0.0
github-mcp-server v1.5.0 (installed via Homebrew)
Claude Code VSCode extension (version unknown — claude --version returns nothing)
Transport: stdio
Workaround: Use gh CLI directly instead of MCP tools.
What Should Happen?
GitHub MCP tool calls should succeed regardless of whether the session contains
non-ASCII characters (e.g., Cyrillic text in CLAUDE.md or user messages).
The tool call parameters (query string, repo name, etc.) are plain ASCII — any
non-ASCII content from the session context should never leak into HTTP headers
or other transport-layer fields when proxying calls to a local stdio MCP server.
Error Messages/Logs
Steps to Reproduce
- Add a CLAUDE.md containing Cyrillic text (or any non-Latin1 characters)
- Configure github-mcp-server in ~/.claude/settings.json:
{
"mcpServers": {
"github": {
"command": "/path/to/github-mcp-server",
"args": ["stdio"],
"env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-token>" }
}
}
}
- Open a new Claude Code session (VS Code extension)
- Send a message containing Cyrillic text, or let CLAUDE.md load automatically
- Call any GitHub MCP tool, e.g.:
- search_repositories with query "octocat"
- get_issue with any valid repo and issue number
Result: MCP error -32603 (ByteString encoding error)
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Last Working Version: Unknown — not tested on earlier versions Claude Code Version: 2.1.196 (VS Code extension, darwin-arm64)
Claude Code Version
2.1.196
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_