Loomal

Context7 MCP server in Cline.

Cline writes whole features autonomously — which makes stale API knowledge expensive. Wire up Context7 through cline_mcp_settings.json and every run can check current library docs first.

An autonomous coder that's wrong about a library API doesn't just give you a bad answer — it builds on the mistake for ten more steps before tests catch it. That's why Context7 (from Upstash, 57.1k stars on GitHub, the most popular MCP server in the official ecosystem) is such a strong fit for Cline: it lets the agent fetch current, version-accurate docs and examples before it writes against a dependency.

Cline keeps MCP configuration in its own file, cline_mcp_settings.json, reachable through the extension's panel. Setup takes a couple of minutes; the bigger win is the auto-approve setting covered below.

How Cline uses Context7 in a task

Context7 exposes a library-ID resolution tool and a docs-fetching tool. During a run, Cline can resolve 'supabase' to its Context7 ID, pull the docs for the auth topic, and then write code that matches the current SDK — instead of an older signature from training data. On greenfield tasks involving fast-moving frameworks, this single lookup regularly saves an entire debug cycle.

The npm package is @upstash/context7-mcp; the docs come from Context7's hosted service, so the lookups need network access.

Add the server in Cline's settings file

Open the Cline panel in VS Code, click the MCP Servers icon, then Configure MCP Servers — that opens cline_mcp_settings.json (its real home is deep inside VS Code's globalStorage under saoudrizwan.claude-dev/settings/, which is why the button beats hunting for it). Add:

cline_mcp_settings.json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"],
      "disabled": false,
      "autoApprove": ["resolve-library-id", "get-library-docs"]
    }
  }
}

Auto-approve the doc lookups

Both of Context7's tools are read-only — they fetch documentation and change nothing on your machine. That makes them ideal candidates for Cline's autoApprove list, as shown above: without it, every doc lookup pauses the run for a manual click, which defeats the point of an autonomous agent doing its own research. Check the tool names shown in Cline's MCP panel after connecting and mirror them in the list exactly.

Verify the connection

After saving, the MCP Servers tab should show context7 with a green status and two tools. Kick off a task like 'using context7 for current docs, add zod validation to this form' and watch the first steps — you should see the resolve call, then the docs fetch, then code.

Context7's live tool list is also published on its Loomal marketplace listing at https://loomal.ai/marketplace/context7.

Troubleshooting in Cline

A red status means the spawn failed. Try Retry Connection in the MCP Servers tab first — initial npx downloads can time out — then run `npx -y @upstash/context7-mcp` in VS Code's terminal to see the real error. Node missing or npx not on PATH covers most cases.

If the server is green but lookups error out, the problem is on the network path to Context7's service: corporate proxies and offline machines break the fetch even though the local process is healthy. Frequent failures under heavy use suggest rate limiting — a free API key from the Context7 dashboard, passed per the README, removes that ceiling. And if you edited config but see no change, reload the VS Code window so the extension re-reads its settings.

FAQ

How do I install Context7 in Cline?

Open the Cline panel > MCP Servers > Configure MCP Servers, then add a context7 entry with command npx and args ["-y", "@upstash/context7-mcp"] to cline_mcp_settings.json. Save, and the server connects with its two doc tools.

Should I auto-approve Context7's tools?

Yes, in most setups. Both tools only fetch documentation — they don't touch files or run commands — so auto-approving them keeps autonomous runs flowing instead of pausing for confirmation on every harmless doc lookup.

Why do doc lookups fail when the server status is green?

Green means the local process started; the lookups themselves call Context7's hosted service. Check network access and proxy settings, and if failures correlate with heavy use, add a free Context7 API key to raise your rate limits.

Does Cline share this config with other VS Code AI extensions?

No — cline_mcp_settings.json is Cline's alone. Copilot reads .vscode/mcp.json and Continue.dev reads config.yaml, so if you run several assistants, each needs its own Context7 entry in its own format.

More MCP servers for Cline.

Browse the Loomal marketplace — live-probed tool lists on every listing.

Browse the marketplace