$git clone https://github.com/upstash/context7LLMs rely on outdated or generic information about the libraries you use. You get:
| 1 |  |
| 2 | |
| 3 | [](https://cursor.com/en/install-mcp?name=context7&config=eyJ1cmwiOiJodHRwczovL21jcC5jb250ZXh0Ny5jb20vbWNwIn0%3D) |
| 4 | |
| 5 | # Context7 Platform - Up-to-date Code Docs For Any Prompt |
| 6 | |
| 7 | [](https://context7.com) [](https://smithery.ai/server/@upstash/context7-mcp) [](https://www.npmjs.com/package/@upstash/context7-mcp) [](./LICENSE) |
| 8 | |
| 9 | [](./i18n/README.zh-TW.md) [](./i18n/README.zh-CN.md) [](./i18n/README.ja.md) [](./i18n/README.ko.md) [](./i18n/README.es.md) [](./i18n/README.fr.md) [-purple>)](./i18n/README.pt-BR.md) [](./i18n/README.it.md) [](./i18n/README.id-ID.md) [](./i18n/README.de.md) [](./i18n/README.ru.md) [](./i18n/README.uk.md) [](./i18n/README.tr.md) [](./i18n/README.ar.md) [](./i18n/README.vi.md) |
| 10 | |
| 11 | ## ❌ Without Context7 |
| 12 | |
| 13 | LLMs rely on outdated or generic information about the libraries you use. You get: |
| 14 | |
| 15 | - ❌ Code examples are outdated and based on year-old training data |
| 16 | - ❌ Hallucinated APIs that don't even exist |
| 17 | - ❌ Generic answers for old package versions |
| 18 | |
| 19 | ## ✅ With Context7 |
| 20 | |
| 21 | Context7 pulls up-to-date, version-specific documentation and code examples straight from the source — and places them directly into your prompt. |
| 22 | |
| 23 | ```txt |
| 24 | Create a Next.js middleware that checks for a valid JWT in cookies |
| 25 | and redirects unauthenticated users to `/login`. use context7 |
| 26 | ``` |
| 27 | |
| 28 | ```txt |
| 29 | Configure a Cloudflare Worker script to cache |
| 30 | JSON API responses for five minutes. use context7 |
| 31 | ``` |
| 32 | |
| 33 | ```txt |
| 34 | Show me the Supabase auth API for email/password sign-up. |
| 35 | ``` |
| 36 | |
| 37 | Context7 fetches up-to-date code examples and documentation right into your LLM's context. No tab-switching, no hallucinated APIs that don't exist, no outdated code generation. |
| 38 | |
| 39 | Works in two modes: |
| 40 | |
| 41 | - **CLI + Skills** — installs a skill that guides your agent to fetch docs using `ctx7` CLI commands (no MCP required) |
| 42 | - **MCP** — registers a Context7 MCP server so your agent can call documentation tools natively |
| 43 | |
| 44 | ## Installation |
| 45 | |
| 46 | > [!NOTE] |
| 47 | > **API Key Recommended**: Get a free API key at [context7.com/dashboard](https://context7.com/dashboard) for higher rate limits. |
| 48 | |
| 49 | Set up Context7 for your coding agents with a single command. The `ctx7` CLI requires Node.js 18 or newer. |
| 50 | |
| 51 | ```bash |
| 52 | npx ctx7 setup |
| 53 | ``` |
| 54 | |
| 55 | Authenticates via OAuth, generates an API key, and installs the appropriate skill. You can choose between CLI + Skills or MCP mode. Use `--cursor`, `--claude`, or `--opencode` to target a specific agent. |
| 56 | |
| 57 | To remove the generated setup later, run `npx ctx7 remove`. If you globally installed the CLI with `npm install -g ctx |