Settings

Theme

I built a Context7 alternative that costs 40% less with similar code quality

1 points by addy999 3 months ago · 0 comments · 2 min read


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

The Results

- 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!

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection