← All posts
·6 min read

Claude Code MCP Servers: The Complete Guide

Claude CodeMCPSetup
Claude Code MCP Servers: The Complete Guide

TL;DR

  • Model Context Protocol (MCP) is the standard that lets Claude Code connect to external tools, databases, APIs, browsers, and third-party services beyond reading files and running terminal commands.
  • Each server exposes tools that Claude Code discovers at startup and calls inline during tasks; the tools feel native, so you describe the goal rather than naming the server.
  • You add servers two ways: the CLI (claude mcp add, with --scope user for all projects or --scope project for one) or by editing .mcp.json (or ~/.claude.json globally). Most servers run locally over stdio, with HTTP for remote services.
  • Useful categories include database access (Turso, Postgres), GitHub, Playwright browser automation, Google Workspace, web scraping with Firecrawl, and a persistent memory server.
  • Every enabled server adds tool definitions to Claude Code's context, so start with two or three that match your workflow and disable unused ones with claude mcp disable to limit context overhead.

What are MCP servers and why do they matter?

Model Context Protocol (MCP) is the standard that lets Claude Code connect to external tools, databases, APIs, browsers, file systems, and third-party services. Without MCP, Claude Code can read files and run terminal commands. With MCP, it can query your database directly, read Google Sheets, manage GitHub issues, control a browser, and interact with dozens of other services.

Think of MCP servers as plugins that extend what Claude Code can do. Each server exposes a set of tools that Claude Code can call during any task. The protocol handles authentication, data formatting, and communication, you just add the server and start using it.

How MCP works with Claude Code

The architecture is straightforward:

  1. You configure an MCP server: either locally (stdio) or remotely (HTTP)
  2. Claude Code discovers its tools at startup, each server declares what it can do
  3. During tasks, Claude Code calls these tools as needed, just like it calls git or npm
  4. Results flow back into context: Claude Code uses the data to inform its next action

The key insight: MCP tools feel native. You don't need to tell Claude Code "use the database MCP server to query users." You just say "find all users who signed up this week" and Claude Code figures out which tool to call.

Setting up your first MCP server

Method 1: CLI (recommended)

# Add a server
claude mcp add my-server --scope user -- npx my-mcp-server

# List configured servers
claude mcp list

# Remove a server
claude mcp remove my-server

The --scope flag controls where the config lives:

  • user: available in all projects (~/.claude.json)
  • project: available only in the current project (.mcp.json)

Method 2: JSON config

Edit .mcp.json in your project root (or ~/.claude.json for global):

{
  "mcpServers": {
    "my-server": {
      "command": "npx",
      "args": ["my-mcp-server"],
      "env": {
        "API_KEY": "your-key-here"
      }
    }
  }
}

Transport types

  • stdio: runs a local process. Best for tools that need filesystem access or local resources.
  • HTTP: connects to a remote server. Best for cloud services and shared infrastructure.
  • SSE: older remote transport, deprecated in favor of HTTP.

Most MCP servers use stdio. You install them via npm and they run as local processes alongside Claude Code.

Essential MCP servers for developers

Here are the most useful MCP servers categorized by what they do:

Database access

Turso / SQLite, query your database directly from Claude Code. Instead of writing SQL in a separate client and pasting results, Claude Code runs queries, reads results, and acts on the data in one flow.

{
  "turso": {
    "command": "npx",
    "args": ["turso-mcp-server"],
    "env": {
      "TURSO_DATABASE_URL": "libsql://your-db.turso.io",
      "TURSO_AUTH_TOKEN": "your-token"
    }
  }
}

Postgres, MySQL, MongoDB, similar servers exist for every major database. Search the MCP registry for your stack.

Code and project management

GitHub, manage issues, pull requests, code search, and repository operations without leaving Claude Code. Create PRs, review code, search across repos, all through natural language.

{
  "github": {
    "command": "npx",
    "args": ["@modelcontextprotocol/server-github"],
    "env": {
      "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your-token"
    }
  }
}

Browser automation

Playwright, Claude Code can control a browser, navigate pages, click elements, fill forms, and take screenshots. Useful for testing, scraping, and automation tasks.

{
  "playwright": {
    "command": "npx",
    "args": ["@anthropic-ai/mcp-server-playwright"]
  }
}

Google Workspace

Google Sheets, read and write spreadsheets directly. No more copy-pasting data between terminal and browser.

Google Drive, search, fetch, and organize files programmatically.

Web and search

Firecrawl, deep web scraping and site crawling. Extract structured data from any website.

Web search, search the web from within Claude Code to gather information for tasks.

Memory and context

Memory server, a structured knowledge graph that persists facts across sessions. Claude Code can store and retrieve information that survives between conversations.

Building a production MCP stack

A practical .mcp.json for a full-stack development workflow:

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["@modelcontextprotocol/server-github"],
      "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_..." }
    },
    "playwright": {
      "command": "npx",
      "args": ["@anthropic-ai/mcp-server-playwright"]
    },
    "memory": {
      "command": "npx",
      "args": ["@anthropic-ai/mcp-server-memory"]
    }
  }
}

Start with 2-3 servers that match your workflow. Each server adds tool definitions to Claude Code's context, so more servers means more context consumption. Add what you need, disable what you don't.

Context management tip

Every enabled MCP server adds tool definitions to Claude Code's system prompt. If you have 10+ servers with dozens of tools each, that's significant context overhead on every request.

To manage this:

  • Disable unused servers: claude mcp disable server-name
  • Use project-scope (.mcp.json) for project-specific servers
  • Use user-scope (~/.claude.json) only for universally useful servers

This ties directly into managing Claude Code's rate limits, fewer loaded tools means less context per request means more requests before you hit limits.

Claude Code as an MCP server

Claude Code can also run as an MCP server, exposing its capabilities to other tools:

claude mcp serve

This lets other MCP clients, like Claude Desktop, Cursor, or Windsurf, invoke Claude Code's file editing and command execution tools remotely. It's useful for teams that want to centralize Claude Code's capabilities or integrate it into larger automation pipelines.

MCP vs traditional tool integration

Before MCP, connecting AI coding tools to external services required custom scripts, API wrappers, and manual data piping. MCP standardizes this:

Without MCP With MCP
Query DB in separate client → copy results → paste into chat "Find users who signed up this week", auto-queries DB
Open GitHub → create PR → copy URL → tell AI about it "Create a PR for these changes", handles everything
Open browser → navigate → screenshot → describe to AI "Check if the homepage loads correctly", automated
Write script → run → read output → paste back Tool calls happen inline, automatically

The productivity difference is substantial. MCP eliminates the copy-paste-context-switch loop that slows down AI-assisted development.

Getting started

  1. Pick one MCP server that matches a pain point in your workflow
  2. Add it with claude mcp add
  3. Use Claude Code normally, it discovers and uses the tools automatically
  4. Add more servers as needed

The MCP ecosystem is growing fast. New servers launch weekly, covering everything from Slack to Notion to custom internal tools. The protocol is open, so if a server doesn't exist for your use case, you can build one.

For a pre-configured MCP stack that works out of the box, Claudify includes setup guides, recommended server configurations, and integration patterns for the most common development workflows. One install, fully connected.

Get Claudify: Claude Code with the full MCP stack, configured and ready.

More like this

Ready to upgrade your Claude Code setup?

Get Claudify
Featured on Dofollow.Tools AI Toolz Dir Claudify - Featured on Startup Fame