惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
I
InfoQ
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
GbyAI
GbyAI
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
美团技术团队
罗磊的独立博客
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
M
MIT News - Artificial intelligence
D
Docker
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
博客园 - 叶小钗

Butler's Log

Figma agent vs. one button: shipping design tokens to npm Local Model Performance on an M5 Max GitButler 0.22 - "Catch 22" Agentic Version Control Benchmarks Grit: rewriting Git in Rust with agents Git Merge 2026 Agent-safe Git with GitButler We’ve raised $17M to build what comes after Git Announcing the GitButler CLI for Linux The Great CSS Expansion A couple of git nits Simplifying Git by Using GitButler Introducing the GitButler CLI GitButler 0.19 - "Commander Keen" But Head: Crafting a Custom Font Getting Started With GitButler Agents Using the GitButler MCP Server to Build Better AI-Driven Git Workflows Using GitButler With Multiple GitHub Accounts Advent of Code! Upcoming GitButler Events Use GitButler for your Gerrit workflow Integrating GitButler and GitHub Enterprise Butler Flow: shipping code faster (but less like Alfred, more like CI on steroids) - Part 3 Butler Flow: shipping code faster (but less like Alfred, more like CI on steroids) - Part 2 Butler Flow: shipping code faster (but less like Alfred, more like CI on steroids) - Part 1 Grid Happens: Because Flexbox Wasn’t Enough Using Cursor Hooks for automatic version control Deep Dive into the new Cursor Hooks A Responsive Item Counter with CSS only GitButler 0.16 - "Sweet Sixteen"
MCP vs RAG: Two Very Different Ways to Gain Context
PJ Hagerty · 2026-01-15 · via Butler's Log

As language models become part of real production systems, the question is no longer whether models can generate good text. The question is how they get the information they need to do it reliably.

For the last couple of years, Retrieval Augmented Generation, or RAG, has been the default answer. More recently, Model Context Protocol, or MCP, has started gaining traction as an alternative approach. At first glance they seem similar. Both are about getting external data into a model. In practice, they solve very different problems and lead to very different system designs.

This post breaks down how RAG works, how MCP works, and why many teams are starting to see MCP as the more sustainable foundation.

RAG combines a language model with an external retrieval layer, most commonly a vector database. The flow usually looks like this:

  1. A user sends a prompt.
  2. The system embeds the prompt.
  3. The embedding is used to query a vector store.
  4. Relevant documents are retrieved.
  5. Those documents are stuffed into the model prompt.
  6. The model generates a response.

This approach is powerful and flexible. You can connect almost any data source as long as you can chunk it, embed it, and store it. For many teams, RAG was the first practical way to ground models in proprietary data.

That flexibility comes at a cost.

RAG systems tend to grow complex very quickly. You have to make decisions about chunk sizes, overlap, embedding models, similarity thresholds, reranking, and prompt formatting. Small changes can have large and sometimes non obvious effects on output quality.

There is also the issue of correctness. RAG retrieves what is semantically similar, not what is guaranteed to be correct or current. If your vector store is stale, poorly curated, or missing context, the model will still confidently generate an answer. The failure mode is subtle and hard to detect.

RAG is not wrong. It is just easy to misuse, especially as systems scale.

Model Context Protocol takes a different approach. Instead of treating context as text blobs retrieved at generation time, MCP treats context as a structured, first class interface between the model and the outside world.

MCP is an open source protocol originally developed by Anthropic and now adopted across the ecosystem, including OpenAI tooling. The goal is standardization. Rather than every application inventing its own retrieval logic, MCP defines a common way for models to ask for context and for tools to provide it.

At a high level, MCP uses a client server model:

  1. The user provides input.
  2. An MCP client sends a structured request.
  3. An MCP server fetches data from approved sources.
  4. That data is returned in a predictable format.
  5. The model generates a response using that context.

Instead of dumping arbitrary documents into a prompt, MCP gives the model access to tools that know how to fetch and format the right data.

The biggest difference between RAG and MCP is where intelligence lives.

In RAG, the application owns almost everything. It decides what to retrieve, how to retrieve it, and how to present it to the model. The model is mostly passive. It gets whatever context the application hands it.

In MCP, the boundary is clearer. The application exposes capabilities through the MCP server. The model, through the MCP client, can request exactly what it needs within those constraints. This leads to cleaner separation of concerns and more predictable behavior.

This also changes how systems evolve. Adding a new data source in a RAG system often means new embeddings, new indexing jobs, and new prompt logic. In an MCP based system, it usually means adding a new tool endpoint with a defined schema.

Standardization and Interoperability

One of the less obvious benefits of MCP is interoperability.

RAG pipelines are often tightly coupled to a specific model and embedding strategy. Switching models can mean re embedding your entire corpus or rewriting large parts of the pipeline.

MCP is model agnostic. The protocol defines how context is requested and delivered, not how the model reasons about it. This makes it easier to swap models, run multiple models, or evolve your stack over time.

For teams building long lived systems, this matters. Vendor lock in often starts at the interface layer, not the model layer.

Reliability and Control

RAG retrieves data dynamically based on similarity. MCP retrieves data intentionally based on structure and permission.

That distinction is important in production environments. With MCP, you can define exactly which data sources are available, what queries are allowed, and how results are formatted. You can enforce access controls, validation, and versioning in ways that are awkward or fragile in a pure RAG setup.

This leads to more reliable outputs and fewer surprises. When something goes wrong, the failure is usually easier to trace because the path from request to data is explicit.

Setup and Operational Complexity

RAG looks simple at first and gets complicated later. MCP looks slightly more formal up front and tends to stay manageable. RAG requires ongoing tuning. Embedding drift, corpus updates, and retrieval quality all need monitoring. MCP shifts much of that complexity into well understood backend patterns like APIs, services, and schemas.

For developers who already know how to build reliable backend systems, MCP tends to feel familiar. It plays nicely with existing infrastructure rather than inventing a parallel data access layer.

None of this means RAG is obsolete.

RAG is still a good fit for exploratory search, unstructured knowledge bases, and cases where approximate relevance is acceptable. It is also useful when you do not control the underlying data well enough to expose it through structured tools.

Systems will continue to use RAG alongside MCP. The key is understanding what each approach is good at and not forcing one to solve the other’s problems.

If you are building a demo or a prototype, RAG may get you there faster, similar to Ruby on Rails getting you faster to MCP than most programming languages. If you are building a system that needs to scale, remain correct, and survive model changes, MCP is worth serious consideration.

MCP is not just another retrieval technique. It is a shift toward treating context as an interface, not a side effect of prompt engineering. For developers who care about maintainability, correctness, and long term architecture, that shift is hard to ignore.

PJ Hagerty

Written by PJ Hagerty

PJ Hagerty is a well-known figure in the tech industry, particularly within the developer relations and DevOps communities. He's also Head of Developer and Community Relations at GitButler.

Table of Contents

  • How RAG Works in Practice
  • Enter Model Context Protocol
  • Why the Architecture Matters
  • Standardization and Interoperability
  • Reliability and Control
  • Setup and Operational Complexity
  • When RAG Still Makes Sense
  • Choosing the Right Foundation