Documented MCP import from Claude Desktop fails due to tool name length validation

Resolved 💬 4 comments Opened Jun 22, 2025 by startakovsky Closed Jun 25, 2025
meta: This GitHub issue was created using Claude Desktop with the same MCP_DOCKER server that fails in Claude Code, demonstrating that the MCP server works correctly in Claude Desktop.

Documented MCP import from Claude Desktop fails due to tool name length validation

Environment

  • Platform: Anthropic API
  • Claude CLI version: 1.0.31
  • Operating System: Mac 15.3.2
  • Terminal: iTerm2

Bug Description

The documented process for importing MCP servers from Claude Desktop to Claude Code fails when using the GitHub Official MCP Server. Claude Code rejects the import due to a tool name exceeding 64 characters, while Claude Desktop accepts and works with the same MCP server configuration without issues.

Documentation reference: https://docs.anthropic.com/en/docs/claude-code/mcp#import-mcp-servers-from-claude-desktop

Steps to Reproduce

  1. Install Docker Desktop: brew install --cask docker
  2. In Docker Desktop, add GitHub Official MCP Server to MCP Toolkit (requires GitHub personal access token)
  3. In Docker Desktop, connect Claude Desktop to MCP Toolkit
  4. Verify the MCP server works correctly in Claude Desktop
  5. Follow documented process: claude mcp add-from-claude-desktop
  6. Select and import the MCP_DOCKER server
  7. Start Claude Code: claude
  8. Attempt any interaction

Expected Behavior

As per the documentation, MCP servers that work in Claude Desktop should be importable and functional in Claude Code. The documented workflow should work without errors.

Actual Behavior

The documented import process succeeds, but Claude Code fails to function:

➜  mcp-servers claude mcp add-from-claude-desktop
╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                     │
│ Import MCP Servers from Claude Desktop                                                              │
│                                                                                                     │
│ Found 1 MCP server in Claude Desktop.                                                               │
│                                                                                                     │
│ Please select the servers you want to import:                                                       │
│                                                                                                     │
│ ❯ MCP_DOCKER ✔                                                                                      │
│                                                                                                     │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯

Successfully imported 1 MCP server to local config.

➜  mcp-servers claude
╭───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code!                         │
│                                                   │
│   /help for help, /status for your current setup  │
│                                                   │
│   cwd: /Users/steven/mcp-servers                  │
╰───────────────────────────────────────────────────╯

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

Root Issue

This represents a lack of parity between Claude Desktop and Claude Code:

  • Claude Desktop: Accepts and works with the GitHub Official MCP Server
  • Claude Code: Rejects the same MCP server due to API validation constraints

The documented workflow promises seamless migration between the two tools, but this fails in practice.

Current Workaround

claude mcp remove MCP_DOCKER

This defeats the purpose of the documented import feature and breaks the expected unified experience across Anthropic's tools.

Additional Context

  • Same MCP server configuration works perfectly in Claude Desktop
  • Error indicates tool #17 has a name longer than 64 characters
  • This affects the GitHub Official MCP Server specifically (51 tools total)
  • The 64-character limitation appears to be an API constraint in Claude Code that doesn't exist in Claude Desktop

View original on GitHub ↗

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