mirror of
https://github.com/upstash/context7.git
synced 2026-02-06 15:19:13 +00:00
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
---
|
||
title: Getting Started with Context7
|
||
sidebarTitle: Getting Started
|
||
---
|
||
|
||
Context7 brings up-to-date, version-specific documentation and code examples directly into your AI coding assistant. No more outdated examples or hallucinated APIs.
|
||
|
||
## ❌ Without Context7
|
||
|
||
LLMs rely on outdated or generic information about the libraries you use. You get:
|
||
|
||
- ❌ Code examples are outdated and based on year-old training data
|
||
- ❌ Hallucinated APIs that don't even exist
|
||
- ❌ Generic answers for old package versions
|
||
|
||
## ✅ With Context7
|
||
|
||
Context7 MCP pulls up-to-date, version-specific documentation and code examples straight from the source — and places them directly into your prompt.
|
||
|
||
Add `use context7` to your prompt in Cursor:
|
||
|
||
```txt
|
||
Create a Next.js middleware that checks for a valid JWT in cookies and redirects unauthenticated users to `/login`. use context7
|
||
```
|
||
|
||
```txt
|
||
Configure a Cloudflare Worker script to cache JSON API responses for five minutes. use context7
|
||
```
|
||
|
||
Context7 fetches up-to-date code examples and documentation right into your LLM's context.
|
||
|
||
- 1️⃣ Write your prompt naturally
|
||
- 2️⃣ Tell the LLM to `use context7`
|
||
- 3️⃣ Get working code answers
|
||
|
||
No tab-switching, no hallucinated APIs that don't exist, no outdated code generation.
|