Claude Code can read your files, write code, and run commands. But there is a limit: by default, it sees nothing outside your local file system. MCP changes that. It is the mechanism that lets Claude Code talk to a database, GitHub, Notion, or any other external tool, all while staying in your terminal.
What is MCP?
MCP (Model Context Protocol) is a standardized open-source protocol, created by Anthropic and adopted by the community. Its role: define a common language between an AI agent (the client) and external tools (the servers).
Think of it as a universal connector. Before MCP, every AI-tool integration was a custom proprietary cable. With MCP, it is a single port that any tool can implement.
Concretely, an MCP server exposes three types of primitives:
- Tools: functions that Claude can call (SQL query, file read, API call).
- Resources: contextual data that Claude can read (database schema, remote file content).
- Prompts: reusable templates for structuring interactions.
Claude Code acts as an MCP client. It discovers the available tools, exposes them to the model, and relays calls to the relevant servers.
Adding an MCP server with claude mcp add
Claude Code provides a dedicated command for connecting an MCP server. There are two main modes: remote servers (HTTP) and local servers (stdio).
Remote server (HTTP)
Most mainstream services now offer a hosted MCP endpoint. For example, for Notion:
Or for GitHub (with an authentication token):
Local server (stdio)
Some servers run locally on your machine, via a process launched by Claude Code itself. This is often the case for database servers or command-line tools:
The part after -- is the exact command Claude Code will run to start the server.
Checking connected servers with /mcp
Once a server is added, you can check its status directly in a Claude Code session with the /mcp slash command.
This command opens a panel that lists all your configured MCP servers, their status (connected, error, waiting for auth), and lets you manage permissions per project.
You can also list your servers from the terminal, outside of a session:
Storing config in .mcp.json
The claude mcp add command saves the server for you alone, locally. To share the configuration with your team or version it in the project, create an .mcp.json file at the root of the repository.
{
"mcpServers": {
"notion": {
"type": "http",
"url": "https://mcp.notion.com/mcp"
},
"my-db": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-package-name"],
"env": {
"MY_API_KEY": "${MY_API_KEY}"
}
}
}
}Environment variables inside ${} are resolved from your shell at launch time. Secrets are therefore never written in plain text in the versioned file.
A few MCP servers worth knowing
The MCP spec is maintained by Anthropic, but the ecosystem is open. Here are three servers that illustrate the diversity of use cases well:
Filesystem - Secure access to the file system, with fine-grained control over accessible directories. Useful for giving Claude Code an explicit scope over your directory tree.
GitHub - Read PRs, create issues, post reviews without leaving the terminal. Claude can browse history and comment directly.
Supabase - Connect Claude Code to your PostgreSQL database and Edge Functions. This is the example developed in the next step of this bridge, on the Supabase side.
Sources
Related
Concepts-ponts
Le protocole standard d'Anthropic pour brancher un agent sur des sources de données externes.
