MCP Servers & Tools

The Model Context Protocol (MCP) is an open standard that lets Claude Code connect to external systems — databases, browsers, APIs, and more — through a unified interface. MCP servers act as bridges, giving Claude new tools without modifying its core.

How MCP Works

MCP follows a client-server model. Claude Code is the client that sends requests to one or more MCP servers. Each server exposes a set of tools that Claude can call during a conversation, just like its built-in file editing and terminal tools.

Claude Code (client) --> MCP Server --> External System
                     <-- Tool results <--

Configuring MCP Servers

Add MCP servers to your Claude Code settings file (.claude/settings.json or the global settings). Each entry specifies the server command and any arguments it needs.

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-filesystem", "/path/to/allowed/dir"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-github"],
      "env": {
        "GITHUB_TOKEN": "your-token-here"
      }
    }
  }
}

Common MCP Servers

ServerPurposePackage
FilesystemRead and write files outside the project@anthropic/mcp-server-filesystem
GitHubManage issues, PRs, and repositories@anthropic/mcp-server-github
PostgreSQLQuery and manage Postgres databases@anthropic/mcp-server-postgres
PlaywrightAutomate browser interactions and testing@anthropic/mcp-server-playwright
MemoryPersistent key-value storage for Claude@anthropic/mcp-server-memory
FetchMake HTTP requests to external APIs@anthropic/mcp-server-fetch

Environment Variables

MCP servers often need credentials. Pass them through the env field in configuration rather than hardcoding secrets in command arguments.

{
  "mcpServers": {
    "database": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-postgres"],
      "env": {
        "DATABASE_URL": "postgresql://user:pass@localhost:5432/mydb"
      }
    }
  }
}

Verifying Server Status

After configuring a server, restart Claude Code and check that the server's tools appear in your available tools list. If a server fails to start, Claude will report the error in the conversation.

Security Considerations

  • Scope access narrowly. Only grant servers access to directories and resources they need.
  • Rotate credentials. Use environment variables and rotate tokens regularly.
  • Audit server code. MCP servers run locally with your permissions — review what they do.
  • Use allowlists. Configure file and directory allowlists where supported.

MCP servers turn Claude Code into an extensible platform. Start with one server for your most common integration, then expand as your workflow demands.