🔌Practical

MCP Integration

Extending Claude Code with external tools through the Model Context Protocol.

What Is MCP

The Model Context Protocol (MCP) is a standard way to give AI agents access to external capabilities. Think of MCP servers as plugins — they provide tools that Claude Code can call during its workflow. Without MCP, Claude Code can only use its built-in tools (file I/O, shell, search). With MCP, you can add browser automation, database access, API integrations, and more.

Connecting an MCP Server

MCP servers are added through the Claude Code CLI. For example, connecting the Playwright MCP server for browser automation:

bash
# Add Playwright MCP for browser automation
claude mcp add playwright npx @playwright/mcp@latest -s user

# The -s user flag scopes it to all projects for this user
# Other scopes: project (this repo only), local (this machine)

Verifying the Connection

After adding an MCP server, verify it's connected by running /mcp inside Claude Code. This shows all configured MCP servers and their status. Each tool provided by the MCP server triggers the same permission system as built-in tools.

MCP Scope System

ScopeConfig LocationAvailability
user~/.claude/settings.jsonEvery Claude Code instance for this user
project.claude/settings.jsonThis project only, shared with team via git
local.claude/settings.local.jsonThis project, this machine only
ℹ️Info

MCP servers extend Claude Code with external capabilities — browser automation, database queries, API calls. They turn a code-focused agent into a general-purpose automation platform.

Before you continue

We use analytics cookies to understand how the documentation is used and improve the experience. Privacy Policy.