Model Context Protocol (MCP)

Extend Claude Code's capabilities with MCP servers. Connect to external tools, data sources, and services with the latest 2025 features including remote servers and OAuth.

NEW: Remote MCP Support

What is Model Context Protocol?

MCP transforms Claude from a passive assistant into an active tool that can manipulate files, run commands, access real-time data, and perform complex multi-step operations across different platforms.

Without MCP

  • Claude can only answer questions
  • Limited to training data knowledge
  • Cannot interact with external systems
  • Passive conversation-based assistance

With MCP

  • Access live data and APIs
  • Manipulate files and run commands
  • Integrate with development tools
  • Active, hands-on assistance

What's New in 2025

Remote MCP Servers

June 2025

Connect to remote MCP servers without running them locally. Access cloud-based services and enterprise tools directly.

Native OAuth Support

June 2025

Secure authentication to remote MCP servers with OAuth. No API keys to manage or credentials to store manually.

Streamable HTTP Transport

March 2025

Enhanced connectivity with HTTP + Server-Sent Events (SSE) for improved performance and reliability.

Quick MCP Setup

Get started with essential MCP servers in minutes. Choose your setup method based on your experience level.

Quick Install Script

Recommended for Beginners

Install essential MCP servers with a single command. Perfect for getting started quickly.

# Install essential MCP servers
claude mcp add sequential-thinking -s user -- npx -y @modelcontextprotocol/server-sequential-thinking
claude mcp add filesystem -s user -- npx -y @modelcontextprotocol/server-filesystem ~/Projects
claude mcp add puppeteer -s user -- npx -y @modelcontextprotocol/server-puppeteer
claude mcp add fetch -s user -- npx -y @kazuph/mcp-fetch

What This Installs:

  • Sequential Thinking: Multi-step reasoning
  • Filesystem: File operations
  • Puppeteer: Browser automation
  • Fetch: HTTP requests and APIs

Manual Configuration

Better Control

Create configuration files manually for better control and customization options.

Create .claude.json:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "~/Projects"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {"GITHUB_TOKEN": "your_token"}
    }
  }
}

Configuration Scopes:

  • local: ./.claude.json (current directory)
  • project: ./.claude/settings.json (shareable)
  • user: ~/.claude.json (all projects)

Popular MCP Servers

Discover the most useful MCP servers for development, automation, and productivity.

Essential Development Servers

Filesystem Server

Essential

Read, write, and manipulate files in your project directories. Essential for any development workflow.

Installation:
claude mcp add filesystem -s user -- npx -y @modelcontextprotocol/server-filesystem ~/Projects
Capabilities:
  • Read and write files
  • Create and delete directories
  • Search file contents
  • File metadata operations

GitHub Server

Popular

Interact with GitHub repositories, issues, pull requests, and more. Requires GitHub token for authentication.

Installation:
claude mcp add github -s user -- env GITHUB_TOKEN=your_token npx -y @modelcontextprotocol/server-github
Capabilities:
  • Repository management
  • Issue and PR operations
  • Code search and analysis
  • Workflow automation

Automation & Testing

Puppeteer Server

Browser automation for testing, scraping, and web interactions.

claude mcp add puppeteer -s user -- npx -y @modelcontextprotocol/server-puppeteer

Sequential Thinking

Enhanced multi-step reasoning for complex problem-solving tasks.

claude mcp add sequential-thinking -s user -- npx -y @modelcontextprotocol/server-sequential-thinking

Fetch Server

HTTP requests and API interactions for external data access.

claude mcp add fetch -s user -- npx -y @kazuph/mcp-fetch

Enterprise & Productivity

Sentry Server

Enterprise

Error monitoring and performance tracking integration with Sentry.

claude mcp add sentry -s user -- npx -y @sentry/mcp-server
Features:
  • Error tracking and analysis
  • Performance monitoring
  • Issue management
  • Release tracking

Linear Server

Project Management

Project management integration with Linear for issue tracking and workflows.

claude mcp add linear -s user -- npx -y @linear/mcp-server
Features:
  • Issue creation and management
  • Project tracking
  • Team collaboration
  • Workflow automation

Remote MCP Servers (2025)

Connect to remote MCP servers with OAuth authentication. No local installation required.

New in June 2025

Remote MCP support allows Claude Code to connect to cloud-based MCP servers without running them locally. This enables access to enterprise services, cloud APIs, and shared development tools.

Benefits:

  • No local server management
  • Access to enterprise services
  • Shared team configurations
  • Automatic updates and maintenance

Security:

  • OAuth 2.0 authentication
  • No API keys to manage
  • Secure token handling
  • Enterprise-grade encryption

Remote MCP Configuration

Example configuration for connecting to remote MCP servers with OAuth authentication.

Configuration Example:

{
  "mcpServers": {
    "enterprise-github": {
      "type": "remote",
      "url": "https://mcp.example.com/github",
      "oauth": {
        "provider": "github",
        "scopes": ["repo", "issues", "pull_requests"]
      }
    },
    "company-tools": {
      "type": "remote", 
      "url": "https://internal-mcp.company.com/tools",
      "oauth": {
        "provider": "company-sso",
        "scopes": ["tools:read", "tools:write"]
      }
    }
  }
}

OAuth Flow: Claude Code will automatically handle the OAuth authentication flow, opening your browser for secure login when needed.

MCP Troubleshooting

Common Issues

Server Not Starting

# Check MCP server status
claude mcp list

# Debug MCP issues
claude --mcp-debug

# Check server configuration
/mcp

Permission Errors

# Fix npm permissions
mkdir ~/.npm-global
npm config set prefix ~/.npm-global
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc

Debugging Commands

Command Purpose
/mcp Check server status
claude mcp list List configured servers
claude --mcp-debug Debug MCP issues
MCP_DEBUG=true claude Enable debug logging

OAuth Integration

Secure authentication with OAuth for remote MCP servers without managing API keys manually.

Native OAuth Support

Claude Code now supports native OAuth authentication for remote MCP servers, eliminating the need to manually manage API keys.

OAuth Configuration
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "oauth:github"
      }
    }
  }
}

Setup Process

Simple steps to configure OAuth authentication for your MCP servers.

  1. Configure MCP server with oauth: prefix
  2. Claude Code handles OAuth flow automatically
  3. Secure token storage and refresh
  4. No manual API key management required

Custom MCP Servers

Build and deploy your own MCP servers to extend Claude Code with custom functionality.

Building Custom Servers

Create custom MCP servers using the official SDK and templates.

Basic MCP Server
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';

const server = new Server(
  {
    name: 'my-custom-server',
    version: '0.1.0',
  },
  {
    capabilities: {
      tools: {},
    },
  }
);

// Add your custom tools here
server.setRequestHandler(ListToolsRequestSchema, async () => {
  return {
    tools: [
      {
        name: 'my_tool',
        description: 'My custom tool',
        inputSchema: {
          type: 'object',
          properties: {},
        },
      },
    ],
  };
});

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

Deployment Options

Various ways to deploy and distribute your custom MCP servers.

  • NPM Package: Publish to npm for easy installation
  • Docker Container: Containerized deployment
  • Remote Server: HTTP-based MCP server
  • Local Script: Direct execution from filesystem
All Claude Commands