Files
Wesam Abousaid a3f328c043 docs: refresh for OpenCode v1.17.13, add Go coverage, and rebrand
- Bump every version pin, pricing table, and model ID to the verified
  2026-07-05 state (v1.17.13): Claude Fable 5 / Sonnet 5 on Zen, new
  free tier, deprecation sunset table, v1.17.x changelog section
- Cover gaps: OpenCode Go vs Zen billing, Anthropic subscription-login
  removal (PR #18186), MCP resources, --mini mode, --auto flag, yolo mode
- Fix correctness bugs: command-template !`cmd` syntax in docs and
  .opencode/commands, protect-secrets regex missing 'cat .env', dual
  plugin exports, quickstart PATH fix, Playwright MCP flags, ctrl+d
  keybind conflict, agent/command required-field claims
- Fix links: cursor.com, windsurf.com, platform.claude.com,
  code.claude.com, opencode.ai/discord, Vercel Grep announcement
- Rebrand: banner (Images/banner.svg), 1280x640 social preview asset,
  hero redesign with star CTA, ecosystem stats, private vulnerability
  reporting channel, CI-matching local checks, MD060 lint opt-out
2026-07-05 14:11:51 +02:00

3.2 KiB

Context7 MCP

Live, version-pinned library documentation piped into the prompt. Grounds OpenCode's answers in current API surfaces — not training-data approximations.

Why this matters

LLMs hallucinate APIs that don't exist or use APIs that were deprecated three versions ago. Context7 fetches real documentation for the libraries you're using at the version you're using, and surfaces it to the model.

When to reach for it

  • Working with a library you don't know well
  • Working with a library that's recently changed (new React versions, framework migrations)
  • Debugging "this function should exist but it doesn't" confusion
  • Writing code for SDKs/APIs the model's training data doesn't cover well

Setup

An API key is optional — the server works without one, but signing up at context7.com for a free key is recommended for higher rate limits.

Add to opencode.json (drop the headers block if you're going keyless):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "context7": {
      "type": "remote",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "CONTEXT7_API_KEY": "{env:CONTEXT7_API_KEY}"
      }
    }
  }
}

If you use a key, set the env var in your shell:

export CONTEXT7_API_KEY=ctx7_...

Restart OpenCode. Verify:

opencode mcp list

Example prompts

use context7 to look up the React Router v7 docs for `loader` functions —
specifically how to handle redirects from a loader
I'm migrating from Next.js 15 to 16. Use context7 to find the breaking
changes in the App Router and surface the ones that affect our project.
use context7 to check the latest Stripe API for the recommended way to
handle webhook signature verification with raw bodies

Resolve before you query

Context7 resolves a library name + version before fetching docs. Patterns that work:

context7: resolve "next.js" v15 — then look up streaming rendering
context7: resolve "tailwindcss" v4 — show me the breaking changes from v3

You can also just name the library; Context7 will resolve to the latest version it knows.

What it covers

Thousands of libraries — React, Next.js, Vue, Angular, Svelte, Tailwind, TanStack, Prisma, Drizzle, Hono, Fastify, Express, Django, FastAPI, Spring, Rails, etc. — plus most major SaaS SDKs (Stripe, Twilio, Sentry, etc.).

What it won't do

  • Cover your private code or internal docs (use Memory MCP or a custom internal MCP for that)
  • Replace reading the actual codebase (it grounds in docs, not your usage)
  • Cover obscure libraries with no real documentation

Gotchas

  • Rate limits without a key — the keyless endpoint works but is rate-limited more aggressively. A free API key raises the limits.
  • Token budget — Context7 returns chunks of docs; very chatty queries can push past your context window. Be specific in what you ask for.
  • Version drift — pin the version explicitly when your repo's package.json is behind latest.

Resources