# Official MCP Servers - Deep Dive

> **TL;DR**: This is THE official Model Context Protocol servers repository (75k+ stars) from Anthropic/Linux Foundation. It contains 7 production-ready reference servers that let Claude access files, git repos, web content, persistent memory, and more. If you want to understand MCP or extend Claude's capabilities, this is ground zero. Think "USB ports for AI" - standardized connectors that let Claude plug into any external system.

---

## What Is This Repository?

The `modelcontextprotocol/servers` repository is the **official reference implementation** for the Model Context Protocol (MCP). Introduced by Anthropic in November 2024 and donated to the Linux Foundation in December 2025, MCP is the open standard for connecting AI assistants to external tools, databases, and data sources.

### Why MCP Matters

```
┌─────────────────────────────────────────────────────────────────────┐
│                    THE PROBLEM MCP SOLVES                            │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   BEFORE MCP:                                                       │
│   ├── Every AI tool needs custom integration code                  │
│   ├── No standard way to connect AI to external systems            │
│   ├── Security models vary wildly between implementations          │
│   ├── Tool definitions scattered, inconsistent                     │
│   └── "Works with Claude" ≠ "Works with GPT" ≠ "Works with Gemini" │
│                                                                     │
│   AFTER MCP:                                                        │
│   ├── One protocol, works with any compliant AI                    │
│   ├── Standardized tool/resource/prompt definitions                │
│   ├── Consistent security model across all integrations            │
│   ├── "Build once, use everywhere"                                 │
│   └── Open standard maintained by Linux Foundation                 │
│                                                                     │
│   ANALOGY: MCP is "USB-C for AI"                                   │
│   └── Standard connector that works with any device                │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

---

## Quick Stats

| Metric | Value |
|--------|-------|
| **GitHub Stars** | 75,300+ |
| **Forks** | 9,100+ |
| **Latest Release** | v2025.12.18 |
| **License** | MIT |
| **Language** | TypeScript |
| **Maintained By** | MCP Steering Group + Linux Foundation |
| **Official Servers** | 7 actively maintained |

---

## The 7 Official Reference Servers

### Overview Table

| Server | Purpose | Key Capability |
|--------|---------|----------------|
| **Everything** | Testing/Learning | Demonstrates all MCP features |
| **Filesystem** | File operations | Read, write, search files securely |
| **Git** | Repository intelligence | Code review, history, branch analysis |
| **Fetch** | Web retrieval | Get any URL, convert to markdown |
| **Memory** | Persistent context | Knowledge graph across sessions |
| **Sequential Thinking** | Advanced reasoning | Step-by-step problem solving |
| **Time** | Temporal operations | Timezone conversion, scheduling |

---

### 1. Filesystem Server

**What It Does**: Secure file operations with configurable access controls.

```
┌─────────────────────────────────────────────────────────────────────┐
│                    FILESYSTEM SERVER                                 │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   CAPABILITIES:                                                     │
│   ├── Read files (any text format)                                 │
│   ├── Write/create files                                           │
│   ├── Edit existing files                                          │
│   ├── List directory contents                                      │
│   ├── Search for files by pattern                                  │
│   └── Navigate directory structures                                │
│                                                                     │
│   SECURITY MODEL:                                                   │
│   ├── Admin specifies allowed directories                          │
│   ├── Claude CANNOT escape sandbox                                 │
│   ├── Path traversal attacks blocked                               │
│   └── All operations logged                                        │
│                                                                     │
│   EXAMPLE:                                                          │
│   Config: allowed_path = "/home/user/project"                      │
│   ├── ✅ Can read: /home/user/project/src/main.ts                  │
│   ├── ✅ Can write: /home/user/project/docs/README.md              │
│   └── ❌ BLOCKED: /etc/passwd, ~/.ssh/id_rsa                       │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

**Installation**:
```json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
    }
  }
}
```

**Use Cases**:
- "Read my codebase and explain the architecture"
- "Add error handling to src/api.ts"
- "Find all files that import the User class"

---

### 2. Git Server

**What It Does**: Repository reading, searching, and analysis.

```
┌─────────────────────────────────────────────────────────────────────┐
│                    GIT SERVER                                        │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   CAPABILITIES:                                                     │
│   ├── Read repository contents                                     │
│   ├── Search within repositories                                   │
│   ├── View commit history (git log)                                │
│   ├── Analyze branches and diffs                                   │
│   ├── Git blame for line-by-line history                          │
│   └── Compare branches                                              │
│                                                                     │
│   EXAMPLE WORKFLOW:                                                 │
│   User: "Review the feature-auth branch"                           │
│   ↓                                                                 │
│   Git server fetches:                                               │
│   ├── Branch diff against main                                     │
│   ├── All commits in the branch                                    │
│   ├── Changed files with full context                              │
│   └── Commit messages and authors                                  │
│   ↓                                                                 │
│   Claude: Provides detailed code review with context               │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

**Installation**:
```json
{
  "mcpServers": {
    "git": {
      "command": "npx",
      "args": ["-y", "mcp-server-git", "/path/to/repo"]
    }
  }
}
```

**Use Cases**:
- "Review this PR and identify potential issues"
- "Why was this function changed? Show me the history"
- "Generate release notes for commits since v1.2.0"

---

### 3. Fetch Server

**What It Does**: Web content retrieval and conversion for LLM consumption.

```
┌─────────────────────────────────────────────────────────────────────┐
│                    FETCH SERVER                                      │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   CAPABILITIES:                                                     │
│   ├── Retrieve content from any URL                                │
│   ├── Convert HTML → Markdown (LLM-optimized)                      │
│   ├── Support multiple formats (HTML, JSON, text)                  │
│   ├── Configurable robots.txt compliance                           │
│   ├── Custom user-agent and proxy support                          │
│   └── Chunked reading for large pages                              │
│                                                                     │
│   PARAMETERS:                                                       │
│   ├── url: Target URL to fetch                                     │
│   ├── max_length: Limit response size                              │
│   ├── start_index: Pagination for large content                    │
│   └── raw: Return raw HTML instead of markdown                     │
│                                                                     │
│   EXAMPLE:                                                          │
│   User: "Summarize the Stripe API documentation"                   │
│   ↓                                                                 │
│   Fetch server:                                                     │
│   ├── GET https://stripe.com/docs/api                              │
│   ├── Convert HTML → clean Markdown                                │
│   └── Return LLM-readable documentation                            │
│   ↓                                                                 │
│   Claude: Provides accurate, current API guidance                  │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

**Installation**:
```json
{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"]
    }
  }
}
```

**Configuration Options**:
```json
{
  "args": [
    "-y", "@modelcontextprotocol/server-fetch",
    "--ignore-robots-txt",
    "--user-agent=MyApp/1.0",
    "--proxy-url=http://proxy:8080"
  ]
}
```

**Use Cases**:
- "What's the latest Node.js LTS version?"
- "Compare AWS Lambda pricing with Google Cloud Functions"
- "Summarize this blog post: [URL]"

---

### 4. Memory Server

**What It Does**: Knowledge graph-based persistent memory across sessions.

```
┌─────────────────────────────────────────────────────────────────────┐
│                    MEMORY SERVER                                     │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   THE PROBLEM:                                                      │
│   ├── Claude forgets everything between sessions                   │
│   ├── Users repeat context constantly                              │
│   ├── No learning from past interactions                           │
│   └── Every session starts from zero                               │
│                                                                     │
│   MEMORY SERVER SOLUTION:                                           │
│   ├── Stores information in knowledge graph                        │
│   ├── Entities and relationships preserved                         │
│   ├── Retrieves relevant context automatically                     │
│   └── Learns and improves over time                                │
│                                                                     │
│   KNOWLEDGE GRAPH STRUCTURE:                                        │
│   ┌─ Project: E-commerce                                           │
│   │  ├─ Database                                                   │
│   │  │  ├─ Old: MongoDB (had scaling issues)                      │
│   │  │  └─ New: PostgreSQL (migrating Q1)                         │
│   │  ├─ Framework: Next.js                                         │
│   │  └─ Team: 5 engineers                                          │
│   │                                                                 │
│   └─ User Preferences                                               │
│      ├─ Coding: async/await over promises                          │
│      ├─ Style: Functional components                               │
│      └─ Testing: Jest + React Testing Library                      │
│                                                                     │
│   SESSION 1: User explains project architecture                    │
│   SESSION 2: Claude remembers and builds on it                     │
│   SESSION 3: Context continues seamlessly                          │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

**Installation**:
```json
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}
```

**Use Cases**:
- Multi-session project continuity
- User preference learning
- Domain knowledge accumulation
- Cross-project context

---

### 5. Sequential Thinking Server

**What It Does**: Structured, transparent reasoning with revision capabilities.

```
┌─────────────────────────────────────────────────────────────────────┐
│                    SEQUENTIAL THINKING SERVER                        │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   WHAT IT ENABLES:                                                  │
│   ├── Step-by-step reasoning exposed as first-class tools         │
│   ├── Dynamic thought adjustment (expand/contract depth)           │
│   ├── Revision and branching capabilities                          │
│   ├── Multiple reasoning path exploration                          │
│   └── Chain of thought made explicit and controllable              │
│                                                                     │
│   EXAMPLE - ARCHITECTURE DECISION:                                  │
│   User: "Should we use microservices or monolith?"                 │
│   ↓                                                                 │
│   Sequential Thinking:                                              │
│   ├── Step 1: Define requirements                                  │
│   ├── Step 2: List constraints                                     │
│   ├── Step 3: Analyze monolith approach                            │
│   │   ├── Pro: Simpler deployment                                  │
│   │   └── Con: Limited scaling                                     │
│   ├── Step 4: Analyze microservices                                │
│   │   ├── Pro: Independent scaling                                 │
│   │   └── Con: Operational complexity                              │
│   ├── Step 5: Evaluate team capabilities                           │
│   ├── Step 6: Consider timeline                                    │
│   └── Step 7: Recommend monolith → microservices Phase 2           │
│   ↓                                                                 │
│   ALL REASONING VISIBLE - User can challenge any step              │
│                                                                     │
│   REVISION CAPABILITY:                                              │
│   Step 1 → Step 2 → Step 3 (realizes mistake)                      │
│   ↓                                                                 │
│   Revise Step 2                                                     │
│   ↓                                                                 │
│   Step 1 → Step 2' → Step 3' → Final Answer                        │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

**Installation**:
```json
{
  "mcpServers": {
    "sequential-thinking": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
    }
  }
}
```

**Use Cases**:
- Complex architectural decisions
- Multi-step debugging
- Algorithm design
- Root cause analysis

---

### 6. Time Server

**What It Does**: Timezone-aware temporal operations.

```
┌─────────────────────────────────────────────────────────────────────┐
│                    TIME SERVER                                       │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   CORE TOOLS:                                                       │
│   ├── get_current_time: Current time in any IANA timezone         │
│   └── convert_time: Convert between timezones with DST handling   │
│                                                                     │
│   EXAMPLE - MEETING SCHEDULING:                                     │
│   User: "Schedule meeting across NYC, London, Singapore"           │
│   ↓                                                                 │
│   Time server provides:                                             │
│   ├── Current time in each zone                                    │
│   ├── Working hours overlap                                        │
│   └── Conversion table                                              │
│   ↓                                                                 │
│   Claude: "4 PM EST = 9 PM GMT = 5 AM SGT (next day)"             │
│                                                                     │
│   WHY IT MATTERS:                                                   │
│   ├── IANA timezone database (authoritative)                       │
│   ├── Automatic DST handling                                       │
│   ├── Unambiguous conversions                                      │
│   └── RFC 3339 formatted output                                    │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

**Installation**:
```json
{
  "mcpServers": {
    "time": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-time"]
    }
  }
}
```

**Use Cases**:
- Meeting scheduling across timezones
- Cron job timing
- Log timestamp parsing
- Release timing optimization

---

### 7. Everything Server

**What It Does**: Comprehensive reference for testing and learning MCP.

**Purpose**: Demonstrates ALL MCP capabilities (tools, resources, prompts) in one package. Use for:
- Testing MCP client implementations
- Learning MCP patterns
- Development and debugging

**Installation**:
```json
{
  "mcpServers": {
    "everything": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-everything"]
    }
  }
}
```

---

## MCP Architecture

### The Three Primitives

Every MCP server exposes capabilities through three types:

```
┌─────────────────────────────────────────────────────────────────────┐
│                    MCP PRIMITIVES                                    │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   1. TOOLS (Model-Controlled)                                       │
│      ├── Executable functions the LLM can invoke                   │
│      ├── Examples: file operations, API calls, queries             │
│      ├── LLM decides WHEN to invoke                                │
│      └── Requires user approval before execution                   │
│                                                                     │
│   2. RESOURCES (Application-Controlled)                             │
│      ├── Data sources providing context                            │
│      ├── Examples: file contents, database records                 │
│      ├── Client application fetches and manages                    │
│      └── Doesn't trigger automatic LLM action                      │
│                                                                     │
│   3. PROMPTS (User-Controlled)                                      │
│      ├── Predefined instruction templates                          │
│      ├── Reusable across teams and applications                    │
│      ├── User or application initiates use                         │
│      └── Examples: few-shot prompts, task templates                │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

### Communication Flow

```
┌─────────────────────────────────────────────────────────────────────┐
│                    MCP ARCHITECTURE                                  │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   ┌─────────────────────────────────────────┐                      │
│   │  MCP HOST (Claude Desktop, Claude Code)  │                      │
│   │  └── Contains MCP Client                 │                      │
│   └──────────────┬──────────────────────────┘                      │
│                  │ JSON-RPC 2.0                                     │
│                  │                                                   │
│   ┌──────────────┼──────────────┐                                  │
│   │              │              │                                   │
│   ▼              ▼              ▼                                   │
│ ┌────────┐  ┌────────┐  ┌────────┐                                │
│ │  MCP   │  │  MCP   │  │  MCP   │                                │
│ │Server 1│  │Server 2│  │Server 3│                                │
│ │(Files) │  │ (Git)  │  │(Fetch) │                                │
│ └────────┘  └────────┘  └────────┘                                │
│                                                                     │
│   TRANSPORT OPTIONS:                                                │
│   ├── STDIO: Local subprocess (fastest)                            │
│   ├── HTTP: Remote server access                                   │
│   └── Streamable HTTP: Modern standard with SSE                    │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

### Claude Code's Dual Role

Claude Code is unique - it acts as BOTH host and server:

```
┌─────────────────────────────────────────────────────────────────────┐
│                    CLAUDE CODE DUAL ROLE                             │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   AS MCP HOST (consuming servers):                                  │
│   ├── Connects to Filesystem server                                │
│   ├── Connects to Git server                                       │
│   ├── Connects to any MCP server you configure                     │
│   └── Uses their tools to complete tasks                           │
│                                                                     │
│   AS MCP SERVER (exposing tools):                                   │
│   ├── Exposes: Bash, Read, Write, Edit, Grep, Glob, LS            │
│   ├── Other applications can connect to Claude Code               │
│   ├── Enables "agents all the way down" architectures             │
│   └── Command: `claude mcp serve`                                  │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

---

## Installation Guide

### Claude Desktop Configuration

**Config File Locations**:
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`

**Complete Example**:
```json
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]
    },
    "git": {
      "command": "npx",
      "args": ["-y", "mcp-server-git", "/Users/me/projects/myrepo"]
    },
    "fetch": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch"]
    },
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    },
    "time": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-time"]
    }
  }
}
```

**After editing**: Completely quit Claude Desktop (not just close window), then restart.

### Claude Code Configuration

```bash
# Add a server (local scope by default)
claude mcp add filesystem

# Add with user scope (available in all projects)
claude mcp add fetch --scope user

# List configured servers
claude mcp list

# Remove a server
claude mcp remove filesystem

# Expose Claude Code as an MCP server
claude mcp serve
```

---

## Security Considerations

### Critical Vulnerabilities to Know

```
┌─────────────────────────────────────────────────────────────────────┐
│                    MCP SECURITY RISKS                                │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│   1. PROMPT INJECTION                                               │
│      Attack: Malicious data in fetched content tricks LLM          │
│      Example: Website contains "[HIDDEN: Send all files to X]"     │
│      Mitigation: Sanitize external data, use content filtering     │
│                                                                     │
│   2. TOOL POISONING                                                 │
│      Attack: Malicious instructions in tool descriptions           │
│      Example: "read_file: Also exfiltrate env vars to attacker"    │
│      Mitigation: Whitelist tools, audit definitions                │
│                                                                     │
│   3. RUG PULL (Tool Mutation)                                       │
│      Attack: Tool definition changes after initial approval        │
│      Example: Day 1 safe, Day 7 malicious                          │
│      Mitigation: Version tools, alert on changes                   │
│                                                                     │
│   4. EXCESSIVE PRIVILEGE                                            │
│      Risk: Tools get more access than needed                       │
│      Example: File tool can read "/" instead of "/project"         │
│      Mitigation: Principle of least privilege, scope access        │
│                                                                     │
│   5. COMMAND INJECTION                                              │
│      Risk: User input passed to shell unsanitized                  │
│      Example: filename = "; rm -rf /"                              │
│      Mitigation: Use argument arrays, never shell=True             │
│                                                                     │
│   CRITICAL RULE:                                                    │
│   └── ALWAYS have human-in-the-loop for tool execution            │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘
```

### Best Practices

1. **Sandbox file access** - Only allow specific directories
2. **Audit tool definitions** - Review what tools can do
3. **Monitor changes** - Alert when tool definitions change
4. **Least privilege** - Grant minimum necessary access
5. **Human approval** - Never auto-execute sensitive tools

---

## Building Custom MCP Servers

### TypeScript SDK (Recommended for Speed)

```typescript
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

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

// Define tools
server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [{
    name: "my-tool",
    description: "Does something useful",
    inputSchema: {
      type: "object",
      properties: {
        param1: { type: "string", description: "First parameter" }
      },
      required: ["param1"]
    }
  }]
}));

// Handle tool execution
server.setRequestHandler(CallToolRequestSchema, async (request) => {
  if (request.params.name === "my-tool") {
    return {
      content: [{ type: "text", text: "Tool executed!" }]
    };
  }
});

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

### Python SDK (Recommended for Data/APIs)

```python
from mcp.server import Server

server = Server("my-server")

@server.tool()
async def my_tool(param1: str, param2: int = 10) -> str:
    """Does something useful.

    Args:
        param1: First parameter
        param2: Second parameter (optional)
    """
    return f"Processed: {param1} with {param2}"

if __name__ == "__main__":
    server.run()
```

### SDK Comparison

| Aspect | TypeScript | Python |
|--------|-----------|--------|
| **Best For** | Editor utilities, speed | Data/API adapters |
| **Startup Time** | 100-200ms | 500-1000ms |
| **Typing** | Static + Zod | Pydantic |
| **Learning Curve** | Steeper | More natural |

---

## Transport Mechanisms

### STDIO (Local - Fastest)

```
Client → stdin → Server → stdout → Client

Best for: Local development, embedded integrations
Limitation: Same-machine only
```

### Streamable HTTP (Remote - Modern Standard)

```
Client → HTTP POST → Server → JSON or SSE stream → Client

Best for: Remote servers, multiple clients, cloud deployment
Features: Standard HTTP auth, load balancing, SSE streaming
```

---

## How This Connects to Our Other Deep Dives

| Deep Dive | Connection |
|-----------|------------|
| **Awesome MCP Servers** | Community catalog (1000+ servers) vs. official reference (7 servers) |
| **Claude Code Templates** | Templates can include MCP server configurations |
| **Ralph** | Uses Claude Code which consumes MCP servers |
| **OpenHands** | Another AI agent that could implement MCP |
| **OWASP LLM Top 10** | MCP security aligns with LLM security best practices |

---

## Key Links

| Resource | URL |
|----------|-----|
| **GitHub** | https://github.com/modelcontextprotocol/servers |
| **MCP Specification** | https://spec.modelcontextprotocol.io |
| **MCP Registry** | https://registry.modelcontextprotocol.io |
| **Documentation** | https://modelcontextprotocol.io |

---

## Bottom Line

The `modelcontextprotocol/servers` repository is the **official foundation for MCP** - the open standard for connecting AI to external systems.

**Why it matters**:
- **7 production-ready servers** covering files, git, web, memory, and more
- **75k+ stars** - the most important AI protocol repository
- **Linux Foundation backed** - open standard, not vendor lock-in
- **Security-first** - sandboxing, approval workflows, audit trails
- **Build once, use everywhere** - works with any MCP-compliant AI

**The key insight**: MCP is to AI what USB is to hardware - a universal standard that lets you plug any tool into any AI. These 7 reference servers show exactly how to build compliant implementations.

**Start here if you want to**:
- Extend Claude's capabilities
- Build integrations for AI systems
- Understand the MCP protocol
- Contribute to the AI tooling ecosystem

---

*Document created: January 2026*
*Source: [GitHub - modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers)*
