Hey devs! ๐
I've been working on a RAG-based solution that functions similarly to Context7 but at a significantly lower cost. After some rigorous testing, I thought I'd share my findings with the community.
TL;DR: This implementation costs roughly half as much as Context7 while producing code of comparable quality.
The Tests
I ran three coding challenges using Gemini-2.5-pro (set to temp=0) with both Context7 and Custom MCP:
Creating a Next.js page with API data fetching
Building a FastAPI endpoint for streaming large files
Developing a FastAPI WebSockets app with Redis pub/sub
I implemented a simple prompt suffix system:
For Context7: "use context7. Max tokens: 500"
For MCP: "use documentation"
The Results
Cost comparison: https://imgur.com/a/lGFgMHz
Average cost savings: ~40%
Next.js Test: Context7 ($0.056) vs Custom MCP ($0.023)
FastAPI Streaming Test: Context7 ($0.044) vs Custom MCP ($0.031)
WebSockets/Redis Test: Context7 ($0.052) vs Custom MCP ($0.040)
Both tools generated fully functional code that implemented all requirements, but the Custom MCP server did it at consistently lower costs.
Why This Matters
If you're building AI-powered coding tools or using them extensively in your workflow, these cost savings add up fast.
For teams making thousands of API calls daily, you could be saving hundreds or thousands of dollars monthly.
What's Next
I encourage you to try the MCP server yourself and share your feedback. Currently it supports the latest versions of Expo, FastAPI, and NextJS:
{
"documentation": {
"url": "https://doc-mcp.fly.dev/mcp/"
}
}If there's enough interest, I'll add more libraries.
Would love to hear your thoughts and questions about the approach!
Videos
Hello all,
I am working with Context 7 using the desktop app, and I must say it helps a lot โ the context of the answers is much more to the point.
Now, I would like to expand to more MCPs that can assist me with coding and performing deep research while coding, particularly in related open-source projects, documentation, and code examples.
I do not want them to change my files, only provide output โ I will handle the implementation myself. So, experts, please:
Suggest more coding-related MCPs that help you.
Provide good prompt suggestions for combining MCP pipelines.
From their Github Repo:
โ Without Context7
LLMs rely on outdated or generic information about the libraries you use. You get:
โ Code examples are outdated and based on year-old training data
โ Hallucinated APIs don't even exist
โ Generic answers for old package versions
โ With Context7
Context7 MCP pulls up-to-date, version-specific documentation and code examples straight from the source โ and places them directly into your prompt.
Context7 fetches up-to-date code examples and documentation right into your LLM's context.
1๏ธโฃ Write your prompt naturally
2๏ธโฃ Tell the LLM to use context7
3๏ธโฃ Get working code answers
No tab-switching, no hallucinated APIs that don't exist, no outdated code generations.
I have tried it with VS Code + Cline as well as Windsurf, using GPT-4.1-mini as a base model and it works like a charm.
Context7 website
Github Repo
YT Tutorials on how to use with Cline or Windsurf:
Context7: The New MCP Server That Will CHANGE AI Coding (FREE)
This is Hands Down the BEST MCP Server for AI Coding Assistants