RAG vs MCP: what each one does, and the MCP servers worth using

They aren't competitors. RAG helps a model find the right information, and MCP connects it to other systems. Here's how to choose, plus the servers we'd start with.

"Should we use RAG or MCP?" is a common question, and it hides a mix-up. RAG is a technique for finding information. MCP is a standard for connecting AI applications to other systems. Asking which one to use is a bit like asking whether you need a search engine or a USB port.

The short answer:

  • Use RAG when the answer is somewhere in a large body of text.
  • Use MCP when the model needs live data or has to take an action in another system.
  • Use both when you want your search to work across AI tools. An MCP server can simply offer your RAG search as a tool.

What RAG does

RAG stands for retrieval-augmented generation. Before the model answers, your code finds the most relevant passages from your documents and adds them to the prompt. The model then answers from those passages, ideally with citations.

It suits content that is large, mostly text, and too big to send in full: handbooks, contracts, support articles, research. The hard part is rarely the model. It's extracting documents cleanly, finding the right passage, and proving that it works. Our RAG tutorial walks through all of that.

What MCP does

The Model Context Protocol is an open standard for connecting AI applications to external systems. A server exposes tools, data and prompts. Any compatible client, such as Claude, ChatGPT, VS Code or Cursor, can then use them.

Before a standard like this, every app needed its own integration for every service. With MCP, you build one server and it works across clients. It suits work that needs current data or real actions: reading a live error, checking an open ticket, creating an invoice.

Side by side

RAGMCP
What it isA retrieval techniqueA connection standard
Main jobFind the right textReach other systems
Data freshnessAs fresh as your last indexLive, at call time
Can it take actions?NoYes, if a tool allows it
Who decides to use it?Usually your code, on every questionUsually the model, when it needs a tool
Main riskWrong or stale passagesA tool doing too much
What you buildA search pipeline and an indexA server, or connecting an existing one

How to choose

Start from the question your users actually ask.

  • "What does our refund policy say?" That's RAG. The answer sits in a document, and you want a citation.
  • "Is order 4821 refunded yet?" That's MCP or a direct API call. An index would be out of date, and only the live system knows.
  • "Can I refund order 4821 under our policy? If so, do it." That needs both, and a person's approval before the refund goes through.

There's also a third option people skip: neither. If you control the application and it only talks to one API, a plain function call is simpler than running a server. MCP pays off when several clients need the same connection, or when you want people to use your product from their own AI tools.

Using them together

The two fit together neatly. Wrap your search in an MCP tool and any client can use it, so your team's knowledge isn't locked inside one app. The server stays small:

@mcp.tool(annotations=ToolAnnotations(read_only_hint=True))
def search_handbook(query: str) -> str:
    """Search the handbook and return passages with file and page."""
    docs = search(query)
    return format_sources(docs) if docs else "No results."

All the quality still comes from the search behind that function. MCP is how you reach it, so a weak pipeline stays weak when you put a server in front of it. If the documents are private, the server also needs real authentication. We cover that in Building an MCP server with OAuth for Claude.

MCP servers worth using

These come from the vendors themselves. We checked each address against the vendor's documentation in October 2026, but they do change, so check the linked docs too. In Claude Code, most of the remote ones are added like this, and /mcp then handles sign-in:

claude mcp add --transport http linear https://mcp.linear.app/mcp

GitHub

Work with repositories, issues, pull requests and Actions. Toolsets let you enable only what you need, and its local version has a --read-only flag.

https://api.githubcopilot.com/mcp/

Context7

Gives coding agents current, version-specific library documentation, which cuts down on invented APIs. An API key is optional but raises your rate limits. This is often the first one we'd add.

https://mcp.context7.com/mcp

Playwright

Controls a real browser using the page's accessibility tree, so no vision model is needed. It's useful for long, stateful browser sessions. For everyday coding agents, its README recommends the Playwright CLI because it uses fewer tokens.

claude mcp add playwright npx @playwright/mcp@latest

Sentry

Brings production errors into your coding session, so you can start from the real failure.

https://mcp.sentry.dev/mcp

Linear

Lets an agent read and update issues and projects. There's a separate read-only address, which is a good default.

https://mcp.linear.app/mcp/readonly

Notion

Reads and updates the pages you already have access to, which helps when your specs and notes live there.

https://mcp.notion.com/mcp

Supabase

Connects an agent to your database project. Limit it to one project and turn on read-only mode, as below. Supabase advises connecting to production only when a task really needs it.

https://mcp.supabase.com/mcp?project_ref=YOUR_ID&read_only=true

Stripe

Searches Stripe's docs and works with its API. Some actions, such as refunds, need human confirmation in the Dashboard. If you authenticate with an API key, note that from December 2026 Stripe only accepts agent API keys or OAuth here.

https://mcp.stripe.com

Cloudflare

Works with Cloudflare's API. There's also a separate documentation server, which is handy on its own.

https://mcp.cloudflare.com/mcp
https://docs.mcp.cloudflare.com/mcp

For more, try the official MCP Registry or the Claude Connectors Directory.

Don't install everything

MCP servers have a cost. Tool definitions and results use up context, and context costs money and attention. Claude Code reduces this by loading tool definitions only when needed, but the results still count. Its cost guide also suggests using a CLI such as gh where you can. A few well-chosen servers beat a long list.

Stay safe

An MCP server can read your data and act as you, so treat one like any other software with access to your accounts.

  • Trust the source. A local server runs code on your machine with your permissions. Prefer vendors' official servers, and read the command before you run it.
  • Start read-only. Use read-only modes and narrow scopes, and add write access only when you need it.
  • Keep approvals on. Review tool calls, especially ones that change something. Save "always allow" for servers you trust.
  • Remember prompt injection. A malicious issue, page or email can contain instructions aimed at the model. It's riskier when one session can read untrusted content and also act on sensitive systems, so be careful about which servers you combine.
  • Remove what you don't use. Every connected server is more access to manage.

The bottom line

Use RAG to find what's written down. Use MCP to reach what's live and to act. Most real AI products end up with both, and the skill is in keeping each one small, tested and limited to what it needs.

Want this in your product?

See how we add AI