AI Engineering Curriculum
Phase 1: Claude Code Mastery·4 min read

Module 1.5

MCP Servers

What MCP Is

Model Context Protocol is an open standard created by Anthropic that lets Claude connect to external tools, data sources, and APIs. Think of it as a universal plugin system for AI.

Without MCP, Claude only works with what's in its context window. With MCP, it can talk to GitHub, query your database, search Slack, control a browser, call your internal APIs, and hundreds more.

The mental model: MCP servers expose tools Claude can call, just like its built-in tools (Read, Write, Bash). The difference is these tools come from the outside world.


What You Can Do With MCP

"Add the feature from JIRA issue ENG-4521 and create a PR on GitHub."
"Check Sentry for errors introduced by the last deployment."
"Find users who used this feature in our PostgreSQL database."
"Update the email template based on the new Figma designs in Slack."
"Create Gmail drafts inviting those users to a feedback session."

All in one session, driven by natural language.


Three Server Types

TypeHow it runsUse when
HTTPRemote serverCloud services - recommended
SSERemote server, olderLegacy - use HTTP instead
stdioLocal processLocal tools, custom scripts

Installing MCP Servers

HTTP (cloud services):

Bash
claude mcp add --transport http <name> <url> # Examples claude mcp add --transport http github https://api.githubcopilot.com/mcp/ claude mcp add --transport http sentry https://mcp.sentry.dev/mcp # With auth header claude mcp add --transport http my-api https://api.example.com/mcp \ --header "Authorization: Bearer your-token"

stdio (local tools):

Bash
claude mcp add --transport stdio <name> -- <command> [args...] # Example: PostgreSQL database claude mcp add --transport stdio db -- npx -y @bytebase/dbhub \ --dsn "postgresql://user:pass@localhost:5432/mydb" # Example: with env vars claude mcp add --transport stdio airtable \ --env AIRTABLE_API_KEY=your-key \ -- npx -y airtable-mcp-server

Windows: Wrap npx with cmd /c: -- cmd /c npx -y @some/package


The Three Scopes

ScopeStored inVisible to
local (default)~/.claude.jsonJust you, current project
project.mcp.json in project rootYour whole team (commit this file)
user~/.claude.jsonJust you, all projects
Bash
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --scope project claude mcp add --transport http notion https://mcp.notion.com/mcp --scope user

When same server name exists at multiple scopes: local > project > user.


Managing Servers

Bash
claude mcp list # list all servers claude mcp get github # details on a specific server claude mcp remove github # remove a server /mcp # check status inside Claude Code

Authentication

Bash
# 1. Add the server claude mcp add --transport http sentry https://mcp.sentry.dev/mcp # 2. Inside Claude Code: /mcp # Select server → Authenticate → follow browser OAuth flow # Tokens stored securely and auto-refreshed

ServerWhat it adds
GitHubIssues, PRs, repos, code review
SentryError tracking, stack traces
NotionRead/write pages and databases
SlackRead/send messages
PostgreSQLQuery your database
FilesystemExtended file system access
AirtableRead/write Airtable bases

Find hundreds more: github.com/modelcontextprotocol/servers


MCP Resources - The @ Mention System

MCP servers expose resources you can reference with @ like files:

> Analyze @github:issue://456 and suggest a fix
> Compare @postgres:schema://users with @docs:file://database/user-model

Type @ in Claude Code to see all available resources in autocomplete.


MCP Prompts as Slash Commands

Servers can expose prompts as / commands:

/mcp__github__list_prs
/mcp__github__pr_review 456
/mcp__jira__create_issue "Bug in login flow" high

Format: /mcp__<servername>__<promptname> [arguments]


Using Claude Code as an MCP Server

Run Claude Code itself as an MCP server to expose its tools to other apps:

Bash
claude mcp serve

Add to Claude Desktop config:

JSON
{ "mcpServers": { "claude-code": { "type": "stdio", "command": "claude", "args": ["mcp", "serve"] } } }

When you have many servers, their tool definitions consume context. Tool Search loads tools on-demand instead:

Bash
ENABLE_TOOL_SEARCH=auto # default - activates at 10% of context ENABLE_TOOL_SEARCH=auto:5 # activate at 5% threshold ENABLE_TOOL_SEARCH=true # always on ENABLE_TOOL_SEARCH=false # always off

Environment Variables in .mcp.json

Share configs with your team without exposing credentials:

JSON
{ "mcpServers": { "api-server": { "type": "http", "url": "${API_BASE_URL:-https://api.example.com}/mcp", "headers": { "Authorization": "Bearer ${API_KEY}" } } } }

${VAR} - required | ${VAR:-default} - with fallback


Security Notes

  • Only install MCP servers you trust - they run with your permissions
  • stdio servers can access your file system
  • Servers fetching untrusted web content carry prompt injection risk
  • For teams: managed-mcp.json lets admins lock down which servers employees can use

Sources