harnesslog.dev

Claude Code, AI, and development stories

EN · KO
H
hwangjungmin

LLMs have a training cutoff. Ask Claude about a library that shipped a major version recently and it’ll confidently give you outdated API calls. Context7 fixes this — it’s an open-source tool by Upstash that fetches live, official docs and injects them into your prompt at the moment you ask. No stale knowledge, no hallucinated method signatures.

Until now, Context7 only ran as an MCP server. You’d add it to your MCP config, it’d sit in the background ready to pull docs whenever your agent asked. Works well — but MCP has a cost: the server’s tool definitions live in your context window the whole session, and fetched docs get dumped in whether you need all of it or not.

Now there’s a CLI. npx ctx7 setup — that’s it. No MCP config needed.

The practical difference: with MCP, docs are always-on overhead. With CLI + a skill, docs load only when a library question actually comes up. Same up-to-date information, but the context hit is scoped to when it’s actually needed.

I care a lot about keeping context tight (running at ~20k tokens), so this is a welcome change. Pull the specific docs, use them, move on.

npx ctx7 setup. Worth trying.