Contents

What is MCP

MCP (Model Context Protocol) is an open protocol that lets you connect external tools to Claude. Instead of Claude only knowing about files in your project, MCP servers give it access to databases, GitHub, the browser, Jira, Slack and much more. (Basic Claude Code setup is covered in the first article of the series.)

The architecture is simple:

Claude Code <-> MCP client <-> MCP server <-> External service

How to connect an MCP server

Via CLI (quick)

# Local (stdio) server: options come BEFORE the name, the command is separated by `--`
claude mcp add --transport stdio <name> -- npx -y <package> [args]

# Remote (HTTP) server:
claude mcp add --transport http <name> <url>

# Examples:
claude mcp add --transport stdio filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/dir
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer ${GITHUB_TOKEN}"

By default a server is added at local scope (just you, this project only). Add --scope project to write it to .mcp.json and share with the team.

Create .mcp.json in the project root:

{
  "mcpServers": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer ${GITHUB_TOKEN}"
      }
    },
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "${DATABASE_URL}"
      }
    }
  }
}

This file is committed to the repository — everyone on the team gets the same tools.

Useful MCPs for development

GitHub MCP

# GitHub is now a hosted HTTP server (the old npm package @modelcontextprotocol/server-github is deprecated)
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer ${GITHUB_TOKEN}"

What it can do:

  • Read and create Issues and Pull Requests
  • Browse code in the repository
  • Manage branches and commits
  • Search code on GitHub

Usage example:

"Look at open bugs labelled 'critical' and propose a fix plan"
"Create a PR with description for the current branch"

PostgreSQL / SQLite MCP

# PostgreSQL
claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server-postgres

# SQLite
claude mcp add --transport stdio sqlite -- npx -y @modelcontextprotocol/server-sqlite --db-path ./db.sqlite

What it can do:

  • Inspect the DB schema
  • Run SQL queries
  • Analyze data

Example:

"Show the tables with the largest row counts"
"Find N+1 problems in this code given the DB structure"

Filesystem MCP

claude mcp add --transport stdio filesystem -- npx -y @modelcontextprotocol/server-filesystem /home/user/projects

Extended file access beyond the working directory — for example, to shared configs or other projects.

Playwright MCP (browser)

# Playwright is the current browser server (the puppeteer reference server is archived)
claude mcp add --transport stdio playwright -- npx -y @playwright/mcp

What it can do:

  • Open pages in a browser
  • Take screenshots
  • Interact with the UI (clicks, input)
  • Test web applications

Example:

"Go to localhost:3000 and verify the registration form works"
"Take a screenshot of the page and find visual bugs"

Brave Search MCP

claude mcp add --transport stdio brave-search -- npx -y @modelcontextprotocol/server-brave-search
# Requires BRAVE_API_KEY

Web search right from the session — useful when you need to find current documentation or a fix for an error.

Sentry MCP

# Sentry is a hosted HTTP server
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp

Access to errors from Sentry:

"Show the latest 10 errors in production and propose fixes"

Linear MCP

claude mcp add --transport stdio linear -- npx -y linear-mcp-server

Working with tasks in Linear:

"Create a task based on this bug"
"Which tasks in the sprint haven't been picked up yet?"

Inspecting connected servers

# List all servers
claude mcp list

# Details of a specific server
claude mcp get github

# Remove a server
claude mcp remove github

Inside a session you can check available tools via /mcp.

Security

MCP servers get access to your data — only connect trusted ones.

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "${DATABASE_URL}"
      }
    }
  }
}

Never hardcode credentials in .mcp.json — use environment variables. The file itself can be committed; the secrets cannot.

Your own MCP server

If you need access to an internal system, you can write your own server — the MCP SDK is available for TypeScript and Python (a full from-scratch walkthrough is in building your own MCP server):

npm install @modelcontextprotocol/sdk
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new Server({ name: "my-server", version: "1.0.0" }, {
  capabilities: { tools: {} }
});

server.setRequestHandler("tools/list", async () => ({
  tools: [{
    name: "get_deploys",
    description: "Get latest deploys from the internal system",
    inputSchema: { type: "object", properties: {} }
  }]
}));

server.setRequestHandler("tools/call", async (req) => {
  if (req.params.name === "get_deploys") {
    // call to the internal API
    return { content: [{ type: "text", text: JSON.stringify(deploys) }] };
  }
});

const transport = new StdioServerTransport();
await server.connect(transport);

Summary

  • MCP extends Claude Code with external tools: DBs, GitHub, browser, search
  • .mcp.json in the project root — a convenient way to fix the server set for the team
  • Most useful for development: GitHub, PostgreSQL, Playwright, Brave Search
  • Secrets — only via environment variables, not in the config
  • You can write your own MCP server for any internal service
Share: