Short version first, because that is probably what you came here for. Context7 is an MCP server that gives an AI coding agent a documentation lookup tool, so instead of you hunting for files and pasting them into a chat window, the agent queries an index and gets the relevant snippets back on its own. I wired it into EF-Map on 6 November 2025, ran it for about seven months, and deleted it from the repo on 17 June 2026. Both config files below are the real ones, pulled out of git history, and I will be straight about which parts earned their keep and which did not.
I should say up front that this article was originally published in November 2025 and I have rewritten it in August 2026. The first version quoted speed-ups I had never measured and a monthly subscription price I can find no record of paying. Those are gone. What is left is the stuff I can actually point at in a commit.
What Context7 actually is
Context7 is run by Upstash. It indexes public library documentation, and if you submit them it will index your own repositories too, then exposes that index to an agent over the Model Context Protocol. When I set it up there were two tools. One called resolve-library-id that turns a name into an index ID, and one called get-library-docs that pulls documentation for that ID with an optional topic filter and a token limit. Checking their README again while writing this, the second one is now called query-docs and there is a npx ctx7 setup command that did not exist back then, so treat everything in here about their side of the fence as how it looked in late 2025. Their site is the place to check the current shape of it.
The API key question seems to be the thing people search for most, so here is what I can tell you honestly. The server ran without one. The setup guide I wrote for my own repo at the time said the free tier was sufficient for regular use and that a key was optional, wanted only for higher rate limits and for private repositories. I generated one anyway, because both of my repos were private. Their README today still describes the key as optional and recommended rather than required. The free allowance has moved since then, and I am not going to quote you a number or a price I cannot verify myself, so go and look at their dashboard before you plan anything around it.
The problem I wanted it to solve
The reason I bothered was the file attachment dance. I was working in VS Code with Copilot at the time, and a lot of sessions opened with the agent asking me to attach AGENTS.md, the Copilot instructions file and the troubleshooting guide before it could do anything useful. So I would stop what I was doing, go and find them, drag them in, and then it would read them and ask for one more thing. I never actually timed any of this, which is exactly why the original version of this article should not have put numbers on it. What I can say is that it happened most days and it broke concentration every single time, and the appeal of Context7 was that the agent could go and fetch its own documentation while I carried on with something else.
The two config files
First one is .vscode/mcp.json, which tells VS Code how to launch the server locally. This is mine, with the key blanked:
{
"servers": {
"context7": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@upstash/context7-mcp@latest"],
"env": {
"CONTEXT7_API_KEY": "ctx7sk-..."
}
}
}
}
One detail worth flagging, because I got it wrong myself and so did the first draft of this article. VS Code's file uses a top level servers key. GitHub's Copilot coding agent config, which is a completely separate thing you paste into repository settings on github.com, uses mcpServers with an HTTP transport pointed at https://mcp.context7.com/mcp. I ended up running both, which turned out to matter later.
Second one is context7.json, which sits in the repository root and tells Context7 what to index once you have submitted the repo. This is the overlay repo's copy, trimmed a bit for length:
{
"$schema": "https://context7.com/schema/context7.json",
"projectTitle": "EF-Map Overlay",
"description": "Native Windows helper and DirectX 12 overlay for EVE Frontier",
"branch": "main",
"folders": ["docs", ".github", "src"],
"excludeFolders": ["build", "out", "Release", "CMakeFiles", "_deps", "releases"],
"excludeFiles": ["*.obj", "*.pdb", "*.exe", "*.dll", "*.lib", "*.log", "tmp_*.json"],
"rules": [
"CRITICAL: Helper must launch from external PowerShell window (not VS Code terminal) for smoke testing",
"Use process name 'exefile.exe' for injection (not PID - PIDs change every launch)",
"Cross-repo coordination: keep GAME_OVERLAY_PLAN.md synchronized with EF-Map-main copy",
"Overlay protocol contracts: document in this repo; web app payload schemas stay in EF-Map-main"
]
}
The rules array is the good bit
If you take one thing from this, take the rules array. It is a list of plain sentences that Context7 returns at the top of every response for that library, so it is somewhere to put the things that are true about your project but are not really written down in any one file. Two of mine were about the overlay helper. It has to launch from an external PowerShell window rather than a VS Code integrated terminal, because the integrated terminal fails to bind it, and injection has to go by the process name exefile.exe rather than a PID, because the PID changes on every launch. Both of those were learned the annoying way, and an agent that guesses at either one fails without understanding why.
Getting those back automatically, on a query that was only about smoke testing, without anyone having asked for them, was the first moment the thing felt properly worth having. That is institutional knowledge that had previously been spread across three files, and it turned up in the first answer. I still think that pattern is a good idea even if you never use Context7, which is roughly what AGENTS.md has become for me since.
So why is it gone
Three things stacked up, and only one of them is really about Context7.
The first is the API key, and this one is entirely my fault. I committed it. It sat in .vscode/mcp.json in plain text, in a repository whose own agent instructions claimed at the time that keys are never committed. The repo went private on 20 November 2025, a fortnight after I added it, which limits the damage a fair bit, but it was still wrong. An agent-environment audit I ran on 17 June 2026 called it out in the first paragraph, and it was that audit that started the clear-out.
The second is that I finished up with two divergent configs for the same tool. The VS Code one used the stdio transport with the key baked in. A second file, docs/context7-mcp-config.json, used the HTTP transport with no key at all. Neither referenced the other, and nothing in the repo said which one was live. That is the kind of drift that is invisible until somebody, or something, has to reason about it.
The third one is the actual reason, and it is not a criticism of the product. The workflow moved underneath it. I came off Copilot, and the agents I use now read the repository directly. They have file search, they have grep, they run commands themselves, and AGENTS.md loads automatically at the start of every session. The specific problem Context7 was solving for me in November 2025, an agent that could not go and look at my own files, mostly stopped existing. An indexed copy of my docs that refreshes when I push is strictly worse than the files on disk if the agent can just open the files on disk.
For completeness, and because it is a bit funny. The overlay repo still has its context7.json and its mcp.json sitting in it, untouched since November 2025. I never got round to clearing them out, which tells you roughly how much I was using it by the end.
When I think it still makes sense
The case I did not have is the one where I think it still holds up. If your agent genuinely cannot see your repository, a Copilot coding agent working an issue on github.com, or a hosted assistant with no filesystem access, then an indexed documentation endpoint is more or less the only way it gets your context at all, and the rules array is a tidy way to smuggle your operational guardrails into every single answer it gives. That is a real gap and Context7 fills it neatly.
If your agent is sitting in your editor with full file access, I think you get most of the same benefit out of a well written AGENTS.md and a documentation index, for nothing, with no key to leak and no second copy of your docs to go stale. I would not have believed that in November 2025. The tooling changed faster than I expected it to.
The other thing I would say, and this is the bit that survived the whole exercise, is that the value was never really in the retrieval. It was in being forced to write down the four or five sentences that go in the rules array. Whatever tool you point at your repository, somebody still has to decide what the critical, easy to get wrong, not written anywhere facts about your project actually are. Context7 just gave me a file to put them in. For a while it was the main way I fed context to an agent, and now it is four sentences at the top of a markdown file instead.
If you are setting Context7 up today, start from the configs above rather than from the ones in this article's first version, and check the current tool names and limits on their side before you wire anything to them. And if I have got something wrong here, or their setup has moved again since August 2026, let me know and I will get it updated.
Related Posts
Audit, Chunk, Implement: The AI Workflow Behind EF-Map is the loop I actually use to ship features with agents, which is the thing Context7 was bolted onto.
Vibe Coding: Building a 124,000-Line Project Without Writing Code covers the documentation-driven approach that made agent context worth optimising in the first place.
Help System Overhaul: Three Prompts to Fix Four Months of Documentation Drift is what happens when the docs an agent reads are out of date, which is the failure mode an index makes worse rather than better.
Eleven Months of Talking to AI Agents: What 2.26 Million Dictated Words Show is the data on how I actually prompt these things, dictated rather than typed.