context7_mcp
Historic directory skill
- License 许可
- MIT
- 最近更新
- 2026-10-09
- Stars
- ★ 2
- Forks
- 1
01 前言 Front Matter
- name
- context7_mcp
- keywords
- [ "context7_mcp", "ingested" ]
- description
- Historic directory skill
- mcp_compatible
- true
03 SKILL.md 正文
Context7 — Up-to-date Code Docs for LLMs
Source: http~/.seosona/path/ Ingested: 2026-06-10 Type: Reference (MCP Server / AI Development Tool) License: MIT Author: Upstash NPM:
@upstash/context7-mcp
Overview
Context7 is a platform that provides up-to-date, version-specific documentation and code examples directly into LLM prompts. It solves three critical problems with AI code generation:
- ❌ Outdated code examples based on year-old training data
- ❌ Hallucinated APIs that don't even exist
- ❌ Generic answers for old package versions
With Context7, LLMs receive current, accurate documentation straight from the source — no tab-switching, no hallucinated APIs, no outdated code.
How It Works
Two Modes of Operation
| Mode | Description | Requirement |
|---|---|---|
| CLI + Skills | Installs a skill that guides agents to fetch docs using ctx7 CLI commands |
Node.js 18+ |
| MCP | Registers a Context7 MCP server so agents can call documentation tools natively | MCP-compatible client |
Usage Example
Create a Next.js middleware that checks for a valid JWT in cookies
and redirects unauthenticated users to `/login`. use context7
Adding "use context7" to any prompt triggers the system to fetch real-time documentation for the mentioned libraries.
Installation
# One-command setup (interactive)
npx ctx7 setup
# Target a specific agent
npx ctx7 setup --cursor
npx ctx7 setup --claude
npx ctx7 setup --opencode
# Remove setup
npx ctx7 remove
The setup command:
- Authenticates via OAuth
- Generates an API key
- Installs the appropriate skill (CLI or MCP mode)
API Key
- Free tier available at context7.com/dashboard
- Recommended for higher rate limits
MCP Server Configuration
For use in SEOSONA OS or any MCP-compatible AI tool:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"],
"env": {
"CONTEXT7_API_KEY": "${CONTEXT7_API_KEY}"
}
}
}
}
Architecture
| Component | Detail |
|---|---|
| Data Source | Crawled official documentation from 1000+ libraries |
| Delivery | MCP protocol or CLI-based context injection |
| Client Support | Cursor, Claude CLI, OpenCode, VS Code, Windsurf, etc. |
| Versioning | Version-specific docs (not just latest) |
| Caching | Server-side caching for fast retrieval |
Key Design Patterns (Learnable)
- MCP-Native Documentation Delivery: Instead of embedding all docs in system prompts, Context7 uses MCP tools to fetch relevant docs on-demand — dramatically reducing token usage while improving accuracy.
- Dual-Mode Architecture: Supporting both CLI (for agents without MCP) and MCP (for native integration) ensures maximum compatibility across the AI tool ecosystem.
- "use context7" Trigger Pattern: A natural-language trigger phrase that activates documentation retrieval — elegant UX pattern for optional tool activation.
- OAuth-Based Setup: Single
npx ctx7 setupcommand handles auth + key generation + skill installation — a gold standard for developer onboarding.
SEOSONA Relevance Assessment
- Skillize? ❌ No — This is a hosted SaaS platform with its own MCP server, not a self-contained script.
- Agentize? ❌ No — Not requested by user.
- Reference Value: ✅ Very High — Context7 is directly relevant to SEOSONA's MCP infrastructure. The MCP server pattern and the "fetch docs on demand" approach could be adapted for SEOSONA's own documentation delivery system.
- Classification:
ingested_data/reference only.
SEOSONA Integration
Context7 is already referenced in SEOSONA's MCP configuration. To activate:
- Add
CONTEXT7_API_KEYto1_CONFIG/.env(already included) - Register the MCP server in your IDE's MCP config:
{ "context7": { "command": "npx", "args": ["-y", "@upstash/context7-mcp"], "env": { "CONTEXT7_API_KEY": "${CONTEXT7_API_KEY}" } } } - Use "use context7" in prompts to fetch live documentation
04 同仓库更多 Skills
web_crawler_katana
High-speed web crawling using Katana patterns for deep site mapping, URL discovery, and content extraction.
server_log_analyzer
Analyzes Nginx/Apache server logs to identify Googlebot crawl patterns, errors, and performance bottlenecks.
schema_markup_generator
Auto-generates JSON-LD structured data for any page type (Article, Product, FAQ, LocalBusiness, etc.).
internal_linking_optimizer
Analyzes and optimizes the internal link graph of a website for SEO authority distribution.
google_trends_analyzer
Detects trending topics and seasonal patterns using Google Trends data for content planning and keyword strategy.
brand_context_analyzer
Tracks brand mentions, sentiment, and online reputation across web sources.