Skip to content
Back to skills

Context7 Mcp

ASecurity

Always use Context7 MCP to fetch up-to-date library/API documentation before generating code that depends on external libraries or config. Use when the user asks for setup steps, configuration, or code involving third-party libraries. Prefer Context7 docs over memory. Include citations to the retrieved docs when possible.

  • 666 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 8, 2026
developmentbashreactnextjsfastapiapidatabasefrontendbackenddocumentation

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill context7-mcp --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Context7 Mcp?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Context7 Mcp
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-context7-mcp/badge)](https://www.skillsdirectory.com/skills/majiayu000-context7-mcp)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: context7-mcp
description: Always use Context7 MCP to fetch up-to-date library/API documentation before generating code that depends on external libraries or config. Use when the user asks for setup steps, configuration, or code involving third-party libraries. Prefer Context7 docs over memory. Include citations to the retrieved docs when possible.
---

# Context7 MCP (Up-to-date docs)

## Default behavior

Whenever the task involves any external library/framework:
- Next.js, React, Vite
- Supabase SDK
- PyMuPDF, pdfplumber
- Tailwind, shadcn/ui
- FastAPI, Pydantic
- Anthropic SDK
- Any npm/pip package

**Do this:**
1. Resolve the correct library ID in Context7
2. Pull the relevant docs snippet(s)
3. Only then generate code/config
4. If docs conflict with assumptions, prefer docs

## Setup (if not installed)

### Remote server (recommended)
```bash
claude mcp add --transport http context7 https://mcp.context7.com/mcp --header "CONTEXT7_API_KEY: YOUR_API_KEY"
```

### Local server (npx)
```bash
claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```

API key is optional for basic usage, but helps with rate limits/private repos.

## Available tools

### resolve-library-id
Find the correct library identifier:
```
Input: "react" or "fastapi"
Output: library ID to use with get-library-docs
```

### get-library-docs
Fetch documentation for a library:
```
Input: library ID + optional topic filter
Output: relevant documentation snippets
```

## Usage patterns

### Before writing code
```
1. User asks: "Add Supabase auth to the app"
2. Claude: resolve-library-id("supabase")
3. Claude: get-library-docs(id, topic="authentication")
4. Claude: Generate code based on current docs
```

### When docs conflict with memory
- Always prefer Context7 docs (more recent)
- Mention the source version when relevant
- If uncertain, cite the doc snippet

## Recommended rule (add to CLAUDE.md)

> "Always use Context7 when I need code generation, setup or configuration steps, or library/API documentation."

## Output requirements

When Context7 is used:
- State what library/topic was looked up
- Cite version if available
- Use precise, version-aware steps from docs

## Common libraries for DeepRead

| Library | Use case |
|---------|----------|
| `anthropic` | Claude API integration |
| `fastapi` | Backend API routes |
| `pydantic` | Data validation |
| `pymupdf` | PDF parsing |
| `react` | Frontend components |
| `vite` | Build tool |
| `tailwindcss` | Styling |
| `supabase-js` | Database client |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.