Skip to content

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

fix copilot cli plugin compatability (#2743)

Enes Gules06843a6b8450
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index d6335687..933b6f60 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -5,10 +5,10 @@
},
"plugins": [
{
- "name": "context7-plugin",
+ "name": "context7",
"source": "./plugins/claude/context7",
"description": "Up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.",
- "version": "1.0.0"
+ "version": "1.0.1"
}
]
}
diff --git a/.github/plugin/marketplace.json b/.github/plugin/marketplace.json
new file mode 100644
index 00000000..854b3179
--- /dev/null
+++ b/.github/plugin/marketplace.json
@@ -0,0 +1,18 @@
+{
+ "name": "context7-marketplace",
+ "owner": {
+ "name": "Upstash"
+ },
+ "metadata": {
+ "description": "Official Upstash marketplace for the Context7 documentation-lookup plugin on GitHub Copilot CLI.",
+ "version": "1.0.0"
+ },
+ "plugins": [
+ {
+ "name": "context7",
+ "source": "./plugins/copilot/context7",
+ "description": "Up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.",
+ "version": "1.0.1"
+ }
+ ]
+}
diff --git a/.gitignore b/.gitignore
index da1bf49c..285bbde0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -171,7 +171,6 @@ dist
# IntelliJ based IDEs
.idea
-.mcp.json
.cursor
!plugins/cursor/context7/.cursor
.opencode
diff --git a/docs/clients/claude-code.mdx b/docs/clients/claude-code.mdx
index f8289582..7c92ff20 100644
--- a/docs/clients/claude-code.mdx
+++ b/docs/clients/claude-code.mdx
@@ -67,7 +67,7 @@ The plugin is available from the Context7 marketplace. Run these commands in Cla
```
/plugin marketplace add upstash/context7
-/plugin install context7-plugin@context7-marketplace
+/plugin install context7@context7-marketplace
```
This adds the Context7 marketplace and installs the plugin with skills, agents, and commands.
diff --git a/docs/clients/copilot-cli.mdx b/docs/clients/copilot-cli.mdx
new file mode 100644
index 00000000..e58c5bc5
--- /dev/null
+++ b/docs/clients/copilot-cli.mdx
@@ -0,0 +1,125 @@
+---
+title: GitHub Copilot CLI
+description: Using Context7 with GitHub Copilot CLI
+---
+
+Context7 integrates with [GitHub Copilot CLI](https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli) to provide current library documentation instead of relying on training data. The Context7 plugin ships the MCP server together with a skill, an agent, and a command, so documentation lookups work out of the box.
+
+## Installation
+
+Add the Context7 marketplace and install the plugin:
+
+```bash
+copilot plugin marketplace add upstash/context7
+copilot plugin install context7@context7-marketplace
+```
+
+You can also run the same steps from an interactive session with `/plugin marketplace add upstash/context7` and `/plugin install context7@context7-marketplace`.
+
+For manual MCP configuration (for example, to add an API key for higher rate limits), see [All MCP Clients](/resources/all-clients). Create or manage API keys in the [Context7 dashboard](https://context7.com/dashboard).
+
+---
+
+## What's Included
+
+<CardGroup cols={2}>
+<Card title="MCP Server" icon="server">
+The tools for fetching documentation (`resolve-library-id`, `query-docs`)
+</Card>
+<Card title="Skills" icon="sparkles">
+Auto-triggers documentation lookups when you ask about libraries
+</Card>
+<Card title="Agents" icon="robot">
+A `docs-researcher` agent for focused lookups that keep context lean
+</Card>
+<Card title="Commands" icon="terminal">
+`/context7:docs` for manual documentation queries
+</Card>
+</CardGroup>
+
+---
+
+## Using Context7
+
+The bundled skill triggers automatically when you ask about libraries — no need to say "use context7". You can also invoke it explicitly:
+
+```
+use context7 to show me how to set up middleware in Next.js 15
+use context7 for Prisma query examples with relations
+use context7 for the Supabase syntax for row-level security
+```
+
+If you know the library ID, use it directly to skip resolution:
+
+```
+use context7 with /supabase/supabase for authentication docs
+use context7 with /vercel/next.js for app router setup
+```
+
+### Skills
+
+The documentation lookup skill recognizes when documentation would help and fetches it automatically.
+
+<AccordionGroup>
+<Accordion title="What triggers the skill">
+- Setup questions: "How do I configure Next.js middleware?"
+- Code generation: "Write a Prisma query for user relations"
+- API references: "What are the Supabase auth methods?"
+- Framework mentions: React, Vue, Svelte, Express, Tailwind, etc.
+</Accordion>
+<Accordion title="How it works">
+1. **Resolve**: Finds the library ID using `resolve-library-id` with your question as context
+2. **Select**: Picks the best match based on name accuracy and quality scores
+3. **Fetch**: Calls `query-docs` with the library ID and your specific question
+4. **Return**: Provides code examples and explanations from current documentation
+</Accordion>
+</AccordionGroup>
+
+### Agents
+
+When you're in the middle of a long task and don't want documentation tool calls cluttering your context, use the `docs-researcher` agent. It runs in a separate context and returns just the answer:
+
+```bash
+copilot --agent docs-researcher -p "how do I set up Prisma with PostgreSQL?"
+```
+
+| Scenario | Use |
+|----------|-----|
+| Deep into a task with long context | Agent |
+| Want to avoid context bloat | Agent |
+| Context is short | Inline tools |
+| Want docs visible in conversation | Inline tools |
+
+### Commands
+
+`/context7:docs` is a manual command for documentation lookups.
+
+**Format:**
+```
+/context7:docs <library> [query]
+```
+
+**Examples:**
+
+<Tabs>
+<Tab title="Basic" icon="search">
+```
+/context7:docs react hooks
+/context7:docs next.js authentication
+/context7:docs prisma relations
+```
+</Tab>
+<Tab title="With Library ID" icon="link">
+```
+/context7:docs /vercel/next.js app router
+/context7:docs /supabase/supabase row level security
+```
+
+Using a library ID directly skips the resolution step.
+</Tab>
+</Tabs>
+
+**When to use:**
+- You know exactly which library and topic you need
+- You want a quick lookup without explaining your full context
+- You're testing what documentation is available
diff --git a/docs/docs.json b/docs/docs.json
index 084eb2d4..0d96ec92 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -94,6 +94,7 @@
"pages": [
"clients/claude-code",
"clients/codex",
+ "clients/copilot-cli",
"clients/cursor",
"clients/opencode",
"clients/pi",
diff --git a/docs/resources/all-clients.mdx b/docs/resources/all-clients.mdx
index b56e9a51..29bae380 100644
--- a/docs/resources/all-clients.mdx
+++ b/docs/resources/all-clients.mdx
@@ -735,7 +735,7 @@ See the [official GitHub documentation](https://docs.github.com/en/copilot/how-t
<Accordion title="Copilot CLI">
-Open `~/.copilot/mcp-config.json` and add:
+The easiest way is the Context7 plugin, which bundles the MCP server with a skill, an agent, and a command — see [GitHub Copilot CLI](/clients/copilot-cli). For manual configuration, open `~/.copilot/mcp-config.json` and add:
```json
{
diff --git a/plugins/claude/context7/.claude-plugin/plugin.json b/plugins/claude/context7/.claude-plugin/plugin.json
index ed65ab9f..a53438cb 100644
--- a/plugins/claude/context7/.claude-plugin/plugin.json
+++ b/plugins/claude/context7/.claude-plugin/plugin.json
@@ -1,5 +1,5 @@
{
- "name": "context7-plugin",
+ "name": "context7",
"description": "Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.",
"author": {
"name": "Upstash"
diff --git a/plugins/claude/context7/.mcp.json b/plugins/claude/context7/.mcp.json
index 989effd5..c5280c5f 100644
--- a/plugins/claude/context7/.mcp.json
+++ b/plugins/claude/context7/.mcp.json
@@ -1,6 +1,8 @@
{
- "context7": {
- "type": "http",
- "url": "https://mcp.context7.com/mcp"
+ "mcpServers": {
+ "context7": {
+ "type": "http",
+ "url": "https://mcp.context7.com/mcp"
+ }
}
}
diff --git a/plugins/claude/context7/README.md b/plugins/claude/context7/README.md
index 48a88e90..6847148f 100644
--- a/plugins/claude/context7/README.md
+++ b/plugins/claude/context7/README.md
@@ -17,7 +17,7 @@ Add the marketplace and install the plugin:
```bash
claude plugin marketplace add upstash/context7
-claude plugin install context7-plugin@context7-marketplace
+claude plugin install context7@context7-marketplace
```
## Available Tools
diff --git a/plugins/copilot/context7/.mcp.json b/plugins/copilot/context7/.mcp.json
new file mode 100644
index 00000000..c5280c5f
--- /dev/null
+++ b/plugins/copilot/context7/.mcp.json
@@ -0,0 +1,8 @@
+{
+ "mcpServers": {
+ "context7": {
+ "type": "http",
+ "url": "https://mcp.context7.com/mcp"
+ }
+ }
+}
diff --git a/plugins/copilot/context7/README.md b/plugins/copilot/context7/README.md
new file mode 100644
index 00000000..f2cbf3a0
--- /dev/null
+++ b/plugins/copilot/context7/README.md
@@ -0,0 +1,73 @@
+# Context7 Plugin for GitHub Copilot CLI
+
+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
+
+This plugin provides:
+
+- **MCP Server** - Connects Copilot CLI to Context7's documentation service
+- **Skills** - Auto-triggers documentation lookups when you ask about libraries
+- **Agents** - A dedicated `docs-researcher` agent for focused lookups
+- **Commands** - `/context7:docs` for manual documentation queries
+
+## Installation
+
+Add the marketplace and install the plugin:
+
+```bash
+copilot plugin marketplace add upstash/context7
+copilot plugin install context7@context7-marketplace
+```
+
+## 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?"
+
+For manual lookups, use the command:
+
+```
+/context7:docs next.js app router
+/context7:docs /vercel/next.js/v15.1.8 middleware
+```
+
+Or use the docs-researcher agent when you want to keep your main context clean:
+
+```bash
+copilot --agent docs-researcher -p "look up Supabase auth methods"
+```
+
+## 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/copilot/context7/agents/docs-researcher.agent.md b/plugins/copilot/context7/agents/docs-researcher.agent.md
new file mode 100644
index 00000000..424de063
--- /dev/null
+++ b/plugins/copilot/context7/agents/docs-researcher.agent.md
@@ -0,0 +1,39 @@
+---
+name: docs-researcher
+description: Lightweight agent for fetching library documentation without cluttering your main conversation context.
+---
+
+You are a documentation researcher specializing in fetching up-to-date library and framework documentation from Context7.
+
+## Your Task
+
+When given a question about a library or framework, fetch the relevant documentation and return a concise, actionable answer with code examples.
+
+## Process
+
+1. **Identify the library**: Extract the library/framework name from the user's question.
+
+2. **Resolve the library ID**: Call `resolve-library-id` with:
+ - `libraryName`: The library name (e.g., "react", "next.js", "prisma")
+ - `query`: The user's full question for relevance ranking
+
+3. **Select the best match**: From the results, pick the library with:
+ - Exact or closest name match
+ - Highest benchmark score
+ - Appropriate version if the user specified one (e.g., "React 19" → look for v19.x)
+
+4. **Fetch documentation**: Call `query-docs` with:
+ - `libraryId`: The selected Context7 library ID (e.g., `/vercel/next.js`)
+ - `query`: The user's specific question for targeted results
+
+5. **Return a focused answer**: Summarize the relevant documentation with:
+ - Direct answer to the question
+ - Code examples from the docs
+ - Links or references if available
+
+## Guidelines
+
+- Pass the user's full question as the query parameter for better relevance
+- When the user mentions a version (e.g., "Next.js 15"), use version-specific library IDs if available
+- If `resolve-library-id` returns multiple matches, prefer official/primary packages over community forks
+- Keep responses concise - the goal is to answer the question, not dump entire documentation
diff --git a/plugins/copilot/context7/commands/docs.md b/plugins/copilot/context7/commands/docs.md
new file mode 100644
index 00000000..a4cefa3a
--- /dev/null
+++ b/plugins/copilot/context7/commands/docs.md
@@ -0,0 +1,44 @@
+---
+description: Look up documentation for any library
+---
+
+# /context7:docs
+
+Fetches up-to-date documentation and code examples for a library.
+
+## Usage
+
+```
+/context7:docs <library> [query]
+```
+
+- **library**: The library name, or a Context7 ID starting with `/`
+- **query**: What you're looking for (optional but recommended)
+
+## Examples
+
+```
+/context7:docs react hooks
+/context7:docs next.js authentication
+/context7:docs prisma relations
+/context7:docs /vercel/next.js/v15.1.8 app router
+/context7:docs /supabase/supabase row level security
+```
+
+## How It Works
+
+1. If the library starts with `/`, it's used directly as the Context7 ID
+2. Otherwise, `resolve-library-id` finds the best matching library
+3. `query-docs` fetches documentation relevant to your query
+4. Results include code examples and explanations
+
+## Version-Specific Lookups
+
+Include the version in the library ID for pinned documentation:
+
+```
+/context7:docs /vercel/next.js/v15.1.8 middleware
+/context7:docs /facebook/react/v19.0.0 use hook
+```
+
+This is useful when you're working with a specific version and want docs that match exactly.
diff --git a/plugins/copilot/context7/plugin.json b/plugins/copilot/context7/plugin.json
new file mode 100644
index 00000000..0c62e213
--- /dev/null
+++ b/plugins/copilot/context7/plugin.json
@@ -0,0 +1,15 @@
+{
+ "name": "context7",
+ "description": "Upstash Context7 MCP server for up-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.",
+ "version": "1.0.1",
+ "author": {
+ "name": "Upstash"
+ },
+ "license": "MIT",
+ "keywords": ["documentation", "context", "mcp", "library-docs"],
+ "repository": "https://github.com/upstash/context7",
+ "agents": "agents/",
+ "skills": "skills/",
+ "commands": "commands/",
+ "mcpServers": ".mcp.json"
+}
diff --git a/plugins/copilot/context7/skills/context7-mcp/SKILL.md b/plugins/copilot/context7/skills/context7-mcp/SKILL.md
new file mode 100644
index 00000000..234659d9
--- /dev/null
+++ b/plugins/copilot/context7/skills/context7-mcp/SKILL.md
@@ -0,0 +1,53 @@
+---
+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`: The user's full question (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`: The user's specific question
+
+### 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**: Pass the user's full question as the query for better results
+- **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