C7

Context7 for Antigravity

Visit Skill
Tested in Antigravity 2026-12-02Static review 2026-12-02codingMCP Server

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.

Good for
  • Getting correct, current API usage for popular libraries and frameworks
  • Cutting down on hallucinated or deprecated method names
Not for / watch out
  • 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.

1. You ask in Antigravity
“Show me how to read and set cookies in a Next.js App Router server component. Use the current docs.”
→
2. The agent uses the MCP tools
resolve-library-id finds the library: /vercel/next.js
query-docs pulls the current docs for your question
Took 33 seconds in our run
→
3. You get
An answer built from the docs: await 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-02
Prompt
Use Context7 to show me how to read and set cookies in a Next.js App Router server component. Use the current docs.
Time
33 seconds
Tools called
resolve-library-id, query-docs
Library matched
/vercel/next.js
What came back: the agent resolved the library id first, then pulled docs and answered with the current pattern: import 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).

EasiestOption 1: paste this to your Antigravity agent
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. 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. 2. Add the server.
    {
      "mcpServers": {
        "context7": {
          "command": "npx",
          "args": ["-y", "@upstash/context7-mcp"]
        }
      }
    }
  3. 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?

Context7 is a documentation lookup service with an MCP front end, built by Upstash. The npm package @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-id takes a query and a library name and returns matching library ids.
  • ✓query-docs takes 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. 1. Writing code against a framework that changes often (Next.js, React, Tailwind) and you want the current API, not a remembered one.
  2. 2. Asking for a specific library version's behaviour using the version parameter.
  3. 3. Checking how a less common library is meant to be used before the agent writes the integration.

Security Review

Static review
Reviewed
2026-12-02
Commit
41dfa8d (upstash/context7), MIT
Package
@upstash/context7-mcp 4.9.2

A 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
Scope:We cloned the repository at that commit and read packages/mcp (the package behind npx @upstash/context7-mcp) without running or installing it. We did not run npm audit and did not compare the published npm tarball with the source.
Findings:Default network calls go only to https://context7.com/api (search for libraries and fetch documentation). Requests carry your query, library name, version, an optional API key, the client name and version, and a random per-start session id. We found no command execution (no child_process, exec or spawn) and no file writes; the only file reads are its own package.json and an optional CA certificate file. The package has no preinstall, install, postinstall or prepare script, and 13 runtime dependencies, most of which serve the hosted server mode. Its OpenTelemetry metrics exporter is pull-based and only starts in HTTP mode; in the default stdio mode we found no code that pushes telemetry anywhere.
Risks and permissions:Low to medium. (1) Your queries leave your machine. The tool text asks the model not to include secrets, but the code does not filter anything. (2) Context7's documentation says MCP queries are stored anonymously to improve results; we found no retention period and no client-side opt-out. (3) Returned documentation is passed to the model unmodified, and the default tools carry no warning to treat it as data, so a poisoned doc page could try to steer the agent. Review what the agent does next.

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.

user reports

Plain text only, no links. Reports are public.