What are AI agents and MCP?
An agent is a language model that uses tools in a loop; MCP is a standard way to plug tools in. How both work, where the risks are, and what to check first.
3 min readPart 17 of 21
On this page
A language model only produces text. An agent is what you get when a program reads that text, carries out the actions in it, and gives the results back, over and over. MCP is a standard for connecting the tools. The two are often mentioned together, but you can have either without the other.
How a model uses a tool
The app describes the tools in the text the model reads: a name, what it does, what input it needs. If one would help, the model writes a structured request, such as "call get_weather with city = Oslo". The program runs it and adds the result to the conversation, and the model continues from there.
- 1DecideThe model writes what it wants to do
- 2ActThe app runs the tool
- 3ObserveThe result goes back in as text
- 4ContinueUntil it’s done or a limit is reached
The model never runs anything itself. It asks; the program around it acts.
So what an agent can do is decided by the program around it, not by the model. A model with no tool for sending email can't send one, whatever it says. If it claims to have sent one anyway, that's a hallucination.
Agent or workflow
The word is used for almost anything. Anthropic's guide for developers draws a useful line: in a workflow, models and tools follow paths written in code beforehand; in an agent, the model directs its own process and decides which tools to use.
One answer
Question in, answer out
Cheapest and most predictable
Workflow
Steps fixed in code
The model fills in each one
Agent
The model chooses the steps
Flexible, slower, harder to predict
Mistakes add up over steps. If each step succeeded 95% of the time, independently, ten steps in a row would all succeed about 60% of the time (0.95¹⁰). Real agents can notice and repair errors, so this isn't a prediction, but it shows why checkpoints matter in long tasks.
What MCP is
Before a standard existed, connecting M apps to N tools took a separate integration for each pair. Anthropic published the Model Context Protocol as an open standard on 25 November 2024. Its documentation compares it to a USB-C port for AI applications. Others adopted it; the documentation now gives both Claude and ChatGPT as examples of applications that use it.
There are three roles:
- Host: the AI application, such as Claude Desktop or Claude Code.
- Client: the part of the host that holds a connection to one server.
- Server: a program offering capabilities, such as access to a database, a calendar or a code repository.
A server can offer tools (actions the model can ask for), resources (data it can read) and prompts (ready-made templates). Messages are exchanged in a common format, so one server works with any host that supports MCP.
Local or remote
Where the connection comes from matters. When you add a custom connector in Claude, Anthropic's help page says it connects to the remote server from Anthropic's cloud, not from your device, and that this applies to every client, including the desktop app. So a server inside your company network can't be reached that way, even if your own computer can reach it. Which IP does AI use? covers what the other side sees.
The risks
An agent combines three things: access to your data, exposure to text written by others, and the ability to act. Any instruction hidden in that text may be followed. This is prompt injection, and it's the main security problem with agents.
Before connecting something:
- Who makes it? A local server is a program with your permissions. Install it as carefully as any other.
- What can it do? Prefer read-only access. Grant what the task needs, not everything on offer.
- What requires your approval? Keep confirmation on for sending, paying, deleting and publishing.
- What else is connected? A tool that reads strangers' messages and one that sends email are each reasonable. Together they're a way out for your data.
- Can you undo it? Work on copies, or in something with version history.
And read the confirmation before you approve it. A dialog you always click through protects nothing.