Home / Extending: skills, MCP, subagents, hooks, plugins
MCP: the connection protocol
MCP is the open standard that connects Claude to external tools and data around three primitives: the tools it can call, the resources it can read, the reusable prompts it can offer.
Model Context Protocol, abbreviated MCP, is an open standard that describes how an assistant like Claude Code connects to tools and data that live outside it, a database, an API, a ticketing system. An MCP server is a small programme that speaks this protocol and exposes three distinct things to Claude: tools it can call with arguments, resources it can read like a piece of content, and prompts, ready-to-use request templates that the user triggers themselves. These three primitives do not substitute for one another, and confusing a tool with a resource means missing half of what an MCP server actually offers.
Three primitives, three triggers
A tool is a function. Claude alone decides to call it when the task requires it, with arguments validated against a schema declared by the server. A resource is a piece of content exposed as data to read, a remote configuration file or the content of an internal page, with no argument or side effect. A prompt is a request template that the server offers, but that only the user triggers explicitly, never Claude on its own initiative. The figure that follows cross-references these three primitives against what triggers them and what they return.
Where the registration actually lives
An MCP server is declared in a configuration file, not in the harness's general settings. Two locations coexist: a .mcp.json file at the root of the project, shared by the git repository and therefore visible to the whole team, or the mcpServers entry in the ~/.claude.json file, at user or local scope, specific to your machine. A server declared in .mcp.json and connected to an API that requires a private key exposes that key to anyone who clones the repository, which pushes towards preferring user scope for anything carrying a personal credential. A minimal example of a declaration:
{
"mcpServers": {
"depot-tickets": {
"command": "node",
"args": ["./serveurs/tickets.js"]
}
}
}
None of this goes through a settings.json file in the strict sense, a frequent confusion since settings.json manages permissions, not connections. The next lesson details how to add a server from the command line and check its connection status.
The three primitives of MCP
| Primitive | What it is | Who triggers the call | What it returns |
|---|---|---|---|
| Tool | A function validated by an argument schema | Claude, alone, when the task requires it | A computed result or an executed action |
| Resource | Content exposed for reading, with no argument | Claude or the user, reading directly | The content as is, text or structured data |
| Prompt | A request template offered by the server | The user, never Claude on its own initiative | A request text ready to complete |
A developer opens the panel that lists the tools exposed by an MCP server connected to his project, and finds an entry named lire_ticket whose description fits in nine words and whose schema requires a numeric identifier as an argument.
Write, in one sentence, what this situation establishes, and in one sentence what it does not establish.
What this establishes: This situation establishes that this MCP server exposes at least one callable tool, named lire_ticket, whose description fits in nine words and whose schema constrains the argument to a numeric identifier.
What this does not establish: It does not establish that this server also exposes resources or prompts, nor that this nine-word description will be enough for Claude to choose this tool at the right moment rather than another.
The three most common miscalibrations
- Too broad This MCP server exposes the protocol's three primitives, tools, resources and prompts, since it is a complete MCP server.
- Too narrow This entry proves nothing, since only one primitive among the possible ones was looked at in this panel.
- Off the mark The nine-word description is enough to guarantee that Claude will choose this tool at the appropriate moment rather than another.
- An MCP tool is a function that Claude calls alone when the task justifies it, a resource is a piece of content it reads without an argument, and a prompt is a template that only the user triggers.
- An MCP server registers in a .mcp.json file shared by the repository or in the mcpServers entry of ~/.claude.json, never in settings.json.
- Project scope, carried by .mcp.json, shares the configuration with the whole team via git, which exposes a private key written in plain text to anyone who clones the repository.
- Confusing the three primitives means missing half of what an MCP server actually offers, since each responds to a different trigger.
On your machine, open the ~/.claude.json file if it already exists, or create an empty .mcp.json file in a test folder, and identify at which level, project or user, you would want to register a future MCP server depending on whether it carries a private key or not.
Every datable claim in this lesson links here to the public text behind it. A source that does not open proves nothing.
- Claude Code, Model Context Protocol documentation consultée le 2026-09-02