Guide · Model Context Protocol

MCP vs RAG: a way to choose context, and a way to reach the systems that hold it.

RAG is a technique: find the right passages and put them in the prompt. MCP is a protocol: let a model discover and call tools. Many systems use RAG through MCP.

Retrieval-augmented generation answers questions from documents a model never saw in training. The Model Context Protocol connects an AI application to live tools and data. This guide shows how each works mechanically, where they overlap, how they fail, and how to choose for each question your users ask.

Updated · 9 sources

a technique

RAG

Index documents ahead of time; at question time, retrieve the most relevant passages and add them to the prompt.

  • Reads: answers from text
  • Prepared in advance: chunk, embed, index
  • One pipeline per corpus
  • Fresh as the last re-index
a protocol

MCP

An AI host connects to servers, lists their tools, resources and prompts, and lets the model call a tool when it helps.

  • Reads and acts: queries, updates, actions
  • Live: each call hits the system now
  • One standard for many systems
  • Each call can carry the person’s sign-in
A pattern for building promptsWhat it isA wire protocol between host and server
The application, on every questionWho decides to use itThe model, when a tool looks useful
Large bodies of unstructured textBest atRecords, system state and actions
As of the last indexData freshnessAs of the call
Whatever the index enforcesPermissionsThe server’s check on each call
The right passage is never retrievedTypical failureThe wrong tool, or a tool given too much

What is the difference between MCP and RAG?

In MCP vs RAG, RAG (retrieval-augmented generation) is a technique: search an index of documents and add the best passages to the model’s prompt. MCP (the Model Context Protocol) is a standard for connecting AI applications to tools and data, which the model calls at run time. They work together: a common design exposes a retrieval search as one MCP tool, beside tools that read live records or take actions.

Retrieval-augmented generation

How RAG works: prepare an index, then retrieve at question time.

RAG was introduced in 2020 to pair a model’s trained knowledge with a searchable index of text. Most of the work happens before anyone asks a question.

  1. Chunk

    Split documents into passages small enough to retrieve precisely.

    ahead of time
  2. Embed

    Turn each passage into a vector that captures its meaning.

    ahead of time
  3. Index

    Store vectors, and often keywords, with each passage’s source and permissions.

    ahead of time
  4. Retrieve

    Embed the question and fetch the closest passages, then rerank them.

    per question
  5. Generate

    Add the passages to the prompt; the model answers and cites them.

    per question

Three generations of RAG. A widely cited survey groups designs as naive RAG (retrieve, then read), advanced RAG (better chunking, query rewriting, reranking) and modular RAG (retrieval as interchangeable parts, often called by an agent when it decides it needs to look something up).

Model Context Protocol

How MCP works: three kinds of context, each with a different controller.

An MCP server offers three primitives, and the current specification (revision 2026-07-28) assigns each a different decision-maker. That split is the clearest way to see where RAG fits.

An MCP serverwhat an AI host can list, read and call
Tools · model-controlledfunctions the model calls when it judges them useful — search, query, create, update
Resources · application-controlledfiles, records and data the host chooses to attach as context
Prompts · user-controlledtemplates a person picks, such as a slash command
Discoverytools/list returns names, descriptions and input schemas at run time
A person in the loopthe specification says someone should be able to deny a tool call
Sign-inremote servers use OAuth, so calls can carry the person’s own permission

Classic RAG resembles the resource pattern: the application decides what context to attach. Agentic RAG resembles the tool pattern: the model decides when to search, what to search for, and whether to search again.

The common design

MCP vs RAG in one system: retrieval served as an MCP tool.

A common production design uses both. The retrieval pipeline sits behind an MCP server as a search tool, next to tools that read live records and take actions — and the model picks among them.

One question, end to end
01
The person asks“What does our travel policy say about rail upgrades, and what did I spend last month?”
02
AI host and modelsplits the question and picks two tools
host
03
MCP serverruns a policy search and an expense query as the signed-in person
04
Retrieval pipelinehybrid search and reranking over the policy index
RAG
05
System of recordlive expense rows from the finance system
API
A retrieval tool, as the model sees it
{
  "name": "search_policies",
  "description": "Search company
    policies. Returns passages
    with title and section.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "query": { "type": "string" },
      "top_k": { "type": "integer" }
    },
    "required": ["query"]
  }
}

Why this split works. Policies change monthly and live in long documents — retrieval suits them. Expenses change daily and live in rows — a live tool call suits them. The model never needs to know which technique sits behind each tool.

Decision guide

MCP vs RAG: which to use for each kind of question.

Decide per question rather than per project. Two properties settle most cases: where the answer lives, and how fast it changes.

Answer is a record or an action
Reference data in a systemProduct catalogue, org chart: a read tool over the system, or a scheduled index of it.MCP tool or RAG
Live state and actionsOrder status, open tickets, approvals: only a live call is correct.MCP tool
Answer is in documents
Policies, contracts, manualsLong text that changes rarely: the classic case for retrieval.RAG
Fast-moving textTicket threads, chat history: search the live source through a tool, or re-index often.RAG via MCP
Changes slowlyChanges by the hour

What does the model need to finish the task?

Knowledge in documentsRAG — index the corpus and retrieve passages, cited.
The current state of a systemAn MCP tool that queries the system as the person asking.
To change somethingAn MCP tool with a confirmation before it runs.
The right tool among hundredsRetrieval over tool descriptions, so only relevant tools enter the prompt.
Both spend the context window

Both RAG and MCP compete for the same context window.

Retrieved passages and tool definitions both take up the model’s context. A 2025 preprint on large tool sets suggests retrieval helps MCP as much as MCP helps retrieval; an engineering write-up from Anthropic points the same way.

43% vs 14%
tool-selection accuracy in the authors’ benchmark when tools were retrieved by relevance first, against offering them all (43.13% vs 13.62%)
Gan & Sun, RAG-MCP preprint, 2025
>50%
fewer prompt tokens when only retrieved tool descriptions were sent to the model, in the same benchmark
Gan & Sun, RAG-MCP preprint, 2025
98.7%
fewer tokens in an example workflow Anthropic describes (150,000 to 2,000), when the agent read only the tool definitions it needed, on demand through code
Anthropic Engineering, November 2025
Security

Where permissions live in RAG, and where they live in MCP.

A shared index holds one copy of everyone’s documents, so permissions must be copied into it. An MCP call can carry the asker’s own sign-in, so the system of record can decide. Each needs its own checks.

Questions to ask of each design
  • RAG · permission-aware indexDoes retrieval filter by what the asker may open? OWASP lists access leaks in vector stores as a top risk.
  • RAG · tenant separationCan one customer’s or team’s passages surface in another’s answer?
  • RAG · poisoned contentCan someone plant text in the corpus that steers the model?
  • MCP · per-person sign-inDo calls carry the person’s own token, or a shared key with everyone’s access?
  • MCP · untrusted descriptionsTool descriptions and annotations from an unknown server are untrusted input.
  • MCP · consent before changesCan a person see and deny a call that changes something before it runs?
On Botminds

How Botminds serves search and actions over MCP.

Botminds publishes the whole platform as an MCP server. An assistant a person already uses connects, signs in as that person, and reaches searching, reading and building through one catalogue of tools.

  1. Connect

    Paste the server link into Claude, ChatGPT, Cursor or VS Code.

  2. Sign in

    OAuth with a proof key; the consent card names the app.

    per person
  3. Discover

    The tool list is shaped to the person’s role.

    700+ tools
  4. Search and act

    Every call runs as that person, and the platform checks their role each time.

  5. Confirm

    Tools that delete or replace something ask first.

    consent

Both directions

  • InboundOutside assistants use Botminds tools — search, read, run and build — within the person’s role.
  • OutboundBotminds agents call other MCP servers, narrowed to an allow-list of tools.
  • CredentialsOutside servers’ keys stay server-side, shown only as “saved”.

Go further. The design: MCP for the enterprise. How retrieval works on the platform: agentic RAG. Hands-on: the Academy lessons on MCP servers and search indexes.

Questions people ask

MCP vs RAG: common questions.

The technology behind itMCPThe Model Context Protocol, both ways
What is the difference between MCP and RAG?

In MCP vs RAG, RAG is a technique that retrieves passages from an index and adds them to the prompt; MCP is a protocol that lets an AI application discover and call tools and read data from servers. A retrieval search is often offered as one MCP tool.

Does MCP replace RAG?

No. MCP standardises how a model reaches tools and data; it does not say how to find the right passage in a million documents. That is still retrieval. MCP changes how retrieval is delivered: as a tool the model can call when it needs it.

Can I use RAG through MCP?

Yes, and it is common. Wrap your retrieval pipeline as an MCP tool, such as a search tool that takes a query and returns cited passages. Any MCP-capable assistant can then use your index.

Which is better, MCP or RAG?

They solve different problems. Use RAG when the answer sits in large bodies of text. Use MCP tools when the answer is live data or an action. Most assistants that do real work need both.

How do MCP, RAG and AI agents fit together?

The agent is the model in a loop that decides what to do next. MCP is how it reaches tools. RAG is one of those tools — the one that searches documents. Agentic RAG is an agent deciding when and how to search.

Do I need a vector database to use MCP?

Not for MCP itself. A vector index is part of a RAG pipeline. You need one only if one of your MCP tools searches documents by meaning.

How do permissions differ between RAG and MCP?

A RAG index must copy each document’s permissions and filter by them at retrieval. An MCP call can carry the person’s own OAuth token, so the system behind the server checks permissions on each call.

What is RAG-MCP?

A method from a May 2025 arXiv preprint (not peer reviewed) that uses retrieval to pick which MCP tools to show the model. In the authors’ own benchmark, offering only relevant tools cut prompt tokens by over half and raised tool-selection accuracy from 13.62% to 43.13%.

See it on
your own work.

Bring one process and its documents. We’ll show you the agents, the controls and the record, running on your data.