upstash

context7: Give AI Coding Tools Current Library Docs

Context7 retrieves version-aware library documentation and code examples for AI coding assistants, helping reduce outdated guidance and invented APIs. It offers both a CLI-and-skills setup and an MCP server integration.

View on GitHub Compare
Stars
62.6k
Forks
3k
Stars, last 30 days
+1,715

Our take

Health score

81/100

How it is scored
Activity
90
Community
83
Issues
77
Pull requests
73

+1,715 stars in the last 30 days

  • Releases more often than 93% of the projects we track
  • More contributors than 78% of the projects we track

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

64,710

Forks

3,242

Change since Nov 12, 2026: +76 stars·+1 forks

Overview

Context7 supplies AI coding assistants with current, library-specific documentation and code examples from its index. It addresses a common weakness of model-generated code: answers can rely on stale training data or describe APIs that do not exist in the relevant version.

It is intended for developers using coding agents who want documentation available in the prompt or through native MCP tools. The repository contains the MCP server source; the API backend, parsing engine, and crawling engine are private services.

Key Features

  • Retrieves documentation and examples relevant to a library and task.
  • Supports version-aware lookups when a version is specified in the prompt.
  • Offers a CLI workflow with ctx7 library for finding library IDs and ctx7 docs for fetching documentation.
  • Provides MCP tools to resolve library IDs and query documentation from compatible clients.
  • Supports both CLI-plus-skills and MCP setup modes for coding agents.
  • Includes a TypeScript SDK and integrations such as Vercel AI SDK tools.

Use Cases

  • An application developer asks an AI assistant for framework setup instructions and wants examples aligned with a particular version.
  • A team using Cursor or another coding agent wants documentation lookup available as part of its normal coding workflow.
  • An agent developer integrates library documentation retrieval into an MCP-enabled application.
  • A developer knows the target library and wants to query its docs directly by Context7 library ID rather than rely on a generic answer.

Getting Started

Requires Node.js 18 or newer for the CLI. Run the setup command, then follow the prompts to choose CLI-plus-skills or MCP mode:

npx ctx7 setup

See the repository README for manual client configuration and details.

Considerations

  • The hosted API, parsing engine, and crawling engine are not included in this repository.
  • A free API key is recommended for higher rate limits; the README does not specify rate-limit amounts.
  • Documentation indexed from community-contributed projects may be incomplete or inaccurate. Verify important details against the library's own sources.
  • CLI setup requires Node.js 18 or newer. MCP mode requires a compatible client and configuration.

Found this useful?

Share it with someone who would like context7.

Comparisons