Skip to content

MCP server name 'playwright-server' causes tool names to exceed 64-char API limit #318

@misza-one

Description

@misza-one

Bug Description

The testing-suite plugin's MCP server named playwright-server creates tool names that exceed Claude's 64-character API limit, causing API errors.

Error Message

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.188.content.0.tool_result.content.1.tool_reference.tool_name: String should have at most 64 characters"}}

Root Cause

When Claude Code loads the MCP server through the plugin system, it creates tool names like:

mcp__plugin_testing-suite_playwright-server__browser_take_screenshot (67 chars)
mcp__plugin_testing-suite_playwright-server__browser_console_messages (70 chars)

These exceed the 64-character limit enforced by the Claude API.

Affected File

cli-tool/components/mcps/browser_automation/playwright-mcp.json

{
  "mcpServers": {
    "playwright-server": {  // <-- This name is too long
      ...
    }
  }
}

Suggested Fix

Rename playwright-server to something shorter like pw:

{
  "mcpServers": {
    "pw": {
      "description": "A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright...",
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    }
  }
}

This would result in tool names like:

mcp__plugin_testing-suite_pw__browser_take_screenshot (51 chars ✓)

Workaround

Users can manually edit the cached plugin file at:
~/.claude/plugins/cache/claude-code-templates/testing-suite/1.0.0/cli-tool/components/mcps/browser_automation/playwright-mcp.json

However, this fix is lost when the plugin updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions