What is MCP? The Model Context Protocol, explained simply
Updated
MCP, the Model Context Protocol, is an open standard that lets AI apps use outside tools and data. A service is wrapped once as an “MCP server”, and every app that supports MCP can use it: Claude Code, Codex, OpenCode, Cursor, VS Code, ChatGPT and many more. The official docs compare it to USB-C: one plug instead of a different cable for every device.
For coding agents, that means you can give your agent new abilities, such as reading GitHub issues, driving a browser or querying a database, by adding one line of config instead of writing an integration.
What it looks like in practice#
Without MCP, you copy an issue from GitHub into the chat, the agent writes a fix, and you open the pull request yourself.
With the GitHub MCP server added, you write “fix issue 142 and open a pull request”. The agent reads the issue, makes the change and opens the pull request through the server. You approve the steps that matter.
The agent did not get smarter. It got hands.
Isn’t that just an API?#
Almost. MCP sits on top of APIs; it doesn’t replace them.
| What it is | Who writes the glue | |
|---|---|---|
| API | An interface programs call, such as GitHub’s REST API | You, for every app that needs it |
| Function calling | A model’s ability to request a tool call in a structured format | You, inside your own app |
| MCP | A standard way to package tools so any AI app can find and call them | The server author, once |
The difference that matters: with plain function calling, the tool definitions live in one app’s code. With MCP, the server publishes them and any app can load them at runtime.
How it works#
Three parts:
- Host: the app you use, such as Claude Code or Cursor.
- Client: the connection inside the host to one server.
- Server: the program that offers the tools.
A server can offer tools (actions the model can call, like create_issue), resources (data to read, like files or records) and prompts (ready-made templates). Coding agents mostly use tools.
Servers run in one of two ways:
- Local (stdio): your app starts the server as a program on your computer. It runs with your user’s permissions.
- Remote (HTTP): the server is a web service, usually with a sign-in through your browser.
How smooth that sign-in is depends on the vendor. Notion’s server supports dynamic client registration (RFC 7591), so discovery, registration and token refresh happen without any setup; the cookbook pages from an earlier Contenox build found that HubSpot, Salesforce and Microsoft Graph do not, so an OAuth app has to be created by hand in the vendor’s developer settings first and its client ID handed to the agent.
How to add an MCP server#
Every agent does the same thing, with a different command or file:
| Agent | How you add a server | Where it’s saved |
|---|---|---|
| Claude Code | claude mcp add |
This project, just for you (default); all your projects with --scope user; .mcp.json in the repo with --scope project |
| Codex CLI | codex mcp add |
~/.codex/config.toml |
| OpenCode | opencode mcp add |
Writes the project config by default. Use --global for all projects. |
| Cursor | Edit the config | .cursor/mcp.json in the project, or ~/.cursor/mcp.json |
| VS Code | Edit the config | .vscode/mcp.json, with servers as the top-level key |
| Contenox | Connectors → Add connector | The app; for every chat, one project folder, or one chat |
The examples use two real servers: GitHub, which runs remotely, and Playwright, which runs on your computer and lets the agent control a browser.
Claude Code
claude mcp add --transport http github https://api.githubcopilot.com/mcp/ \
--header "Authorization: Bearer YOUR_GITHUB_TOKEN"
claude mcp add playwright -- npx @playwright/mcp@latest
claude mcp list
For GitHub, create a personal access token in your GitHub settings first. Add --scope project to share a server with your team through a .mcp.json file in the repo.
Codex CLI
codex mcp add playwright -- npx @playwright/mcp@latest
codex mcp list
Or edit ~/.codex/config.toml:
[mcp_servers.playwright]
command = "npx"
args = ["@playwright/mcp@latest"]
OpenCode. From the project folder, add Playwright locally or GitHub as a remote MCP server.
opencode mcp add playwright -- npx -y @playwright/mcp@latest
opencode mcp add github --url https://api.githubcopilot.com/mcp/
opencode mcp list
A remote server that supports OAuth may show needs authentication. In the terminal UI, run /mcps, select the server and finish its sign-in. The CLI writes the project’s mcp.servers configuration. Add --global to make a server available across projects. OpenCode MCP setup
Cursor: create .cursor/mcp.json in the project, or ~/.cursor/mcp.json for all projects:
{
"mcpServers": {
"playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] }
}
}
VS Code: the same idea in .vscode/mcp.json, but the top-level key is servers, not mcpServers:
{
"servers": {
"github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" }
}
}
VS Code signs you in to GitHub in the browser; no token needed.
Local servers started with npx need Node.js installed.
Servers worth knowing#
- GitHub: issues, pull requests and code across your repositories. Remote at
https://api.githubcopilot.com/mcp/, or run locally with Docker. - Playwright (
@playwright/mcp): opens pages, clicks through flows and takes screenshots, so the agent can check its own UI work. - Context7 (
@upstash/context7-mcp): fetches current library documentation, so the agent stops guessing APIs from old training data. - Filesystem (
@modelcontextprotocol/server-filesystem): the reference server. Useful for apps without built-in file access; coding agents already have it.
When you don’t need MCP#
MCP is not always the best tool, and the debate about it is fair.
- If a good command-line tool exists, the agent can often just use it. Coding agents can run
gh,psqlorkubectldirectly, with nothing extra to install. - Every server’s tool descriptions use up part of the model’s context. Ten servers that rarely get used make every request longer and can make the agent pick the wrong tool. Add servers for the work at hand, and remove the rest. The same holds inside one server: wrapping APIs as tools in an earlier Contenox build showed that a 200-endpoint OpenAPI spec handed over whole fills the context with endpoints the agent never needs, gives the planner ten ways to search for a customer, and widens what a hallucinated call can hit. The remedy there was a subset spec with only the operations the task uses, two out of 200 in that example.
- MCP pays off when there is no CLI, when the service needs a browser sign-in, or when the same tools should work across several apps and teammates.
Is MCP safe?#
An MCP server is code that acts with your access, so treat it like any program you install:
- Install servers only from publishers you trust. A local server runs as you.
- Give servers the least access that works, for example a read-only token for a server that only reads. Keep the credential out of the model’s view where the host allows it: when MCP support landed in an earlier Contenox build in March 2026, parameters injected on a server’s behalf were stripped from the tool schema before the model saw it, so a credential never appeared as a field the model could fill in.
- Treat what tools return as untrusted. An issue comment or web page can contain instructions aimed at the model. This is called prompt injection.
- Approve actions, not just servers. Reading an issue is harmless; deleting a branch is not. Set rules per tool where your app allows it. See AI agent permissions.
Who owns MCP, and what changed in 2026#
Anthropic released MCP in November 2024. In December 2025 it was handed to the Agentic AI Foundation under the Linux Foundation, so no single company controls it.
The specification revision of 28 July 2026 made the protocol stateless: each request carries what the server needs to know, instead of opening a session first. If you use MCP servers, nothing changes for you. If you build them, check that your SDK supports the new revision; older tutorials show the previous style.
Contenox#
In the Contenox desktop app, MCP servers are Connectors: add one on the Connectors page for every chat or one project folder, or for a single chat from the + menu in the message box. You can switch a connector or a single tool off per chat, which keeps the tool list, and the context it costs, small. Every call still goes through your permission rules and asks first by default. Steps: add an MCP server.
Related guides#
What is an AI coding agent?What is an AI coding agent? How it works, with an exampleWhat is an AI coding agent? A program that reads your code, runs commands and edits files in a loop until the task is done. How it works, and where it goes wrong.
Agent Client Protocol (ACP): how agents run inside editors, the other protocol you will meetAgent Client Protocol (ACP): run any coding agent in your editorThe Agent Client Protocol (ACP) lets coding agents such as Claude, Codex or OpenCode run inside Zed, JetBrains IDEs and more. How it works and how to set it up.
AGENTS.md explained: give your agent project instructionsWhat is AGENTS.md? What to put in it, with an exampleWhat is AGENTS.md? A Markdown file that tells coding agents how to build and test your repo. A short example, what to include, and how Claude Code and Codex read it.
AI agent permissionsAI agent permissions: what to allow, ask and blockAI agent permissions for coding agents: a safe starting rule set, real config for Claude Code and Codex, the gaps in command rules, and when to skip prompts.
Keep secrets away from AI agentsHow to keep secrets away from AI agents (and out of git)How to keep secrets away from AI agents: block .env reads in Claude Code, OpenCode and Codex, stop keys leaking through commands, and what to do if one leaked.
GlossaryAI coding glossary: agents, MCP, RAG, KV cache and moreAI coding glossary: plain definitions of the terms you meet when building software with AI agents, from ACP and AGENTS.md to prompt caching, RAG and worktrees.
AI codingAI coding: what it is, how it works, and the tools in 2026AI coding explained: the three kinds of tools (autocomplete, agents, app builders), which fits which job, what it costs, where it goes wrong, how to start.
What is an AI harness?What is an AI harness? Agent = model + harness, explainedWhat an AI harness is, what's inside one, an example loop in 20 lines, why the same model scores 14 points apart in two harnesses, and which harnesses exist.