Context7 integrates with OpenCode to provide current library documentation instead of relying on training data. Get accurate, up-to-date code examples directly in your coding sessions.Documentation Index
Fetch the complete documentation index at: https://context7.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
For more details on MCP server configuration in OpenCode, see the OpenCode MCP documentation.
Installation
Run the setup command to configure Context7 for OpenCode:Using Context7
Withctx7 setup, a skill is installed that triggers automatically when you ask about libraries. You can also invoke it explicitly:
AGENTS.md file:
AGENTS.md
Tips
Getting Better Results
Getting Better Results
- Be specific about what you’re trying to do, not just which library
- Mention versions when they matter
- If the first result isn’t right, ask for a different part of the docs
Project-Level Configuration
Project-Level Configuration
You can place your
opencode.json in your project directory to have project-specific configurations. This is useful when:- Different projects need different API keys
- You want to share the config with your team via version control
- A project requires specific Context7 settings