Model Context Protocol is the most underrated piece of AI infrastructure right now. It lets Claude (and other AI tools) talk to your databases, APIs, and local tools through a standard interface. I've been running MCP servers for two months and they've changed what's possible with AI-assisted development.

What MCP Actually Is

Think of MCP as a USB port for AI. Instead of copying data from your database into a chat prompt, you give Claude a direct connection. It can query your database, read your documentation, call your APIs, and interact with external services. All through a standardized protocol that works across different AI clients.

The protocol defines three things: tools (functions the AI can call), resources (data the AI can read), and prompts (reusable templates). A server exposes these, and the AI client (like Claude Code or Claude Desktop) discovers and uses them.

My MCP Setup

I run three MCP servers day to day:

1. Postgres server. This gives Claude read access to my development database. When I'm building a feature, Claude can check the actual schema instead of me pasting CREATE TABLE statements. It can run SELECT queries to understand the data shape. I've locked it to read-only because giving AI write access to a database is a recipe for disaster.

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

2. GitHub server. This lets Claude read issues, PRs, and repository metadata. When I say "look at issue #47 and implement a fix," Claude actually reads the issue description, comments, and linked code references. No more copy-pasting issue text into the chat.

3. Custom documentation server. I built a simple MCP server that serves our internal API documentation and architecture decision records. This is the one that's had the biggest impact. Claude can reference our actual API specs when writing integration code, and it can check our ADRs to understand why certain decisions were made.

Building a Custom MCP Server

Building an MCP server is surprisingly simple. The TypeScript SDK makes it about 50 lines of code for a basic server. Here's the structure:

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

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

server.tool("search_docs", { query: z.string() }, async ({ query }) => {
  const results = await searchDocumentation(query);
  return { content: [{ type: "text", text: JSON.stringify(results) }] };
});

server.resource("architecture", "docs://architecture", async () => {
  const doc = await readFile("./docs/architecture.md");
  return { contents: [{ text: doc, mimeType: "text/markdown" }] };
});

That's a working MCP server. The AI client discovers the tools and resources automatically. You register it in your Claude settings file and it's available in every session.

What Changes with MCP

The biggest shift is that Claude goes from "smart but uninformed" to "smart and connected." Before MCP, every conversation started with me pasting context. Schema definitions, API docs, error logs. Now Claude can pull what it needs.

A concrete example: last week I asked Claude to add a caching layer to a slow endpoint. With MCP, it queried the database to understand the data access patterns, read the existing caching configuration, checked our architecture docs for caching guidelines, and then proposed a solution that fit our existing patterns. Without MCP, I would have needed to provide all of that context manually.

Security Considerations

A few rules I follow strictly:

Read-only by default. Every MCP server I run starts with read-only access. I only add write capabilities for specific, well-understood operations.

Development databases only. Never connect MCP to production. Period. Use a development or staging database with representative data.

Scope the access. My Postgres server can only access specific schemas and tables. My GitHub server is scoped to specific repositories. Don't give the AI access to everything just because you can.

Audit the queries. I log every tool call my MCP servers handle. This lets me review what Claude is actually doing with the access it has.

Getting Started

If you're using Claude Code or Claude Desktop, MCP support is built in. Start with one of the official servers, the Postgres one or the filesystem one. Add it to your configuration, restart Claude, and try asking it about your data. The moment Claude answers a question by querying your actual database instead of guessing, you'll understand why this matters.

MCP is still early, but the protocol is solid and the ecosystem is growing fast. This is the infrastructure layer that turns AI coding assistants from "smart chat" into "actual tools."