MCP Servers & Integrations
Extend Claude Code with Model Context Protocol servers — connect databases, browsers, GitHub, and custom tools through a standardised interface.
Extend Claude Code with Model Context Protocol servers — connect databases, browsers, GitHub, and custom tools through a standardised interface.
The Model Context Protocol (MCP) is an open standard that lets AI assistants like Claude Code communicate with external tools and data sources through a common interface. Instead of building a custom integration for every tool, MCP defines one protocol that any tool can implement.
From Claude Code's perspective: MCP servers appear as additional capabilities. You can ask Claude to "query the database" or "take a screenshot of localhost:3000" and it will use the installed MCP server to do it.
Without MCP, Claude Code only has access to:
With MCP servers, Claude Code gains access to:
Anthropic and the community maintain a growing list of production-ready servers:
| Server | What it provides |
|---|---|
| @modelcontextprotocol/server-filesystem | Expanded file system operations beyond the CWD |
| @modelcontextprotocol/server-git | Git log, blame, diff — without running shell commands |
| @modelcontextprotocol/server-github | GitHub repos, issues, PRs, code search |
| @modelcontextprotocol/server-postgres | Run SQL queries against a PostgreSQL database |
| @modelcontextprotocol/server-puppeteer | Control a Chromium browser — navigate, screenshot, click |
| @modelcontextprotocol/server-slack | Read channels, post messages, list users |
Full list: github.com/modelcontextprotocol/servers
Use the claude mcp add command:
# Install the filesystem server
claude mcp add @modelcontextprotocol/server-filesystem /home/myuser/projects
# Install the GitHub server (set your token first)
export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_...
claude mcp add @modelcontextprotocol/server-github
# Install the PostgreSQL server
claude mcp add @modelcontextprotocol/server-postgres \
postgresql://user:password@localhost/mydbPass database credentials via environment variables, not inline in the command. Your shell history is readable. Use export DB_URL=... and reference $DB_URL in the claude mcp add call.
claude mcp listOutput:
Installed MCP servers:
filesystem @modelcontextprotocol/server-filesystem ✓ running
github @modelcontextprotocol/server-github ✓ running
postgres @modelcontextprotocol/server-postgres ✓ running
Once servers are installed, you use them through natural language — no special syntax:
> How many open issues does this repo have?
Claude calls the GitHub MCP server, queries the issues API, and responds:
This repository has 23 open issues. The oldest unresolved one is #14
(opened 47 days ago): "Add dark mode support".
Or for database queries:
> What are the 5 users with the most orders in the last 30 days?
Claude generates and runs the SQL, then summarises the results in plain English — without you ever writing a query.
If you need to expose a proprietary API or internal tool to Claude Code, you can write your own MCP server in TypeScript. Here is the minimal skeleton:
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import {
CallToolRequestSchema,
ListToolsRequestSchema,
} from '@modelcontextprotocol/sdk/types.js';
const server = new Server(
{ name: 'my-custom-server', version: '1.0.0' },
{ capabilities: { tools: {} } }
);
// Declare your tools
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [
{
name: 'get_product_price',
description: 'Look up the current price of a product by SKU',
inputSchema: {
type: 'object',
properties: {
sku: { type: 'string', description: 'Product SKU code' },
},
required: ['sku'],
},
},
],
}));
// Handle tool calls
server.setRequestHandler(CallToolRequestSchema, async (request) => {
if (request.params.name === 'get_product_price') {
const sku = request.params.arguments?.sku as string;
// Replace with your actual API call
const price = await fetchPriceFromInternalAPI(sku);
return {
content: [{ type: 'text', text: `Price for ${sku}: $${price}` }],
};
}
throw new Error(`Unknown tool: ${request.params.name}`);
});
async function fetchPriceFromInternalAPI(sku: string): Promise<number> {
// Your implementation here
return 0;
}
const transport = new StdioServerTransport();
await server.connect(transport);Install it with:
claude mcp add ./my-custom-server/index.jsMCP servers communicate over stdio (standard input/output), so they run as child processes of Claude Code. This means they have no network exposure by default — your internal API calls stay inside your machine or VPN.
MCP server registrations can be scoped to:
.claude/mcp.json — shared with the team via version controlFor shared team tools, use project scope by creating .claude/mcp.json and committing it.
MCP is the extensibility layer that transforms Claude Code from a file-editing assistant into a full development platform. Start with the official servers (GitHub, Postgres) to see immediate value, then build custom servers for your proprietary tools. With MCP, hooks from Module 4, and CLAUDE.md from Module 3, you have the complete Claude Code toolkit. Take the quiz to test what you have learned.