Skip to content
Claudekit.ai

Context7: Up-to-Date Library Docs for Claude

Context7 by Upstash feeds Claude current, version-specific library documentation via MCP or a CLI skill. Setup for Claude Code, use cases, pros and cons.

By Claudekit Team Published 1 min read

Type
MCP Server
Pricing
Freemium
Repository
github.com
GitHub stars
63,561

Context7, from Upstash, gives coding agents current, version-specific documentation for libraries and frameworks. Instead of relying on training data that may predate the latest release, Claude looks up the docs for the exact library it is working with.

Install

The quickest route is the setup CLI (requires Node.js 22.13 or newer):

npx ctx7 setup --claude

It signs you in with OAuth, creates an API key, and lets you choose CLI + Skills mode (a skill that tells Claude to call ctx7 commands, no MCP needed) or MCP mode. Remove it later with npx ctx7 remove.

To configure MCP manually, point Claude Code at the hosted server and pass your key as a header:

claude mcp add --transport http context7 https://mcp.context7.com/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Context7 is also listed as a plugin in Anthropic’s official marketplace; see the plugins guide.

Use cases

Add “use context7” to a prompt, or set a rule so Claude uses it automatically:

How do I set up middleware in the latest Next.js? use context7
Write a Prisma migration for a many-to-many relation. use context7
  • Avoiding deprecated APIs in fast-moving frameworks.
  • Upgrades where the old and new versions differ.
  • Learning an unfamiliar library without pasting docs into chat.

Pros

  • Fixes the most common source of wrong code: outdated API knowledge.
  • Two modes, so you can skip MCP entirely if you prefer skills.
  • Free tier with an optional key for higher limits.

Cons

  • Depends on a third-party hosted service and its coverage of your library.
  • Retrieved docs add tokens to context.
  • Rate limits apply without a key.

Building your own docs workflow instead? See Claude Code skills and the MCP guide.

Frequently asked questions

Do I need an API key for Context7?

It is recommended. A free key from context7.com/dashboard gives higher rate limits, and the ctx7 setup command creates one for you through OAuth.

Do I have to type 'use context7' every time?

No. ctx7 setup installs a skill that triggers Context7 for library questions, or you can add a rule to your CLAUDE.md telling Claude to use it automatically.

MCP mode or CLI plus skills mode?

Both fetch the same docs. CLI plus skills avoids an always-connected MCP server; MCP mode exposes the lookup as tools. Pick whichever fits your setup.

Tool MCP Server

Exa MCP Server: AI-Native Web Search for Claude

Exa's MCP server gives Claude web search, clean page fetching and multi-step research agents through a hosted endpoint or Claude plugin. Setup, tools, caveats.

★ 5,162

Get the weekly Claude digest

New skills, MCP servers, prompts and Claude updates — one short email a week. No spam, unsubscribe anytime.

The newsletter is launching soon. Follow the RSS feed in the meantime.