Context7 for Antigravity
Context7 is an MCP server from Upstash that lets your agent look up current, version-specific documentation for a library instead of guessing from old training data. It has two read-only tools and the code is MIT licensed.
Our verdict
We ran it in Antigravity and read the source (commit 41dfa8d). It does one thing and does it quickly: a Next.js cookies question was answered from live docs in 33 seconds. Nothing runs on your machine except a small Node client; the cost is that your query text goes to Upstash's cloud.
- Getting correct, current API usage for popular libraries and frameworks
- Cutting down on hallucinated or deprecated method names
- Confidential code or queries: text is sent to context7.com and not removed by the client
- Returned docs are third-party text and are not filtered; treat them as reference, not instructions
What Context7 does, in one picture
The problem it solves: AI models learn from older data, so their library answers can be out of date. Context7 lets the agent read the current documentation first, then answer.
resolve-library-id finds the library: /vercel/next.jsquery-docs pulls the current docs for your questionawait cookies() from next/headers, then .get(name) and .set(name, value, options).Diagram of our real run on 2026-12-02 (not a screenshot). Details and limits are in the demo below.
Tested demo: what we ran in Antigravity
Real run, 2026-12-02Use Context7 to show me how to read and set cookies in a Next.js App Router server component. Use the current docs.
cookies from next/headers, call it with await, read with .get(name) and write with .set(name, value, options). That is the async form the current docs use, which older answers often get wrong.Run on Windows with Antigravity, one conversation, a fresh server entry. We tested this single prompt; we did not measure accuracy across libraries. The wording of the prompt above is shortened from what we typed.
Install Context7 in Google Antigravity
Antigravity reads MCP servers from ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (one project).
Add the Context7 MCP server to my Google Antigravity config (mcp_config.json).
Add this entry under mcpServers, keep all my existing entries, and show me the change before saving:
"context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp"] }
Source: https://github.com/upstash/context7
Tell me when done. Do not install anything else.Option 2: edit the file yourself
- 1. Open the config. In Antigravity open Customizations, go to the Installed tab and scroll to the bottom to "MCP Servers". Use the file icon (Copy Config File Path) to find
mcp_config.json. - 2. Add the server.
{ "mcpServers": { "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp"] } } } - 3. Wait, then start a new chat. In our test the new entry showed up in Customizations after 1 to 4 minutes, and it worked in a new conversation. There is no Refresh button in this version.
Needs Node.js 20.18.1 or newer. An API key is optional: it raises rate limits. With a key, add "--api-key", "YOUR_API_KEY" to args. A hosted option exists at https://mcp.context7.com/mcp with an Authorization: Bearer header; we have not tested it in Antigravity.
What is Context7?
@upstash/context7-mcp (version 4.9.2 at our review) is a thin local client: it sends your question to context7.com and returns the matching documentation text to the agent. It does not read your project files.Tools and what the code does
- ✓
resolve-library-idtakes a query and a library name and returns matching library ids. - ✓
query-docstakes a library id and a query, with optional language and version, and returns documentation text. - ✓Both tools are marked read-only in the code. The tool descriptions ask the model to call them at most 3 times per question.
- ✓Up to six more tools (feedback, upgrade guide, code search) exist but are off by default and need an experimental flag or an account setting.
When to use Context7
- 1. Writing code against a framework that changes often (Next.js, React, Tailwind) and you want the current API, not a remembered one.
- 2. Asking for a specific library version's behaviour using the version parameter.
- 3. Checking how a less common library is meant to be used before the agent writes the integration.
Security Review
Static reviewA thin client to a cloud service: two read-only tools, no subprocesses, no file writes, no install scripts. The privacy exposure is the text you send.
Full review: scope, findings, risks
Not verified: the free anonymous rate limit (the docs give 1,000 calls a month for a free account with a key), whether the hosted endpoint accepts requests with no credentials, and data retention. This is a code read and a single test run, not a penetration test.
Limitations
- Needs internet and sends your query text to context7.com; it cannot work offline.
- Coverage depends on what Context7 has indexed. Answers can still be wrong; check important details against the library's own docs.
- Rate limits apply; the free plan documented by Upstash is 1,000 calls a month with an API key.
- We ran one prompt in one Antigravity version. Your results with other libraries may differ.
Frequently Asked Questions
Is Context7 MCP safe to use?
The local code is small and we found no command execution, file writes or install scripts. The risk is what you send: queries go to Upstash's servers. Do not put secrets or private project details in prompts that use it.
How do I install Context7 in Antigravity?
Add a context7 entry that runs npx -y @upstash/context7-mcp to mcp_config.json, wait one to four minutes, then start a new conversation. Check it under Customizations, Installed, MCP Servers (at the bottom of the list).
Do I need an API key?
The README calls the key optional and says it gives higher rate limits and access to private libraries. We have not measured the limit without one.
Which tools does it add?
Two by default: resolve-library-id and query-docs. In our run the agent called both in that order.
Did this skill work for you?
Our review is one run on one setup. Tell other readers what happened on yours: which agent and version, what worked, and what broke. Reports are checked before they appear.