Model Context Protocol (MCP)
An open protocol for connecting agents to external services —databases, GitHub, task trackers— without building a separate integration for each one. It adds capabilities, and also risk.
Before you start
- Tools and permissionsTechnique
What a tool is, how an agent uses one, and how to decide what it can do without asking, what needs your approval, and what is off limits.
Published
Key idea: MCP is like a standard plug for agents: a common way to connect external tools and data. And, as with any plug, what you connect can be useful or dangerous.
The problem
You want your agent to look up GitHub issues, read a database, or create tasks in your project tracker. Without a standard, every AI application would need a separate integration for each service, and every service one for each application.
MCP defines a common language: a service exposes its capabilities once, as an MCP server, and any compatible client can use them.
How it works
There are three roles:
- Host: the application you use, such as your coding agent. It decides which servers are connected, what data is shared, and which actions need your approval.
- Client: the connection the host opens to one specific server. A host can have several, one per server.
- Server: the program that offers the capabilities. It can run on your machine or be a remote service.
A server can offer three kinds of things:
| Type | What it is | Example |
|---|---|---|
| Tools | Actions the model can request | “create an issue”, “run a SQL query” |
| Resources | Data that can be read | a document, a database schema |
| Prompts | Reusable message templates | “summarize this pull request” |
For the agent, an MCP tool works just like a built-in one: it asks to use it, the host decides, and the result goes back into the context. Everything you saw in Tools and permissions still applies.
What MCP is not
It is easy to confuse it with other pieces of the path:
- It is not
AGENTS.md: it doesn’t explain how to work in your project. - It is not a Skill: it doesn’t teach procedures; it gives access to capabilities.
- It is not a security measure: connecting something through MCP doesn’t make it safe or reliable.
Practical example
The path of a request, without depending on any particular client:
You: "Which issues are open in the repository?"
│
▼
Host (your agent) ──► MCP client ──► GitHub MCP server
│ calls the GitHub API
◄─────────────── result ◄─────────────┘
│
▼
The model receives the list of issues as context and answers.
If it then wants to close an issue, the host asks for your approval.
Each client configures servers its own way: a configuration file, a command, or a settings screen. Follow your client’s and the server’s documentation, not a generic tutorial.
To start safely:
- Pick a server from a trusted source and read what it exposes.
- Start with read-only access.
- Use credentials with the minimum access needed: a token that can only read issues, not an admin one.
- Test with data that isn’t sensitive.
Common mistakes
- Installing servers without reviewing them. The specification itself warns that a local server runs with the same privileges as the client: it can read your files and run commands. Treat it like installing any other program.
- Giving it a token with every permission. If the server only needs to read, the token should only be able to read.
- Trusting what it returns. The text of an issue or a page was written by a third party and may contain malicious instructions. It is untrusted content.
- Connecting servers “just in case”. Each server adds tools to the context, points of failure, and attack surface.
When to use it
When the agent needs data or actions from an external service that it can’t get with its built-in tools. If the information is small and stable, such as a list of conventions, a file in the repository is simpler than a server.
Next step
With local tools and external servers, your agent can now read private data, receive third-party content, and communicate externally. That combination is exactly what you need to watch: Safe agent execution explains how to contain it.
Sources
Accessed on 2026-10-05.
- Architecture, MCP specification (version 2026-07-28).
- Security Best Practices, MCP specification (version 2026-07-28).
Related content
- Safe agent executionTechnique
Why written rules are not enough to contain an agent, and which layers of the environment limit the damage even when the agent makes a mistake or someone tricks it.
Published - Skills: reusable procedures for agentsTechnique
A folder with instructions, and optionally scripts and references, that teaches the agent one specific kind of task. It is only loaded when needed.
Published