Hero image for Claude MCP Servers Tutorial 2026: Connect Claude to Your Tools and Data
By AI Tool Briefing Team

Claude MCP Servers Tutorial 2026: Connect Claude to Your Tools and Data


Anthropic’s Claude is powerful, but it’s limited to what you paste into the conversation. MCP (Model Context Protocol) changes that by connecting Claude directly to your files, databases, web browsers, and custom tools.

I’ve been using MCP servers for three months. The productivity gain is significant once you get past initial setup. This guide covers everything from basic configuration to building custom servers.

Quick Verdict: MCP for Claude

MCP ServerSetup DifficultyValueBest For
FilesystemEasyHighLocal file access
Web Browser (Puppeteer)MediumHighWeb research, scraping
Database (PostgreSQL/SQLite)MediumHighData analysis
GitHubEasyHighCode repository access
Custom serversHardVariesUnique integrations

Bottom line: MCP is transformative if you regularly need Claude to work with external data. Filesystem and GitHub servers are must-haves. Setup takes 30-60 minutes but saves hours weekly.

What Is MCP?

Model Context Protocol is an open standard that lets AI assistants connect to external data sources and tools. Instead of copying data into Claude, Claude can access it directly.

Without MCP:

  1. Open file
  2. Copy contents
  3. Paste into Claude
  4. Claude analyzes
  5. Repeat for every file

With MCP:

  1. Ask Claude to read the file
  2. Claude reads it directly
  3. Done

What MCP servers can do:

  • Read and write files on your system
  • Query databases
  • Browse websites
  • Call APIs
  • Execute code
  • Access Git repositories
  • Anything you can build with custom servers

Getting Started

Prerequisites

  • Claude Desktop app (MCP works with desktop, not web)
  • Node.js installed (for most servers)
  • Basic command line familiarity
  • Admin access to your machine

Step 1: Locate Configuration File

macOS:

~/Library/Application Support/Claude/claude_desktop_config.json

Windows:

%APPDATA%\Claude\claude_desktop_config.json

Create this file if it doesn’t exist.

Step 2: Basic Configuration Structure

{
  "mcpServers": {
    "server-name": {
      "command": "path/to/server",
      "args": ["arg1", "arg2"],
      "env": {
        "ENV_VAR": "value"
      }
    }
  }
}

Step 3: Restart Claude Desktop

After editing config, fully quit and restart Claude Desktop for changes to take effect.

Essential MCP Servers

1. Filesystem Server

What it does: Lets Claude read and write files on your computer.

Installation:

npm install -g @modelcontextprotocol/server-filesystem

Configuration:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/yourname/Documents",
        "/Users/yourname/Projects"
      ]
    }
  }
}

Usage in Claude:

  • “Read the contents of ~/Projects/myapp/README.md”
  • “List all Python files in ~/Documents/scripts”
  • “Create a new file at ~/Documents/notes/meeting.md with these notes…”

Security note: Only grant access to directories you want Claude to see. Don’t include sensitive directories like ~/.ssh.

2. GitHub Server

What it does: Lets Claude access GitHub repositories, issues, PRs, and files.

Installation:

npm install -g @modelcontextprotocol/server-github

Configuration:

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

Get a GitHub token:

  1. GitHub → Settings → Developer settings → Personal access tokens
  2. Generate new token with repo access
  3. Copy token to config

Usage in Claude:

  • “Show me open issues in myorg/myrepo”
  • “Read the source of src/main.py in myorg/myrepo”
  • “What changed in the last 5 commits to myorg/myrepo?“

3. Puppeteer (Web Browser)

What it does: Lets Claude browse websites, take screenshots, and extract content.

Installation:

npm install -g @modelcontextprotocol/server-puppeteer

Configuration:

{
  "mcpServers": {
    "puppeteer": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
    }
  }
}

Usage in Claude:

  • “Navigate to example.com and summarize the main content”
  • “Take a screenshot of the pricing page at product.com”
  • “Extract all links from the documentation at docs.example.com”

Note: Some sites block automated browsers. Results vary by target.

4. SQLite Server

What it does: Lets Claude query SQLite databases directly.

Installation:

npm install -g @modelcontextprotocol/server-sqlite

Configuration:

{
  "mcpServers": {
    "sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sqlite",
        "--db-path",
        "/path/to/your/database.db"
      ]
    }
  }
}

Usage in Claude:

  • “Show me the schema of this database”
  • “How many users signed up last month?”
  • “What are the top 10 products by revenue?“

5. PostgreSQL Server

What it does: Connects Claude to PostgreSQL databases.

Installation:

npm install -g @modelcontextprotocol/server-postgres

Configuration:

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "postgresql://user:pass@localhost:5432/dbname"
      }
    }
  }
}

Security warning: Be careful connecting production databases. Consider read-only users or replicas.

Multi-Server Configuration

You can run multiple servers simultaneously:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/Projects"]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your_token"
      }
    },
    "puppeteer": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-puppeteer"]
    }
  }
}

Claude can use any/all of these in a single conversation.

Building Custom MCP Servers

For unique needs, you can build custom servers.

Basic Server Structure (TypeScript)

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: "1.0.0",
});

// Define tools the server provides
server.setRequestHandler("tools/list", async () => {
  return {
    tools: [
      {
        name: "my_tool",
        description: "Does something useful",
        inputSchema: {
          type: "object",
          properties: {
            input: { type: "string", description: "Input parameter" }
          },
          required: ["input"]
        }
      }
    ]
  };
});

// Handle tool execution
server.setRequestHandler("tools/call", async (request) => {
  if (request.params.name === "my_tool") {
    const input = request.params.arguments.input;
    // Do your custom logic here
    const result = await processInput(input);
    return { content: [{ type: "text", text: result }] };
  }
});

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

Example: Custom API Integration

// Server that queries your company's internal API
server.setRequestHandler("tools/call", async (request) => {
  if (request.params.name === "query_crm") {
    const customerId = request.params.arguments.customer_id;

    const response = await fetch(
      `https://internal-api.company.com/customers/${customerId}`,
      { headers: { "Authorization": `Bearer ${process.env.API_TOKEN}` } }
    );

    const customer = await response.json();
    return {
      content: [{
        type: "text",
        text: JSON.stringify(customer, null, 2)
      }]
    };
  }
});

Real-World Use Cases

1. Codebase Analysis

With filesystem and GitHub servers:

  • “Analyze the architecture of my project in ~/Projects/myapp”
  • “Compare the local code to what’s in the GitHub repo”
  • “Find all TODO comments across the codebase”

2. Data Analysis

With database servers:

  • “Show me a breakdown of sales by region for Q1”
  • “Find anomalies in the user signups over the last week”
  • “What’s the correlation between feature usage and retention?“

3. Research Assistant

With Puppeteer server:

  • “Research the top 5 competitors in the CRM space and summarize their pricing”
  • “Find recent news about Company X and summarize key developments”
  • “Extract the documentation structure from docs.example.com”

4. Development Workflow

With filesystem and GitHub:

  • “Review the changes in my current branch and suggest improvements”
  • “Create a README.md based on the code structure”
  • “Find and fix all linting issues in the src/ directory”

Troubleshooting

”Server not found” error

  1. Check the command path is correct
  2. Ensure Node.js is installed and in PATH
  3. Try running the npx command manually in terminal
  4. Check for typos in config file

”Permission denied”

  1. Verify file/directory paths exist
  2. Check file permissions
  3. Ensure tokens/credentials are valid
  4. Try with more restricted paths first

Server crashes

  1. Check Claude Desktop logs
  2. Run server manually to see errors:
    npx -y @modelcontextprotocol/server-filesystem /path/to/dir
  3. Update to latest server version

Config not loading

  1. Verify JSON syntax (use a validator)
  2. Ensure file is in correct location
  3. Fully restart Claude Desktop (not just close window)
  4. Check for invisible characters in config

Security Best Practices

Principle of Least Privilege

Only grant access Claude actually needs:

// Good: Specific project directory
"args": ["/Users/me/Projects/specific-project"]

// Bad: Entire home directory
"args": ["/Users/me"]

Sensitive Data Protection

  • Don’t expose ~/.ssh, ~/.aws, or other credential directories
  • Use read-only database connections when possible
  • Rotate API tokens used in MCP configs regularly
  • Review what data Claude can access periodically

Credential Management

// Better: Use environment variables
"env": {
  "API_TOKEN": "${MY_API_TOKEN}"
}

// Worse: Hardcoded in config
"env": {
  "API_TOKEN": "actual-secret-token"
}

Audit Usage

  • Review Claude’s tool usage regularly
  • Monitor for unexpected file access
  • Check database query logs when available

Advanced Configuration

Environment Variables

{
  "mcpServers": {
    "myserver": {
      "command": "node",
      "args": ["server.js"],
      "env": {
        "NODE_ENV": "production",
        "LOG_LEVEL": "info",
        "API_ENDPOINT": "https://api.example.com"
      }
    }
  }
}

Working Directory

{
  "mcpServers": {
    "myserver": {
      "command": "node",
      "args": ["server.js"],
      "cwd": "/path/to/server/directory"
    }
  }
}

Resource Limits

Currently, MCP doesn’t have built-in resource limits. Implement them in your custom servers:

// Rate limiting in custom server
const requestCounts = new Map();
const RATE_LIMIT = 100; // per minute

function checkRateLimit(toolName) {
  const count = requestCounts.get(toolName) || 0;
  if (count >= RATE_LIMIT) {
    throw new Error("Rate limit exceeded");
  }
  requestCounts.set(toolName, count + 1);
}

Frequently Asked Questions

Does MCP work with Claude web?

No, MCP currently only works with Claude Desktop application. The web interface doesn’t support MCP connections.

Is MCP data sent to Anthropic?

When you use MCP, the data retrieved by servers is sent to Claude (and thus Anthropic) as part of your conversation. Consider privacy implications for sensitive data.

Can I use MCP with other AI models?

MCP is an open standard. While primarily used with Claude, other implementations exist and may grow. Check model-specific documentation.

How many servers can I run?

Technically unlimited, but each server uses system resources. 5-10 servers is practical for most users.

Are there pre-built servers for [X]?

There’s a growing list at github.com/modelcontextprotocol/servers. Community servers are also emerging. If one isn’t available, you can build your own.

Can MCP modify files?

Yes, if the server supports write operations and you’ve granted appropriate permissions. Be careful with write-enabled servers on important files.

Is MCP free?

The protocol and official servers are free. You still pay for Claude usage (API/subscription) as normal.


For more on Claude’s latest capabilities, see our Claude Opus 4.5 review.

Last updated: February 2026. MCP is actively developed. Check official documentation for latest features and servers.