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

推荐订阅源

Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
H
Hacker News: Front Page
Stack Overflow Blog
Stack Overflow Blog
B
Blog
I
InfoQ
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
Y
Y Combinator Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
爱范儿
爱范儿
F
Full Disclosure
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
T
Tailwind CSS Blog
S
Secure Thoughts
P
Privacy International News Feed
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LINUX DO - 最新话题
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Cybersecurity and Infrastructure Security Agency CISA
Last Week in AI
Last Week in AI
W
WeLiveSecurity
Google Online Security Blog
Google Online Security Blog
P
Privacy & Cybersecurity Law Blog
D
DataBreaches.Net
Engineering at Meta
Engineering at Meta
Know Your Adversary
Know Your Adversary
P
Palo Alto Networks Blog
I
Intezer
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Project Zero
Project Zero
V2EX - 技术
V2EX - 技术
H
Heimdal Security Blog
博客园 - Franky
阮一峰的网络日志
阮一峰的网络日志
D
Darknet – Hacking Tools, Hacker News & Cyber Security
T
Troy Hunt's Blog
V
Vulnerabilities – Threatpost
H
Help Net Security
Martin Fowler
Martin Fowler
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
博客园 - 【当耐特】

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
MCP + RAG: Why I Stopped Building Complex RAG Systems After MCP Changed Everything
KevinTen · 2026-06-25 · via DEV Community

MCP + RAG: Why I Stopped Building Complex RAG Systems After MCP Changed Everything

Honestly, I've spent the last four years building increasingly complex RAG systems. Chunking strategies, embedding models, vector databases, rerankers, hybrid search... you name it, I've probably wasted a weekend trying it.

I had this 1,800-hour knowledge base project called Papers — six years of notes, articles, bookmarks, everything. I built RAG version after RAG version, each time thinking "this time it'll be perfect."

Spoiler: It never was.

Then I added MCP (Model Context Protocol) support. And I realized something that completely changed how I think about knowledge retrieval: MCP makes traditional complex RAG obsolete for most use cases.

Let me explain what I learned the hard way.


The RAG Trap I Was Stuck In

If you've built a RAG system, you know the drill:

  1. Chunking: Should you use fixed-size, semantic, recursive, or something fancy like LLM-powered chunking?
  2. Embeddings: OpenAI text-embedding-3-large vs Cohere vs nomic-ai vs your fine-tuned model?
  3. Vector Database: Pinecone vs Weaviate vs PGVector vs Qdrant vs Chroma?
  4. Retrieval: Top-k how many? Hybrid search with keywords? Reranking?
  5. Prompt Compression: How do you fit all the retrieved chunks into the context window?

I went through every iteration. At one point, my RAG system was over 2,000 lines of code. I had configurable chunkers, multiple embedding providers, caching layers, hybrid search... it was impressive. It also didn't work that well.

Here's what bothered me the most: I kept throwing more complexity at the problem, but the fundamental issue never went away. I was trying to make my knowledge base smart, but AI already got smart.

Why was I reimplementing all this understanding logic when the AI can already do it better than me?


How MCP Changed the Game

When I added MCP support to Papers, I started with the simplest possible approach:

  • Expose two tools: search_notes and get_note_content
  • Search is just basic text matching (yes, really — string.contains())
  • Return full note content instead of chunks
  • Let the AI handle the rest

That's it. 150 lines of code. That's the entire MCP server. Compare that to 2,000 lines of complex RAG.

At first, I thought this was just a stepping stone. I figured I'd gradually add all the fancy RAG stuff back in. But... I never did. Because it works better this way.

Wait, what? How can simple text matching beat a sophisticated RAG system?

Let me show you the actual code so you can see how simple this really is:

@Service
public class SimpleMcpKnowledgeService {
    private final NoteRepository noteRepository;

    public McpSearchResponse searchNotes(String query, int maxResults) {
        // Yes, this is really it. Simple text search.
        List<Note> matching = noteRepository.findAll().stream()
            .filter(note -> 
                note.getTitle().toLowerCase().contains(query.toLowerCase()) ||
                note.getContent().toLowerCase().contains(query.toLowerCase()))
            .limit(maxResults)
            .toList();

        return McpSearchResponse.builder()
            .totalMatches(matching.size())
            .notes(matching.stream()
                .map(n -> McpNoteSummary.builder()
                    .id(n.getId())
                    .title(n.getTitle())
                    .preview(getPreview(n, query))
                    .createdAt(n.getCreatedAt())
                    .build())
                .toList())
            .build();
    }

    public String getNoteFullContent(String noteId) {
        return noteRepository.findById(noteId)
            .map(Note::getContent)
            .orElse("Note not found with id: " + noteId);
    }
}

And the MCP controller:

@RestController
@RequestMapping("/mcp")
@CrossOrigin(origins = "*", allowedHeaders = "*")
public class McpController {
    private final SimpleMcpKnowledgeService knowledgeService;

    @PostMapping("/tools/call")
    public ResponseEntity<McpCallResponse> callTool(
            @RequestBody McpCallRequest request,
            @RequestHeader(value = "X-API-Key", required = false) String apiKey) {

        if (!authService.validateKey(apiKey)) {
            return ResponseEntity.status(HttpStatus.UNAUTHORIZED).build();
        }

        ToolCall call = request.getCall();
        if ("search_notes".equals(call.getName())) {
            String query = call.getParameters().get("query").asText();
            int maxResults = call.getParameters().has("max_results") 
                ? call.getParameters().get("max_results").asInt() 
                : 10;

            McpSearchResponse result = knowledgeService.searchNotes(query, maxResults);
            return ResponseEntity.ok(McpCallResponse.success(result));
        }

        if ("get_note_content".equals(call.getName())) {
            String noteId = call.getParameters().get("note_id").asText();
            String content = knowledgeService.getNoteFullContent(noteId);
            return ResponseEntity.ok(McpCallResponse.success(content));
        }

        return ResponseEntity.badRequest().build();
    }
}

That's the core of it. Two tools. Simple search. Full notes instead of chunks. That's it.


Why This Actually Works Better Than Complex RAG

So here's the thing I didn't expect: this approach beats my fancy RAG system 9 times out of 10. Here's why:

1. AI already understands context better than your chunker

Traditional RAG chunks your content into small pieces before retrieval. But why chunk when AI can read the whole note and figure out what's relevant?

With MCP:

  1. AI searches for keywords it cares about
  2. Gets back a list of potentially relevant notes
  3. It can choose to load the full content of any note that looks promising
  4. AI reads the full note and extracts what it needs

The AI is better at deciding what's relevant than your pre-chunking ever was. It knows what it's looking for.

2. You don't lose context across chunk boundaries

Ever had RAG give you a chunk that's just half an answer, and the rest is in the next chunk that didn't get retrieved? It's so frustrating.

With full notes, the AI gets the complete context. It can see how ideas connect. It doesn't miss the other half of the explanation because your chunker split it in the wrong place.

3. Simpler means fewer things go wrong

Let's be honest — how many times have you debugged:

  • Chunking that cuts code in the middle of a function
  • Embeddings that return irrelevant results because "bank" can mean two things
  • Vector databases that suddenly slow down when you hit 10k documents
  • Rerankers that make everything worse instead of better

With simple text search, what can go wrong? If the keyword exists, it matches. If it doesn't, it doesn't. Predictable. No weird embedding drift. No dimension mismatches. Nothing.

4. It's actually faster for AI to do multiple rounds

Wait, doesn't this require multiple tool calls? Yes. But modern AI clients handle that automatically. And tokens are cheap.

Compare:

  • Traditional RAG: You spend tokens embedding, storing, retrieving, and compressing chunks
  • MCP approach: You spend tokens letting AI search, read, and reason

Same token budget, better result because the AI is in control.


When Should You Still Use RAG?

Don't get me wrong — I'm not saying RAG is completely useless. There are still cases where it makes sense:

Scenario Still Need RAG? Why
100k+ large documents ✅ Yes You can't load full documents every time, context window won't fit
Production high-scale ✅ Yes Multiple round trips cost more latency
Semantic search is critical ❌ Not really AI can do the understanding if you give it the candidates
Your notes are all 10k+ words ❌ It depends Even 10k words is fine, AI can skip what it doesn't need
You need to monetize ✅ Yes Complexity is a feature for fundraising

Honestly, for most personal knowledge bases, side projects, and even internal company tools — you don't need complex RAG. MCP changes everything.

My knowledge base has about 2,800 notes with ~3 million words total. Simple text search works fine. MCP gives the AI the access it needs, and that's all you really need.


Pros and Cons: Let's Be Honest

I promised I'd keep this real, not just marketing fluff. Here's the actual breakdown:

✅ Pros That I've Actually Experienced

  1. Extremely simple to implement — 150 lines vs 2000 lines. I can maintain this.
  2. No embedding costs — you don't need to re-embed everything when a better embedding model comes out.
  3. Works forever — text search doesn't get outdated when AI models change.
  4. Privacy friendly — your full notes never leave your server, only the fragments AI actually requests go out.
  5. AI gets full context — no missing information from bad chunking.
  6. Easy to debug — if search fails, you can just check if the keyword exists. Done.

❌ Cons You Need To Consider

  1. Multiple round trips — AI has to search, then fetch, then answer. Adds a few seconds.
  2. Not good for extremely large collections — if you have 100,000+ notes, simple search gets slow.
  3. Relies on good note titling/content — if your notes are badly named, search won't find them.
  4. No semantic matching for synonyms — if you search for "LLM" but the note says "large language model", it won't match. (Honestly, I just fix this by adding keywords to my notes now.)

My Personal Experience: Before vs After

Let me show you a concrete example. Six months ago, I asked my fancy RAG system:

"What did I write about MCP server error handling?"

The RAG system:

  • Found 3 chunks from different notes
  • Two were about different things
  • One had half the relevant information
  • The other half was in a different chunk that didn't get retrieved
  • Result: Incomplete answer, I had to go search manually

Today, with MCP:

  1. AI searches for "error handling MCP" → gets 5 matching notes
  2. AI sees one titled "MCP Server Error Handling: What I Learned"
  3. AI loads the full note content
  4. AI reads it and answers my question with everything I wrote
  5. Done. Complete answer in ~10 seconds more, but it's actually correct.

The extra 10 seconds is worth it for getting the complete right answer instead of a half-wrong fast answer.

Another example: I was looking for something I wrote about Spring Boot CORS configuration. My old RAG chunked it across three chunks. None got retrieved because the chunk that had the keywords didn't have the actual solution. With MCP, the search finds the note by title, AI reads the whole thing, done.


How To Migrate Your Existing Knowledge Base To MCP

If you already have a knowledge base, you can add MCP support in an afternoon. Here's the step-by-step:

Step 1: Expose Basic Search Tool

Create a search_notes tool that takes a query and returns matching note titles + previews. Keep it simple. Start with text matching.

Step 2: Add Get Full Content Tool

Create a get_note_content tool that returns the complete markdown of any note by ID.

Step 3: Add Authentication

Support multiple authentication methods (as I learned the hard way here).

Step 4: Add CORS Handling

Make sure OPTIONS requests work correctly and don't require auth (I wrote about that too).

Step 5: You're Done

That's actually it. You don't need anything else. Connect it to your favorite MCP client and start using it.

If you want to see the complete working example, check out the Papers GitHub repo — everything is there, including the full MCP server implementation.


What About Vector Search?

Wait, what about vector databases? Do I still use one?

Honestly, I still have it in my codebase. I just don't use it. The simple approach works better for my use case. Maybe I'll bring it back if I ever get 100,000 notes. But for now, simple text search is perfect.

And even if you do want vector search, with MCP you can still add it as an option. The beauty is that you can incrementally add complexity — you don't need it day one. Start simple, add it later if you actually need it.


Final Thoughts: The MCP Paradigm Shift

MCP isn't just another protocol. It's a paradigm shift in how we think about integrating AI with our data.

Before MCP:

  • We tried to make our data systems "smart"
  • We pre-processed, chunked, embedded, indexed everything
  • We tried to answer the AI's question before the AI even asked it
  • All that complexity, most of it wasted

After MCP:

  • AI is smart — it knows what question it's asking
  • Your system just needs to give it access to the data
  • AI handles the understanding, you handle the storage
  • Simple beats complex, because AI is doing what it's good at

I spent six years over-engineering my knowledge base. After MCP, I deleted 1,850 lines of complex RAG code. The system works better now with 150 lines.

That's the power of MCP. It lets you go back to simple.


What About You?

Are you still building complex RAG systems? Have you tried MCP for your knowledge base? I'd love to hear about your experience in the comments.

Did you find that simpler architectures work better with MCP, or are you still doing full complex RAG inside your MCP server? Let me know!

(Full code for the simple MCP knowledge server is available on GitHub if you want to fork it or steal the code for your own project.)