Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "context7",
"version": "1.0.0",
"description": "Up-to-date documentation and code examples for any library or framework using Context7 MCP server",
"author": {
"name": "Upstash",
"url": "https://github.com/upstash"
},
"homepage": "https://context7.com",
"repository": "https://github.com/upstash/context7",
"license": "MIT",
"keywords": [
"documentation",
"code-examples",
"mcp",
"context7",
"vibe-coding",
"library-docs"
],
"mcpServers": {
"context7": {
"command": "npx",
"args": [
"-y",
"@upstash/context7-mcp",
"--api-key",
"${CONTEXT7_API_KEY:-}"
],
"env": {
"CONTEXT7_API_KEY": "${CONTEXT7_API_KEY:-}"
}
}
}
}
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,30 @@ Pasting the following configuration into your Cursor `~/.cursor/mcp.json` file i

Run this command. See [Claude Code MCP docs](https://docs.anthropic.com/en/docs/claude-code/mcp) for more info.

#### Claude Code Plugin

Install as a Claude Code plugin with intelligent Context7 integration:

```sh
claude
/plugin marketplace add pleaseai/claude-code-plugins
/plugin install context7@pleaseai
```

This provides a skill that Claude automatically activates when needed. Claude will intelligently use Context7 MCP tools when working with external libraries, frameworks, or when you need up-to-date documentation - without requiring explicit activation.

The skill triggers automatically when you:
- Write code using external libraries
- Need library documentation or API references
- Set up or configure frameworks
- Request code examples with specific packages

Optionally set your API key for higher rate limits:

```sh
export CONTEXT7_API_KEY="your-api-key"
```

#### Claude Code Remote Server Connection

```sh
Expand Down
47 changes: 47 additions & 0 deletions skills/context7/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Library Documentation Lookup
description: Fetch up-to-date documentation and code examples for any library or framework using Context7. Use when writing code with external libraries, setting up tools, configuring frameworks, or needing current API documentation. Triggers on mentions of library names, npm packages, framework setup, API docs, or code generation requests.
allowed-tools: mcp__plugin_dev-tools_context7__resolve-library-id, mcp__plugin_dev-tools_context7__get-library-docs
---

# Context7 - Library Documentation

Always use Context7 MCP tools automatically when generating code, performing setup, or needing library documentation. **Do not wait for explicit user requests** - proactively fetch documentation when working with external libraries.

## When to Use Context7

Use Context7 automatically in these scenarios:

- **Code Generation**: Writing code that uses external libraries or frameworks
- **Setup & Configuration**: Setting up tools, libraries, or frameworks
- **API Documentation**: Needing current API documentation for any library
- **Best Practices**: Finding up-to-date examples and patterns

## How to Use

Follow this two-step process:

### 1. Resolve Library ID
```
Use mcp__plugin_dev-tools_context7__resolve-library-id
- Pass the library/package name
- Returns Context7-compatible library ID
```

### 2. Fetch Documentation
```
Use mcp__plugin_dev-tools_context7__get-library-docs
- Pass the library ID from step 1
- Optionally specify a topic to focus on
- Returns current documentation and examples
```

### 3. Apply Documentation
Use the fetched documentation to provide accurate, up-to-date code and guidance.

## Important Notes

- Context7 works without an API key (with rate limits)
- Set `CONTEXT7_API_KEY` environment variable for higher rate limits
- Always fetch documentation before generating code with external libraries
- Prefer Context7 over relying on training data for library-specific code