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

推荐订阅源

T
The Exploit Database - CXSecurity.com
F
Fortinet All Blogs
U
Unit 42
F
Full Disclosure
雷峰网
雷峰网
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
罗磊的独立博客
D
DataBreaches.Net
C
Check Point Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
O
OpenAI News
C
CXSECURITY Database RSS Feed - CXSecurity.com
aimingoo的专栏
aimingoo的专栏
S
Security @ Cisco Blogs
大猫的无限游戏
大猫的无限游戏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
SegmentFault 最新的问题
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Hacker News
The Hacker News
Webroot Blog
Webroot Blog
Security Latest
Security Latest
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Google DeepMind News
Google DeepMind News
酷 壳 – CoolShell
酷 壳 – CoolShell
N
News | PayPal Newsroom
P
Proofpoint News Feed
B
Blog RSS Feed
MongoDB | Blog
MongoDB | Blog
C
Cybersecurity and Infrastructure Security Agency CISA
N
News and Events Feed by Topic
Google Online Security Blog
Google Online Security Blog
H
Help Net Security
Spread Privacy
Spread Privacy
T
Threat Research - Cisco Blogs
GbyAI
GbyAI
I
Intezer
Application and Cybersecurity Blog
Application and Cybersecurity Blog
M
MIT News - Artificial intelligence
Vercel News
Vercel News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
IT之家
IT之家
MyScale Blog
MyScale Blog
腾讯CDC

Butler's Log

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" GitButler's Claude Code tab GitButler's Annual Open Source Pledge Report Git Mini Summit 2025 Videos Automate Your AI Workflows with Claude Code Hooks Managing Multiple Claude Code Sessions Without Worktrees GitButler 0.15 - "Quirky Quinceañera" 20 years of Git. Still weird, still wonderful. GitButler's new patch based Code Review (Beta) Going down the rabbit hole of Git's new bundle-uri How to do patch-based review with git range-diff How Core Git Developers Configure Git Why is Git Autocorrect too fast for Formula One drivers? Stacked Branches with GitButler Git Merge 2024 Talks are Up GitButler 0.13 - "Lucky Baseball" Fearless Rebasing Git Merge 2024 Why GitHub Actually Won GitButler is joining the Open Source Pledge The New Era of Town Hall Chat The Future of Open Source GitButler is now Fair Source Git Merge 2024 GitButler 0.12 - "Stingy Baker" The Birth of THE MERGE GitButler for Windows Fixing up Git with Autosquash The Git Zeitgeist Git Worktrees and GitButler DevWorld Git Slides Git Tips and Tricks Git Tips 1: Oldies but Goodies Git Tips 2: New Stuff in Git Git Tips 3: Really Large Repositories FOSDEM Git Talk Opening Up GitButler Debugging Tauri in VS Code Advent of GitButler Code Signing Commits in Git, Explained Virtual Branches Alpha Our We Are Developers Adventure Building Virtual Branches DevDays in Vilnius The Future of Software and Open Source Introducing GitButler
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