Instant LLM Context for Agents and Developers
See the codeNOTE: This repo will be moved to https://github.com/upstash/context7-mcp
Instant LLM Context for AI Agents and Developers
Context7 is a robust platform designed to create, manage, and leverage context libraries for Large Language Models (LLMs), AI agents, and developers. It automatically pulls high-quality, targeted code snippets from documentation repositories, delivering them as ready-to-use context for AI systems. Built by the Upstash team, you can enjoy Context7 with confidence knowing it’s backed by proven expertise.
Key Benefits:
✅ Precise Context: Extracts clean, relevant snippets from up-to-date documentation
✅ Focused Content: Includes only code and descriptions—no fluff or filler
✅ Free Tier: Up to 50 queries per day for personal use at no cost
✅ Broad Compatibility: Works seamlessly with MCP servers (e.g., Cursor, Windsurf)
✅ Fast Integration: Generate library-specific context in minutes and embed Context7 links directly into your documentation
Context7 transforms documentation into actionable context through a streamlined pipeline:
Document Parsing: Supports a variety of formats:
.md, .mdx).txt).rst).ipynb)Context Extraction: Uses LLM models to pull code snippets and craft concise, descriptive metadata.
Embedding Generation: Converts snippets and metadata into vector embeddings for fast, accurate retrieval.
Contextual Retrieval: Delivers relevant code examples instantly via API or web interface.
Boost your docs with instant code examples by adding a Context7 link:
<a href="https://context7.com/YOUR_LIBRARY/llms.txt?tokenLimit=MAX_TOKEN_LIMIT" target="_blank">
See llms.txt with code examples
</a>
This keeps users in your documentation while giving them quick access to implementation snippets.
Head to context7.com/add-library and add your library via our simple web interface.
[!IMPORTANT]
Ensure the repo includes the documentation files of the library with md/mdx/txt/rst/ipynb format.
{
"settings": {
"library": "library-name", // Unique, URL-friendly identifier
"title": "Human-Readable Title", // Display name
"docsRepoUrl": "https://github.com/organization/repo",
"folders": ["docs"], // Optional: folders to include
"excludeFolders": ["archive", "old"] // Optional: folders to exclude
},
"version": {
"lastUpdate": "2023-03-25", // ISO 8601 timestamp
"totalTokens": 0, // Set by system after processing
"totalPages": 0, // Set by system after processing
"totalSnippets": 0, // Set by system after processing
"averageTokens": 0, // Set by system after processing
"parseDuration": 0, // Set by system after processing
"state": "initial", // Initial state for new libraries
"errorCount": 0 // Set by system after processing
}
}
| State | Description |
|---|---|
initial | Library created, not yet processed |
parsed | Documentation parsed, not yet finalized |
finalized | Fully processed and ready to use |
error | Processing hit an error |
invalid_docs | Docs couldn’t be parsed correctly |
stop | Processing halted manually |
delete | Library slated for removal |
Coming soon!
We’d love your input! See our contribution guidelines to get started.
Help us improve by reporting bugs or suggesting features here.
Instant LLM Context for Agents and Developers
See the codeNOTE: This repo will be moved to https://github.com/upstash/context7-mcp
Instant LLM Context for AI Agents and Developers
Context7 is a robust platform designed to create, manage, and leverage context libraries for Large Language Models (LLMs), AI agents, and developers. It automatically pulls high-quality, targeted code snippets from documentation repositories, delivering them as ready-to-use context for AI systems. Built by the Upstash team, you can enjoy Context7 with confidence knowing it’s backed by proven expertise.
Key Benefits:
✅ Precise Context: Extracts clean, relevant snippets from up-to-date documentation
✅ Focused Content: Includes only code and descriptions—no fluff or filler
✅ Free Tier: Up to 50 queries per day for personal use at no cost
✅ Broad Compatibility: Works seamlessly with MCP servers (e.g., Cursor, Windsurf)
✅ Fast Integration: Generate library-specific context in minutes and embed Context7 links directly into your documentation
Context7 transforms documentation into actionable context through a streamlined pipeline:
Document Parsing: Supports a variety of formats:
.md, .mdx).txt).rst).ipynb)Context Extraction: Uses LLM models to pull code snippets and craft concise, descriptive metadata.
Embedding Generation: Converts snippets and metadata into vector embeddings for fast, accurate retrieval.
Contextual Retrieval: Delivers relevant code examples instantly via API or web interface.
Boost your docs with instant code examples by adding a Context7 link:
<a href="https://context7.com/YOUR_LIBRARY/llms.txt?tokenLimit=MAX_TOKEN_LIMIT" target="_blank">
See llms.txt with code examples
</a>
This keeps users in your documentation while giving them quick access to implementation snippets.
Head to context7.com/add-library and add your library via our simple web interface.
[!IMPORTANT]
Ensure the repo includes the documentation files of the library with md/mdx/txt/rst/ipynb format.
{
"settings": {
"library": "library-name", // Unique, URL-friendly identifier
"title": "Human-Readable Title", // Display name
"docsRepoUrl": "https://github.com/organization/repo",
"folders": ["docs"], // Optional: folders to include
"excludeFolders": ["archive", "old"] // Optional: folders to exclude
},
"version": {
"lastUpdate": "2023-03-25", // ISO 8601 timestamp
"totalTokens": 0, // Set by system after processing
"totalPages": 0, // Set by system after processing
"totalSnippets": 0, // Set by system after processing
"averageTokens": 0, // Set by system after processing
"parseDuration": 0, // Set by system after processing
"state": "initial", // Initial state for new libraries
"errorCount": 0 // Set by system after processing
}
}
| State | Description |
|---|---|
initial | Library created, not yet processed |
parsed | Documentation parsed, not yet finalized |
finalized | Fully processed and ready to use |
error | Processing hit an error |
invalid_docs | Docs couldn’t be parsed correctly |
stop | Processing halted manually |
delete | Library slated for removal |
Coming soon!
We’d love your input! See our contribution guidelines to get started.
Help us improve by reporting bugs or suggesting features here.