MCP (Model Context Protocol) is an open standard, created by Anthropic and now adopted across the industry, for connecting an AI application to external tools and data.
Think of it as a universal plug. Instead of every AI app inventing its own way to talk to Google Drive or your database, someone writes an "MCP server" once and it works in Claude Code, Claude Desktop, Cursor and any other compatible app.
- The AI application contains an MCP client.
- The MCP server is a small program offering tools (actions), resources (data to read) and prompts (templates).
- Your service is the database, API or files behind it.
Ask "what appointments do I have tomorrow?" and the AI sees a appointments_for_day tool, calls it, gets the data and answers with it. (The screenshots below come from a Spanish-language practice project.)
Your first MCP in Claude Code
Three commands do everything: claude mcp add, claude mcp list and claude mcp remove. Inside a session, /mcp shows connected servers and their tools.
python -m venv .venv
.venv\Scripts\python.exe -m pip install mcp-server-fetch
claude mcp add fetch -- .venv\Scripts\python.exe -m mcp_server_fetch
claude mcp list
The first time a tool is used, Claude Code asks for permission.

Scopes
| Scope | Option | Where it applies |
|---|---|---|
| Local (default) | no --scope | Only you, only this folder |
| Project | --scope project | Saved in .mcp.json in the folder, shared through Git |
| User | --scope user | You, across all your projects |
When a project ships a .mcp.json, Claude Code asks before enabling it, defaulting to no, so a downloaded project cannot sneak a server in.
Claude Desktop, Cursor and VS Code
| App | File | Key |
|---|---|---|
| Claude Code | .mcp.json or ~/.claude.json | mcpServers |
| Claude Desktop | Windows: %APPDATA%\Claude\claude_desktop_config.json · Mac: ~/Library/Application Support/Claude/claude_desktop_config.json | mcpServers |
| Cursor | .cursor/mcp.json or ~/.cursor/mcp.json | mcpServers |
| VS Code | .vscode/mcp.json | servers |
{
"mcpServers": {
"fetch": {
"command": "C:/Users/you/mcp-practice/.venv/Scripts/python.exe",
"args": ["-m", "mcp_server_fetch"]
}
}
}MCP servers worth using
- Playwright: a browser the AI controls, for testing sites, screenshots and forms.
- GitHub: issues, pull requests and repos.
- Databases (Postgres, SQLite...): query without copy-pasting.
- Notion, Linear, Google Drive: remote servers that need you to log in.
claude mcp add --scope project playwright -- npx -y @playwright/mcp@latestNot every server in those "awesome MCP" lists works: some are archived or broken with newer versions. Test before you trust.
Build your own MCP server in Python
With the official Python SDK, a server with two read-only tools is about 30 lines:
import csv
from pathlib import Path
from mcp.server.mcpserver import MCPServer
DATA = Path(__file__).parent / "data"
mcp = MCPServer("garage")
def read(name: str) -> list[dict]:
with open(DATA / name, encoding="utf-8", newline="") as f:
return list(csv.DictReader(f))
@mcp.tool()
def appointments_for_day(date: str) -> list[dict]:
"""Garage appointments on a date (YYYY-MM-DD), sorted by time."""
rows = [r for r in read("appointments.csv") if r["date"] == date]
return sorted(rows, key=lambda r: r["time"])
if __name__ == "__main__":
mcp.run()The docstring is what the AI reads to decide when to use the tool, so write it clearly. In version 2 of the SDK the class is MCPServer; tutorials using FastMCP are from the previous version.
Test it with the official MCP Inspector before connecting it:
npx @modelcontextprotocol/inspector .venv\Scripts\python.exe garage.py
Security
- Read by default, write with confirmation. Tools that create, send or delete should ask first.
- Watch out for injected instructions. Data can contain text like "IGNORE PREVIOUS INSTRUCTIONS". In my test Claude spotted it, but the real defence is that tools cannot do anything serious without your confirmation.
- Keys in environment variables, never hard-coded in
.mcp.json.

If you want an agent connected to your company's tools without dealing with all this, see the services. And for the agent itself, the Claude Code guide.
Frequently asked questions
What is MCP in AI?
An open standard for connecting AI applications to external tools and data. An MCP server exposes tools the AI can call, and it works in any compatible app.
Which apps support MCP?
Claude Code, Claude Desktop, Cursor, VS Code with Copilot, Codex and many more. Each has its own config file, but the server is the same.
Is it hard to build an MCP server?
No. With the official Python SDK a small server is about 30 lines. The hard part is designing it safely.

