Skip to content

Context7 Platform -- Up-to-date docs for AI agents

CTX7-3086: Add Antigravity plugin for Context7 (#3353)

Enes Gules691765bb0c0a
diff --git a/plugins/antigravity/context7/README.md b/plugins/antigravity/context7/README.md
new file mode 100644
index 00000000..1f400e09
--- /dev/null
+++ b/plugins/antigravity/context7/README.md
@@ -0,0 +1,51 @@
+# Context7 Plugin for Antigravity
+
+Context7 solves a common problem with AI coding assistants: outdated training data and hallucinated APIs. Instead of relying on stale knowledge, Context7 fetches current documentation directly from source repositories.
+
+## What's Included
+
+- **MCP Server** — Connects Antigravity to Context7's documentation service
+- **Skills** — A `context7-mcp` skill with instructions on resolving libraries and fetching documentation
+
+## Authentication
+
+After you install the plugin, open **Agent Settings → Customizations** and click **Authenticate** next to the `context7_context7` server. Sign in to Context7 in your browser to connect.
+
+## Available Tools
+
+### resolve-library-id
+
+Searches for libraries and returns Context7-compatible identifiers.
+
+```
+Input: "next.js"
+Output: { id: "/vercel/next.js", name: "Next.js", versions: ["v15.1.8", "v14.2.0", ...] }
+```
+
+### query-docs
+
+Fetches documentation for a specific library, ranked by relevance to your question.
+
+```
+Input: { libraryId: "/vercel/next.js", query: "app router middleware" }
+Output: Relevant documentation snippets with code examples
+```
+
+## Usage Examples
+
+The plugin works automatically when you ask about libraries:
+
+- "How do I set up authentication in Next.js 15?"
+- "Show me React Server Components examples"
+- "What's the Prisma syntax for relations?"
+
+## Version Pinning
+
+To get documentation for a specific version, include the version in the library ID:
+
+```
+/vercel/next.js/v15.1.8
+/supabase/supabase/v2.45.0
+```
+
+The `resolve-library-id` tool returns available versions, so you can pick the one that matches your project.
diff --git a/plugins/antigravity/context7/assets/logo.svg b/plugins/antigravity/context7/assets/logo.svg
new file mode 100644
index 00000000..5b9bec74
--- /dev/null
+++ b/plugins/antigravity/context7/assets/logo.svg
@@ -0,0 +1,7 @@
+<svg width="34" height="34" viewBox="-3 -3 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
+<rect width="28" height="28" rx="4" fill="#059669" style="fill:#059669;fill:color(display-p3 0.0196 0.5882 0.4118);fill-opacity:1;"/>
+<path d="M10.5724 15.2565C10.5724 17.5025 9.6613 19.3778 8.17805 21.1047H11.6319L11.6319 22.7786H6.33459V21.1895C7.95557 19.3566 8.58065 17.8628 8.58065 15.2565L10.5724 15.2565Z" fill="white" style="fill:white;fill-opacity:1;"/>
+<path d="M17.4276 15.2565C17.4276 17.5025 18.3387 19.3778 19.822 21.1047H16.3681V22.7786H21.6654V21.1895C20.0444 19.3566 19.4194 17.8628 19.4194 15.2565H17.4276Z" fill="white" style="fill:white;fill-opacity:1;"/>
+<path d="M10.5724 12.7435C10.5724 10.4975 9.66131 8.62224 8.17807 6.89532L11.6319 6.89532V5.22137L6.33461 5.22137V6.81056C7.95558 8.64343 8.58066 10.1373 8.58066 12.7435L10.5724 12.7435Z" fill="white" style="fill:white;fill-opacity:1;"/>
+<path d="M17.4276 12.7435C17.4276 10.4975 18.3387 8.62224 19.822 6.89532L16.3681 6.89532L16.3681 5.22138L21.6654 5.22138V6.81056C20.0444 8.64343 19.4194 10.1373 19.4194 12.7435H17.4276Z" fill="white" style="fill:white;fill-opacity:1;"/>
+</svg>
diff --git a/plugins/antigravity/context7/mcp_config.json b/plugins/antigravity/context7/mcp_config.json
new file mode 100644
index 00000000..9064a5ae
--- /dev/null
+++ b/plugins/antigravity/context7/mcp_config.json
@@ -0,0 +1,7 @@
+{
+ "mcpServers": {
+ "context7": {
+ "serverUrl": "https://mcp.context7.com/mcp"
+ }
+ }
+}
diff --git a/plugins/antigravity/context7/plugin.json b/plugins/antigravity/context7/plugin.json
new file mode 100644
index 00000000..ea420a99
--- /dev/null
+++ b/plugins/antigravity/context7/plugin.json
@@ -0,0 +1,22 @@
+{
+ "name": "context7",
+ "displayName": "Context7",
+ "version": "1.0.0",
+ "description": "Up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.",
+ "logo": "assets/logo.svg",
+ "suggestedPrompts": [
+ "How do I set up middleware in the latest Next.js?",
+ "Show me how to define relations in Prisma",
+ "What are the Supabase auth methods?"
+ ],
+ "category": "Developer Tools",
+ "keywords": ["documentation", "context", "mcp", "library-docs"],
+ "author": {
+ "name": "Upstash",
+ "email": "[email protected]",
+ "url": "https://upstash.com"
+ },
+ "homepage": "https://context7.com",
+ "repository": "https://github.com/upstash/context7",
+ "license": "MIT"
+}
diff --git a/plugins/antigravity/context7/skills/context7-mcp/SKILL.md b/plugins/antigravity/context7/skills/context7-mcp/SKILL.md
new file mode 100644
index 00000000..90542d4e
--- /dev/null
+++ b/plugins/antigravity/context7/skills/context7-mcp/SKILL.md
@@ -0,0 +1,56 @@
+---
+name: context7-mcp
+description: This skill should be used when the user asks about libraries, frameworks, API references, or needs code examples. Activates for setup questions, code generation involving libraries, or mentions of specific frameworks like React, Vue, Next.js, Prisma, Supabase, etc.
+---
+
+When the user asks about libraries, frameworks, or needs code examples, use Context7 to fetch current documentation instead of relying on training data.
+
+## When to Use This Skill
+
+Activate this skill when the user:
+
+- Asks setup or configuration questions ("How do I configure Next.js middleware?")
+- Requests code involving libraries ("Write a Prisma query for...")
+- Needs API references ("What are the Supabase auth methods?")
+- Mentions specific frameworks (React, Vue, Svelte, Express, Tailwind, etc.)
+
+## How to Fetch Documentation
+
+### Step 1: Resolve the Library ID
+
+Call `resolve-library-id` with:
+
+- `libraryName`: The library name extracted from the user's question
+- `query`: What to look up in the library's documentation (improves relevance ranking)
+
+### Step 2: Select the Best Match
+
+From the resolution results, choose based on:
+
+- Exact or closest name match to what the user asked for
+- Higher benchmark scores indicate better documentation quality
+- If the user mentioned a version (e.g., "React 19"), prefer version-specific IDs
+
+### Step 3: Fetch the Documentation
+
+Call `query-docs` with:
+
+- `libraryId`: The selected Context7 library ID (e.g., `/vercel/next.js`)
+- `query`: What to look up in the library's documentation, scoped to a single concept
+
+If the user's question spans multiple distinct concepts (e.g. routing and auth and caching), make a separate `query-docs` call per concept with the same library ID, unless the question is about how the concepts interact — combined queries dilute ranking and return shallow results for each topic.
+
+### Step 4: Use the Documentation
+
+Incorporate the fetched documentation into your response:
+
+- Answer the user's question using current, accurate information
+- Include relevant code examples from the docs
+- Cite the library version when relevant
+
+## Guidelines
+
+- **Be specific**: Describe what to look up in the library's documentation, but keep each query to a single concept
+- **One topic per query**: Split multi-topic questions into separate `query-docs` calls — resolve the library ID once, then query per concept, unless the question is about how the concepts interact
+- **Version awareness**: When users mention versions ("Next.js 15", "React 19"), use version-specific library IDs if available from the resolution step
+- **Prefer official sources**: When multiple matches exist, prefer official/primary packages over community forks