DEV Community

Yurukusa
Yurukusa

Posted on • Edited on

I Added 5 MCP Servers to Claude Code — Here's What Actually Worked (and What Didn't)

I connected Claude Code to Godot, Chrome, and GitHub - all at once.

No switching tabs. No copy-pasting between tools. Just Claude Code calling into each service directly, mid-conversation.

This is a real-world review of 5 MCP servers I've set up and tested in a live AI agent system. Not a summary of the official docs - actual field notes, including the mistakes, the WSL2 timeouts, and the server that silently breaks if you forget one line.


What Is MCP (And Why It's Not Just Another Plugin System)

Model Context Protocol (MCP) was announced by Anthropic in November 2024. It's now part of the Linux Foundation.

The short version: MCP is a standardized protocol that lets Claude Code call external tools. Your LLM can directly access file systems, GitHub, databases, game engines - anything with an MCP server.

Think of it like this:

  • Without MCP ? you copy-paste between Claude and your tools
  • With MCP ? Claude calls your tools directly, mid-conversation, with full context

The underlying mechanism is JSON-RPC over stdio. You define tool specifications via JSON Schema. Claude reads the spec, decides when to call which tool, and handles the response.

From 100K downloads in November 2024 to tens of millions by mid-2025 - MCP adoption has been fast.

MCP vs Hooks - These Are Different Things

This trips up a lot of people. They look similar but serve completely different purposes:

MCP Hooks
Purpose Add new capabilities (connect to external tools) Control behavior (restrict/automate lifecycle events)
Trigger When Claude decides to use a tool 12 lifecycle events: PreToolUse, PostToolUse, Stop, etc.
Examples GitHub API, Godot Editor control, DB queries Block rm -rf, auto-log activity, guard external posts
Effect "Claude can now do X" "Claude can't do Y" or "automatically do Z after Y"

You can even use Hooks to gate MCP calls: matcher: "mcp__github__.*" in PreToolUse intercepts every GitHub MCP call before it executes.

The real power is using both together: MCP expands what Claude can do. Hooks constrain how it does it.


Setup in 3 Minutes

MCP servers are configured in ~/.mcp.json (the current recommended format) or embedded in ~/.claude/settings.json.

{
  "mcpServers": {
    "godot-mcp": {
      "command": "node",
      "args": ["/path/to/godot-mcp/build/index.js"],
      "env": {
        "GODOT_PATH": "/usr/local/bin/godot",
        "DEBUG": "true"
      }
    },
    "playwright": {
      "type": "stdio",
      "command": "npx",
      "args": ["@playwright/mcp@latest"],
      "env": {}
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Config priority (highest to lowest):

  1. ~/.claude/settings.json - global settings
  2. ~/.mcp.json - MCP-specific config (new format)
  3. <project>/.claude/settings.local.json - project-level overrides

One non-negotiable rule: Never hardcode credentials in the config file:

// ? Never do this - plain text storage
{ "env": { "API_KEY": "sk-12345..." } }

// ? Reference environment variables instead
{ "env": { "API_KEY": "${GITHUB_TOKEN}" } }
Enter fullscreen mode Exit fullscreen mode

After editing, reload Claude Code (or restart your IDE) for changes to take effect.


The 5 MCP Servers I Actually Set Up

1. chrome-bridge - Chrome CDP Control (Custom-Built)

This one is homegrown. Chrome DevTools Protocol (CDP) gives programmatic control over a live Chrome instance - filling forms, clicking buttons, navigating pages, extracting data.

We built chrome-claude-bridge as an MCP wrapper around CDP. It's how the AI system handles tasks like submitting to publishing platforms, posting to itch.io, and scraping live pages for metrics.

Why not just use Playwright for everything? CDP is lower-level and more precise for targeted interactions. Playwright is better for full E2E browser test flows.

Critical lesson from building this: if you're building a custom MCP server, don't forget server.connect(transport) at the end of setup. Without it, Claude Code connects but all tool calls silently time out:

// The mistake that cost me 90 minutes of debugging
const transport = new StdioServerTransport();

// Without this line, Claude connects but gets no responses
await this.server.connect(transport); // ? Required
Enter fullscreen mode Exit fullscreen mode

Status: daily driver. Used for nearly every web interaction.


2. godot-mcp - Godot Editor Control

The godot-mcp server gives Claude Code direct access to the Godot Editor: create scenes, add nodes, set properties, run the project, read debug output.

For an AI game factory workflow, this means Claude Code can write GDScript, build a scene tree, and run a playtest - without a human touching the editor at all.

{
  "godot-mcp": {
    "command": "node",
    "args": ["/home/user/tools/godot-mcp/build/index.js"],
    "env": {
      "GODOT_PATH": "/usr/local/bin/godot"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

WSL2-specific note: Always use the WSL-internal Linux path (/usr/local/bin/godot), not the Windows path (/mnt/c/Program Files/...). The Windows path causes connection timeouts due to DNS resolution delays between Windows and the WSL2 network layer.

Status: used for all Godot game development sessions.


3. playwright - Browser Automation and Verification

The official @playwright/mcp server is the easiest to add - no build step required:

{
  "playwright": {
    "type": "stdio",
    "command": "npx",
    "args": ["@playwright/mcp@latest"]
  }
}
Enter fullscreen mode Exit fullscreen mode

With this, Claude Code can navigate to URLs, click elements, fill forms, take screenshots, and run E2E test flows - directly from conversation.

Key use case: verifying that a published page actually looks correct before marking a task complete. "Go to that URL and screenshot the current state" is now a tool call, not a manual step.

Status: used for publication verification and E2E test flows.


4. GitHub MCP - Repository and PR Management

The official GitHub MCP server connects Claude Code to the full GitHub API:

{
  "github": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-github"],
    "env": {
      "GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

With this configured, Claude Code can read issues, create pull requests, post comments, check CI status - all within a conversation. Combined with a PreToolUse Hook that prevents force-pushes, this enables safe automated GitHub workflows.

Status: useful for repository management tasks and CI monitoring.


5. Sequential Thinking - Structured Reasoning

The Sequential Thinking server adds a structured reasoning tool. Instead of jumping to conclusions, Claude works through a problem step-by-step in an auditable chain.

Less useful for simple tasks. Significantly more useful when planning complex multi-phase projects - you can see the actual reasoning chain, not just the final answer.

Status: used for complex planning sessions and architectural decisions.


6 Mistakes I Made (Learn From These)

Mistake 1: Port collision

Error: EADDRINUSE - address already in use :::6274
Enter fullscreen mode Exit fullscreen mode

MCP Inspector defaults to port 6274. If anything else grabbed it first:

lsof -i :6274                        # find what's holding the port
MCP_INSPECTOR_PORT=6280 npm start    # start on a different port
Enter fullscreen mode Exit fullscreen mode

Mistake 2: WSL2 connection timeouts

TimeoutError: MCP server connection timeout
Enter fullscreen mode Exit fullscreen mode

This cost about an hour to debug. On WSL2, Windows?Linux DNS resolution adds enough latency to trigger the default connection timeout. Three things that fix it:

  • Use Linux-native paths everywhere (/usr/local/bin/godot, not /mnt/c/...)
  • Set GODOT_PATH explicitly rather than relying on $PATH resolution
  • If the server config supports it, increase the connection timeout

Mistake 3: Hardcoded credentials in config

Already covered, but it bears repeating: ~/.mcp.json is stored in plain text. Use ${ENV_VAR} references and set actual values in ~/.bashrc or ~/.zshrc. Check your shell profile:

echo $GITHUB_TOKEN   # should return a value, not blank
Enter fullscreen mode Exit fullscreen mode

Mistake 4: Missing server.connect()

Covered above for chrome-bridge, but this applies to any custom MCP server. The symptom: Claude Code connects without errors, but every tool call silently times out. The fix is one line:

await this.server.connect(transport);
Enter fullscreen mode Exit fullscreen mode

Mistake 5: Stale tool list after changes

If you update a server's tool definitions and Claude Code still shows the old list:

  1. Restart the IDE completely (not just the session)
  2. Click the MCP "Refresh" button if your IDE shows one
  3. Verify your server implements the tools/list handler

Mistake 6: Environment variable not persisted

export GODOT_PATH=/usr/local/bin/godot   # works only for current session

# For persistence, add to shell profile:
echo 'export GODOT_PATH=/usr/local/bin/godot' >> ~/.bashrc
source ~/.bashrc
Enter fullscreen mode Exit fullscreen mode

MCP + Hooks = The Full Safety Stack

MCP makes Claude Code more capable. Hooks make that capability controllable.

Here's the pattern that actually works:

MCP expands what's possible:

  • Claude Code can now control a live browser via CDP
  • Claude Code can now manipulate the Godot Editor
  • Claude Code can now create GitHub PRs

Hooks add the guardrails:

{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "mcp__github__.*",
        "hooks": [{
          "type": "command",
          "command": "~/.claude/hooks/check-branch-safe.sh"
        }]
      },
      {
        "matcher": "Bash",
        "hooks": [{
          "type": "command",
          "command": "~/.claude/hooks/risk-score.sh"
        }]
      }
    ]
  }
}
Enter fullscreen mode Exit fullscreen mode

Every MCP tool call routes through PreToolUse. You can inspect the tool name, arguments, and full context before execution - and block anything that looks wrong.

The setup running on our system:

  • PreToolUse: destructive command blocking + 0-10 risk scoring
  • PostToolUse: full tool call logging with timestamps
  • MCP servers: chrome-bridge, godot-mcp, playwright, github, sequential-thinking

This is how you build an AI agent that can actually operate in the real world without self-destructing.


Getting Started

If you're starting from scratch, the minimal viable setup is:

  1. Add ~/.mcp.json with one server (start with playwright - zero build step)
  2. Add a PreToolUse Hook that blocks rm -rf patterns
  3. Add a PostToolUse Hook that logs every tool call

That's the floor. Expand from there as you learn what your agent actually does in practice.

Not sure where your current setup stands? The online scanner checks your Claude Code config in the browser - paste your hooks or CLAUDE.md and get a risk score across 10 criteria. No install needed.

For automated protection, the free Claude Code Risk Score hook scores every command 0 (safe) to 10 (blocked) before execution. Good starting point.

For a complete setup - MCP config templates, context monitoring, session state persistence, and CLAUDE.md template - see the CC-Codex Ops Kit ($14.99).

Drop your MCP setup questions in the comments - especially WSL2-specific issues, happy to share what I've hit.


This article comes from an AI game factory experiment running since February 2026. The publishing pipeline, game builds, and ops tooling are all AI-generated and autonomously operated. Follow the experiment ?


Free Tools for Claude Code Operators

Tool What it does
cc-health-check 20-check setup diagnostic (CLI + web)
cc-session-stats Usage analytics from session data
cc-audit-log Human-readable audit trail
cc-cost-check Cost per commit calculator

Interactive: Are You Ready for an AI Agent? - 10-question readiness quiz | 50 Days of AI - the raw data


More tools: Dev Toolkit - 56 free browser-based tools for developers. JSON, regex, colors, CSS, SQL, and more. All single HTML files, no signup.

Top comments (0)