

An AI agent is software that uses a language model to choose its own steps and tool calls until it reaches a goal. The Model Context Protocol (MCP) is an open standard for connecting AI applications to external tools and data. The agent decides what to do, and MCP is one way it reaches the systems it needs.
People often compare the two as if you had to pick one. You don't. An agent can call tools without MCP, and an MCP server can serve a chat assistant that isn't an agent at all. Plenty of production systems use both.
At Exa, we build on both sides. Agents call our web search API as a tool, Exa Agent is a research agent in its own right, and Exa MCP is a hosted MCP server that puts both inside any MCP client.
This guide explains how agents and MCP differ, how each one works, when you need one or both, and what can go wrong when you combine them.
| AI agent | MCP | |
|---|---|---|
| What it is | A program that pursues a goal with a language model, tools and a loop | An open protocol that connects AI applications to tools and data |
| Role | Decides the next step and carries it out | Lists the tools a server offers and carries calls and results |
| Makes decisions | Yes, within the permissions it holds | No |
| Where it runs | Inside an AI application or a backend service | Between a client in the AI application and a separate server |
| Who builds it | The team building the application | The provider of the tool or data, once per service |
| Example | A coding agent that fixes a failing test | Exa MCP, which gives Claude, ChatGPT or Cursor a web search tool |
An AI agent is a program that chooses its own steps toward a goal. A developer sets the goal, the tools and the limits. From there the model plans a step, calls a tool, reads the result and picks the next step, over and over, until it finishes or runs into a limit. Our guide to what an AI agent is walks through this loop in detail.
Under the hood, an agent is a language model that picks each action, plus tools that let it read and change things outside the model, such as a web search API, a database or a code sandbox. It also keeps memory, meaning the context of the current task and anything it saved from earlier sessions.
The line between an agent and a workflow is who decides the steps. A workflow runs steps a developer fixed in advance. An agent chooses them at run time. If you can write the steps down, write them down, because a workflow costs less and is far easier to debug. Save agents for tasks nobody can script ahead of time. Most real systems land somewhere in between, and the six agentic workflow patterns show where.
Take a research agent asked which open-source vector databases added hybrid search this year. It might search for release notes and read the changelogs it finds. Then it notices one project calls the feature something else, searches again under that name, and returns a table with a source for every row. No one wrote that second search in advance. The agent decided it needed one.
MCP is an open protocol that standardizes how an AI application finds and calls external tools. Anthropic released it in November 2024 and donated it to the Agentic AI Foundation, a fund under the Linux Foundation, in December 2025. The MCP specification is public.
Without MCP, every AI application needs its own integration for every service. With MCP, a service publishes one server and every application that supports MCP can use it.
MCP has three roles. The host is the AI application a person uses, such as Claude, ChatGPT, Cursor or a custom agent. Inside the host, a client keeps one connection open to one server. The server is a program that exposes a service's capabilities.
Servers can offer tools the model calls, resources such as files or records that the application reads, and reusable prompt templates. In practice, tools are what most people mean when they talk about MCP. A server can run on the same machine as the host and talk over standard input and output, or run remotely and talk over HTTP.
When a host connects, the client asks the server which tools it offers. Each tool comes with a name, a description and an input schema. The model reads those descriptions and decides when to call each tool. The protocol never makes that choice.
Exa MCP is one such server. It runs at https://mcp.exa.ai/mcp and offers tools for web search (web_search_exa), reading pages (web_fetch_exa) and research runs (agent_run).
Both let an agent use an outside service. The difference is who writes the integration.
With a direct API call, you write the tool definition, the request code and the error handling yourself, using your model provider's tool calling. That's more work, but you control every parameter, retry and cost. It's the right choice for a product you ship to your own users.
With MCP, the service provider writes the integration once and every MCP client can use it. That fits assistants and coding tools, where the person using the tool picks which services to connect.
Under the hood, many MCP servers just call a REST API. Exa MCP calls the same Exa API you can call directly. Here is one search as a direct call with the Python SDK.
from exa_py import Exa
exa = Exa() # reads EXA_API_KEY from the environment
result = exa.search(
"open-source vector databases that added hybrid search in 2026",
type="auto",
num_results=5,
contents={"highlights": True},
)
for r in result.results:
print(r.title, r.url)To give an agent in Cursor the same search, add the server to ~/.cursor/mcp.json. From then on the model writes the query and calls web_search_exa on its own.
{
"mcpServers": {
"exa": {
"url": "https://mcp.exa.ai/mcp"
}
}
}Start with the task, not the technology. If you can list every step in advance, you need neither.
| Situation | Best fit |
|---|---|
| An open-ended goal whose steps you can't predict | An agent |
| A routine task with fixed steps, such as summarizing the same pages every morning | A workflow with direct API calls |
| You want any AI application to be able to use your service | Build an MCP server |
| You want your assistant to reach your tools without writing integrations | Connect MCP servers |
| An open-ended task that spans several outside systems | An agent that uses MCP servers |
Agents earn their cost when each step depends on what the last one found. Research, debugging and building a list of companies that match several criteria all work that way. A morning report that fetches the same ten pages does not.
Building an MCP server makes sense once people want your service inside Claude, ChatGPT and Cursor. One server covers all of them, where plugins would mean one build per client.
Say a developer asks a coding agent in Cursor to upgrade a project from Pydantic v1 to v2, with Exa MCP connected.
web_search_exa with a query about Pydantic v2 breaking changes and gets back relevant passages with their URLs.web_fetch_exa with the guide's URL.@validator in the codebase, rewrites each one and runs the tests.Every decision in that run belongs to the agent. MCP only carries the calls to Exa and brings the results back.
An agent can also hand work to another agent through MCP. With agent_run, the coding agent can pass a whole research task to Exa Agent, for example checking the v2 status of the project's ten largest dependencies. Exa Agent runs its own searches, checks what it finds and returns one sourced result. The coding agent's context then holds the answer, not every page that was read to get it.
Every system you connect is one more thing an agent can break or be tricked into misusing. These risks come up most often.
| Risk | What happens | How to reduce it |
|---|---|---|
| Prompt injection | A web page, email or file the agent reads contains instructions, and the agent follows them | Treat tool output as untrusted data, and require human approval for actions that are hard to reverse |
| Tool poisoning | A server's tool description hides instructions that the model reads and the person does not see. A server can also change its descriptions after you approve it | Connect only servers you trust, and review tool descriptions when they change |
| Excessive permissions | The agent holds more access than the task needs, so a mistake or an injection does more damage | Scope each server's credentials to the task, and prefer read-only access |
| Lookalike servers | Someone publishes a copy of a popular server that contains malicious code | Install servers from the provider's documentation or an official marketplace listing |
Prompt injection is the one to plan for first. Any agent that reads the open web will eventually read a page written to manipulate it.
You can use Exa at whichever layer fits your task.
If you're building a workflow or your own agent, call the Exa Search API directly. It returns ranked web results with page content or the passages most relevant to the query. auto search costs $7 per 1,000 requests and lite costs $4, as listed on our pricing page.
If you'd rather hand off the whole research task, use the Exa Agent API. You send a query and an optional output schema. Exa Agent plans the searches, reads the sources, checks each result against your criteria and returns grounded JSON. Fixed effort levels cost from $0.012 to $1.00 per request.
If you work inside Claude, ChatGPT, Codex, Cursor or another MCP client, connect Exa MCP. Search and page reading work without an API key at a free rate limit. agent_run needs sign-in or an API key.
To compare Exa MCP with other options, see our roundup of web search MCP servers.
No. An AI agent is a program that decides how to reach a goal. MCP is a protocol that connects AI applications, including agents, to tools and data. An agent often uses MCP to reach the systems a task needs.
MCP is a protocol, not one specific API. A traditional API integration requires a developer to write code for each service ahead of time. With MCP, an AI application asks a server which tools it offers and the model decides which to call. Many MCP servers call a REST API underneath.
No. Most agent frameworks and model APIs let you define tools in code and call any API directly. MCP helps when you want to reuse servers other people maintain, or when the person using the agent picks which services to connect.
MCP connects an AI application to outside tools and data. Agent skills are folders of instructions, scripts and resources that teach an agent how to do a specific task well, such as which search settings to use. They work well together. Exa publishes agent skills that pair with Exa MCP.
MCP connects an agent to tools and data. A2A (Agent2Agent) is an open protocol for agents to discover and message other agents, including agents built on different frameworks. A system can use both, with MCP for tools and A2A for handing work to other agents.
Yes. An MCP tool can start an agent behind the server and return its result. Exa MCP's agent_run tool starts an Exa Agent run, which does its own multi-step research and returns findings, sources and, when you provide a schema, structured JSON.

October 1, 2026

October 19, 2026

November 24, 2026

October 19, 2026

October 6, 2026

October 6, 2026