MCP Servers: The Complete Guide

Updated February 2026 · 15 min read

MCP (Model Context Protocol) servers extend AI assistants like Claude Code, Cursor, and Windsurf with external capabilities -- connecting them to databases, APIs, cloud services, and thousands of other tools. This guide covers everything you need to know about finding, installing, configuring, and building MCP servers.

Browse our MCP Server Directory with 890+ servers sourced from the official MCP registry, organized by category with install commands.

1. What Are MCP Servers?

The Model Context Protocol (MCP) is an open standard created by Anthropic that defines how AI assistants communicate with external tools and services. An MCP server is a lightweight process that exposes specific capabilities (tools, resources, or prompts) to AI clients via a standardized protocol.

Think of MCP servers as plugins for AI assistants. Instead of the AI trying to do everything itself, it can delegate to specialized MCP servers that handle specific tasks -- querying a database, searching the web, managing files, interacting with APIs, and more.

Key concepts

2. How to Install MCP Servers

There are three main ways to add MCP servers to your AI assistant setup:

Method 1: Claude Code CLI (recommended)

Claude Code has built-in MCP server management. Add a server directly from the command line:

# Add an npm-based MCP server
claude mcp add my-server -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed

# Add a Python-based MCP server
claude mcp add my-db-server -- uvx mcp-server-sqlite --db-path ./my.db

# List installed MCP servers
claude mcp list

# Remove a server
claude mcp remove my-server

Method 2: Configuration file

Add servers to your .mcp.json file (for Claude Code) or claude_desktop_config.json (for Claude Desktop):

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]
    },
    "postgres": {
      "command": "uvx",
      "args": ["mcp-server-postgres"],
      "env": {
        "DATABASE_URL": "postgresql://user:pass@localhost/mydb"
      }
    },
    "brave-search": {
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-brave-search"],
      "env": {
        "BRAVE_API_KEY": "your-api-key-here"
      }
    }
  }
}

Method 3: Remote MCP servers

Some MCP servers run remotely and connect via HTTP. These don't require local installation:

{
  "mcpServers": {
    "remote-service": {
      "url": "https://mcp.example.com/sse",
      "transport": "sse"
    }
  }
}

3. Best MCP Servers by Category

Here are the most popular and useful MCP servers organized by what they do. Browse our full MCP Server Directory for the complete list.

Database PostgreSQL, MySQL, SQLite, Redis Developer Tools Git, GitHub, CI/CD, testing Search & Scraping Brave, Google, web scraping AI & ML OpenAI, embeddings, vectors Cloud & Infra AWS, Docker, Kubernetes Communication Slack, Discord, email Productivity Notion, Jira, Linear Data & Analytics CSV, JSON, BigQuery

The official reference servers

These are maintained by the MCP team and serve as reference implementations:

4. Transport Types Explained

MCP servers communicate with clients using one of three transport protocols:

Which transport should you use? For local tools, use stdio -- it's the simplest and most reliable. For remote/shared servers, use streamable-http if the server supports it, otherwise sse.

5. MCP Servers vs Claude Code Skills

Both MCP servers and Claude Code skills extend AI capabilities, but they work differently:

Use skills when you want to change how Claude thinks. Use MCP servers when you want to change what Claude can do.

They work great together: a skill might instruct Claude to use a specific MCP server in a certain way. For example, a "database migration" skill could guide Claude through a migration workflow while using a PostgreSQL MCP server to inspect the current schema.

6. Building Your Own MCP Server

Creating an MCP server is straightforward with the official SDKs:

TypeScript (Node.js)

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

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

// Define a tool
server.tool("greet", { name: "string" }, async ({ name }) => ({
  content: [{ type: "text", text: `Hello, ${name}!` }],
}));

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

Python

from mcp.server import Server
from mcp.server.stdio import stdio_server

server = Server("my-server")

@server.tool()
async def greet(name: str) -> str:
    """Greet someone by name."""
    return f"Hello, {name}!"

async def main():
    async with stdio_server() as (read, write):
        await server.run(read, write)

For a detailed guide on building MCP servers, check out the MCP Builder skill from Anthropic's official skills collection.

7. Where to Find MCP Servers

The MCP ecosystem is growing rapidly. Here are the best places to discover servers:

8. Configuration Best Practices

Security note: MCP servers can execute code, access files, and make network requests. Only install servers from trusted sources, review their permissions, and use environment variables for sensitive configuration.

9. Troubleshooting Common Issues

Server not connecting

Tools not appearing

Slow startup