Context7 is an MCP (Model Context Protocol) server that provides real-time access to up-to-date library documentation and code examples directly to AI coding assistants. It retrieves current documentation from source repositories instead of relying on potentially outdated LLM training data.
Repository: https://github.com/upstash/context7
AI assistants often hallucinate non-existent APIs, incorrect parameters, and obsolete patterns when working with Cesium due to outdated training data. Context7 solves this by fetching current, version-specific documentation in real-time.
The following Cesium-related documentation sources are available through Context7:
| Documentation | Original | Context7 | Context7 Library ID |
|---|---|---|---|
| CesiumJS API Reference | CesiumJS API | Context7 CesiumJS | /websites/cesium_learn_cesiumjs |
| Cesium Repository | GitHub cesium | Context7 cesium | /cesiumgs/cesium |
| Cesium for Unreal | GitHub cesium-unreal | Context7 cesium-unreal | /cesiumgs/cesium-unreal |
| Cesium for Unity | GitHub cesium-unity | Context7 cesium-unity | /cesiumgs/cesium-unity |
| 3D Tiles Specification | OGC 3D Tiles | Context7 3D Tiles | /websites/ogc_cs_22-025r4 |
VS Code Configuration
Add to your MCP settings (.vscode/mcp.json):
Remote Server:
"mcp": {
"servers": {
"context7": {
"type": "http",
"url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "YOUR_API_KEY"
}
}
}
}Local NPX:
Use open source @upstash/context7-mcp library.
"mcp": {
"servers": {
"context7": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
}
}
}Claude Code Configuration
Remote Server:
claude mcp add --header "CONTEXT7_API_KEY: YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcpLocal NPX:
claude mcp add context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEYOther MCP Clients
Context7 supports 30+ MCP clients beyond VS Code and Claude Desktop, including Cursor, Zed, Cline, and more. For a complete list of supported clients and their configuration instructions, see the All MCP Clients documentation.
The Free plan includes access to public repositories, basic access control, and 1,000 API calls per month.
Get your free API key: https://context7.com/dashboard
Append use context7 to prompts when you need current Cesium documentation:
Create a Cesium Viewer with Bing Maps imagery. use context7
Create a Cesium Viewer with terrain enabled and Ion asset access.
use library /websites/cesium_learn_cesiumjs
Expected result: Current Viewer constructor with proper terrain configuration and Ion integration.
How do I implement custom post-processing effects in CesiumJS?
use library /cesiumgs/cesium
Expected result: Source code examples and implementation patterns from the Cesium repository.
Set up a Cesium3DTileset in Unreal Engine and configure georeference settings.
use library /cesiumgs/cesium-unreal
Expected result: Unreal-specific integration code using ACesium3DTileset and ACesiumGeoreference.
Add a Cesium3DTileset component to a GameObject and configure camera controls.
use library /cesiumgs/cesium-unity
Expected result: Unity-specific C# code with Cesium3DTileset and CesiumCameraController components.
Explain the tile refinement strategy for REPLACE and ADD in 3D Tiles 1.1.
use library /websites/ogc_cs_22-025r4
Expected result: Specification-compliant explanation of refinement strategies and schema details.
Some questions require information from multiple sources. Make separate queries with different library IDs:
How does CesiumJS implement 3D Tiles batched content, and what are the specification requirements?
1. Query /cesiumgs/cesium for implementation details
2. Query /websites/ogc_cs_22-025r4 for specification requirements
Other examples requiring multiple documents:
- Unreal + CesiumJS: "How do I load custom 3D Tiles in Unreal Engine?" (query both
/cesiumgs/cesium-unrealand/websites/ogc_cs_22-025r4) - Cross-platform: "What are the differences in georeference setup between Unreal and Unity?" (query both
/cesiumgs/cesium-unrealand/cesiumgs/cesium-unity)
Agent Skills provide automatic activation based on context, without needing to type "use context7" or manually select instructions.
-
Create the skill directory structure:
.github/skills/cesium-context7 -
Copy the skill content from SKILL.md to
.github/skills/cesium-context7/SKILL.md -
Enable the
chat.useAgentSkillssetting in VS Code
The skill will automatically activate when you ask Cesium-related questions.
To use Context7 across all your projects:
- Copy the skill to
~/.copilot/skills/cesium-context7/SKILL.md - The skill will be available in all workspaces
See VS Code Agent Skills documentation for details.
-
Create the skill directory
.claude/skills/cesium-context7 -
Copy the skill content from SKILL.md to
.claude/skills/context7/SKILL.md
The skill will automatically activate when relevant or can be invoked with /context7.
Copy the skill to ~/.claude/skills/context7/SKILL.md for availability across all projects.
See Claude Code Skills documentation for details.
For AI assistants that don't support Agent Skills, use custom instructions or predefined prompts instead.
Context7 exposes two MCP tools:
Search for libraries and retrieve their Context7 library IDs.
Parameters:
libraryName(string): Name of the library to searchquery(string, optional): Additional search context
Example:
Find the Context7 library ID for CesiumJS
Retrieve documentation for a specific library and query.
Parameters:
libraryId(string): Context7 library ID (e.g.,/CesiumGS/cesium)query(string): Documentation query or topicversion(string, optional): Specific library version
Example:
Get documentation for Cesium Viewer initialization using library /CesiumGS/cesium
- Context7 Documentation: https://context7.com/docs
- GitHub Repository: https://github.com/upstash/context7
- Dashboard: https://context7.com/dashboard
- Cesium API Reference: https://cesium.com/learn/cesiumjs/ref-doc/
- Cesium Forum: https://community.cesium.com/