[BUG] API Error: tools..custom.name exceeds 64-character limit when adding GitHub MCP server

Resolved 💬 5 comments Opened Jun 24, 2025 by PierrunoYT Closed Jan 7, 2026

API Error: tools.<n>.custom.name exceeds 64-character limit when adding GitHub MCP server

Summary

When adding the official GitHub MCP server (github.com/github/github-mcp-server) to Claude Code using the recommended Docker command and a valid GitHub Personal Access Token, I receive the following error:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools.17.custom.name: String should have at most 64 characters"}}

This appears related to a tool name exceeding the 64-character limit enforced by Claude Code.

Steps to reproduce

  1. Install Claude Code CLI
  2. Run the following command (replace your_token_here with a valid GitHub PAT):
claude mcp add github.com/github/github-mcp-server \
  -e GITHUB_PERSONAL_ACCESS_TOKEN=your_token_here \
  -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
  1. Observe the API error regarding tool name length

Expected behavior

The GitHub MCP server should be added successfully without errors.

Environment

  • Claude Code CLI version: [your version]
  • Operating System: [your OS and version]
  • Docker version: [your Docker version]

Additional notes

  • I have confirmed that the GitHub PAT is valid and properly scoped
  • Removing other MCP servers or resetting MCP project choices did not resolve the issue
  • This issue seems related to the number or length of tool names handled by the MCP server or Claude Code

Request

Please consider increasing the allowed length for tool names or trimming tool name length to avoid this error.

---
Thank you!

View original on GitHub ↗

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