CLAUDE LABJP
ULTRACODE — Claude Code renames its Dynamic Workflows trigger to ultracode, orchestrating tens to hundreds of agents (Jun)EFFORT — Claude Code now defaults to high effort, spending more reasoning on hard problems (Jun)GLASSWING — Project Glasswing expands to ~150 orgs; Claude Security scans codebases and suggests patches (Jun)SWE-BENCH — Claude Opus 4.8 scores 69.2% on SWE-Bench Pro, topping GPT-5.5 and Gemini 3.1 Pro (May)COPILOT — Claude Opus 4.8 is now generally available in GitHub Copilot (May)POLISH — Claude Code fixes Windows/WSL/voice/vim/IME issues and launches more quietly (Jun)ULTRACODE — Claude Code renames its Dynamic Workflows trigger to ultracode, orchestrating tens to hundreds of agents (Jun)EFFORT — Claude Code now defaults to high effort, spending more reasoning on hard problems (Jun)GLASSWING — Project Glasswing expands to ~150 orgs; Claude Security scans codebases and suggests patches (Jun)SWE-BENCH — Claude Opus 4.8 scores 69.2% on SWE-Bench Pro, topping GPT-5.5 and Gemini 3.1 Pro (May)COPILOT — Claude Opus 4.8 is now generally available in GitHub Copilot (May)POLISH — Claude Code fixes Windows/WSL/voice/vim/IME issues and launches more quietly (Jun)
Articles/Claude Code
Claude Code/2026-03-08Advanced

MCP Servers Guide — Extend Claude Code's Capabilities

Learn how to use Model Context Protocol (MCP) to add custom tools to Claude Code. Build MCP servers for database connections, API integrations, file operations, and more.

MCP60Claude Code239serverstools5extension2protocol

What Is MCP?

Model Context Protocol (MCP) is a standard protocol that enables AI models to interact with external tools and data sources. Through MCP servers, Claude Code can add capabilities like database queries, API calls, and file system operations.

How MCP Works

MCP is a communication protocol between a client (Claude Code) and servers (tool providers).

  1. Servers publish a list of available tools with descriptions
  2. Claude Code recognizes these tools and calls them as needed
  3. Servers execute the tool and return results
  4. Claude Code interprets results and determines next actions

Configuring MCP Servers

Add MCP servers to your Claude Code configuration file.

{
  "mcpServers": {
    "my-database": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
    }
  }
}

Configuration file locations:

  • Per-project: .claude/settings.json
  • Per-user: ~/.claude/settings.json

Key Official MCP Servers

Examples of official servers provided by Anthropic and the community.

File System

Safely read, write, and manage files and directories.

PostgreSQL / SQLite

Connect to databases, execute queries, and retrieve schema information.

GitHub

Manage issues, operate on PRs, and retrieve repository information.

Slack

Send and receive messages and manage channels.

Web Browser

Fetch and scrape web pages.

Building Custom MCP Servers

You can build custom MCP servers in TypeScript.

import { Server } from "@modelcontextprotocol/sdk/server";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio";
 
const server = new Server({
  name: "my-custom-server",
  version: "1.0.0",
});
 
// Define tools
server.setRequestHandler("tools/list", async () => ({
  tools: [{
    name: "get_weather",
    description: "Get weather for a specified city",
    inputSchema: {
      type: "object",
      properties: {
        city: { type: "string", description: "City name" }
      },
      required: ["city"]
    }
  }]
}));
 
// Execute tools
server.setRequestHandler("tools/call", async (request) => {
  if (request.params.name === "get_weather") {
    const city = request.params.arguments.city;
    // Call weather API
    return { content: [{ type: "text", text: `Weather in ${city}: Sunny 22°C` }] };
  }
});
 
const transport = new StdioServerTransport();
await server.connect(transport);

Security Considerations

MCP servers are powerful but require security awareness.

  • Use trusted servers only: Review third-party MCP server code before deployment
  • Principle of least privilege: Use read-only database accounts when possible
  • Credential management: Store API keys in environment variables, never hardcode in config files

Looking back

MCP transforms Claude Code from a coding assistant into a versatile agent that can connect with any system. Start with official servers and build custom ones as your needs grow.

Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

Claude Code2026-04-17
Building a Custom MCP Server for Claude Code — From Design to Production
A complete guide to building a production-ready MCP server for Claude Code from scratch. Covers Transport design, tool definitions, authentication, error handling, and deployment strategies with working TypeScript examples.
Claude Code2026-05-24
Recovering from Claude Code's 'Tool result could not be submitted'
What 'Tool result could not be submitted' really means in Claude Code, and the practical recovery steps I rely on after years of running indie apps with 50M+ downloads through it.
Claude Code2026-05-23
Skill, Subagents, and Rules in Claude Code: A One-Hour Implementation Loop That Fits a Solo Operator
Misaki Ito at SonicGarden wrote about wiring Claude Code's Skill, Subagents, and Rules to close a week's worth of low-priority work in one meeting. Here is how I adapted that pattern as a solo developer running a 50M-download app business.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →