Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Context7 MCP

$ context7-mcp Official Low Risk
Upstash · Agent Bridges & Meta · MIT · macos / linux / windows

Context7 fetches up-to-date, version-specific documentation and code examples straight from source repositories for coding agents, eliminating hallucinated APIs. Runs locally via npx -y @upstash/context7-mcp with --transport (stdio|http), --port, and optional --api-key for higher rate limits.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g @upstash/context7-mcp
CLI vs MCP Decision MCP Preferred

context7-mcp is designed specifically as an MCP documentation-retrieval server (resolve-library-id and get-library-docs).

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Zero-prompt startup with --transport stdio|http, --port, and --api-key, exposing clean two-step MCP doc lookup tools.

  • --transport (stdio|http), --port, --api-key, and --help
Trust & Safety 23 / 25

Strictly read-only documentation retrieval with no local filesystem mutation or remote write capabilities.

  • Read-only resolve-library-id and get-library-docs tools
Setup & Portability 14 / 15

Runs cross-platform in one command via npx -y @upstash/context7-mcp or remote hosted MCP URL.

  • Published on npm (@upstash/context7-mcp) with zero-config anonymous tier
Utility & Efficiency 14 / 15

Prevents stale-training-data API hallucinations by fetching exact current library docs on demand.

  • Version-specific doc snippets tailored to coding agent context
Maintenance & Lineage 9 / 10

Official Upstash repository (upstash/context7) under MIT license with very high ecosystem adoption.

  • Official Upstash repo under MIT license
Docs & Verifiability 8 / 10

Clear setup instructions for Cursor, Claude Code, Codex, and CLI flags on context7.com and GitHub.

  • Official docs on GitHub and context7.com

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key
Credential Storage

Works anonymously with rate limits; optional API keys are passed via --api-key or MCP host env config (CONTEXT7_API_KEY).

Side Effects
Read-Only
Cost & Quotas

MIT open-source MCP server; free public tier with optional paid/API-key plans for higher rate limits.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Context7 MCP Agent Rules
- Read-only documentation server: safe to query library IDs and versioned docs freely.
- Pass Context7 API keys via environment variables or host config rather than committing `--api-key` flags.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect Context7 MCP CLI options
npx -y @upstash/context7-mcp --help

Displays --transport, --port, and --api-key flags without starting the server.

Start Context7 MCP over local HTTP transport
npx -y @upstash/context7-mcp --transport http --port 8080

Serves read-only library documentation lookup tools over local HTTP on port 8080.

Strengths for Agents

  • + Strictly read-only toolset eliminates accidental side effects during coding sessions.
  • + Works out-of-the-box with npx -y @upstash/context7-mcp even without an API key.
  • + Dramatically cuts API version hallucinations for fast-moving frameworks.

Caveats & Pitfalls

  • ! Requires internet access to Upstash's Context7 index.
  • ! Acts as an MCP server daemon (stdio/http) rather than a one-shot CLI returning --json to stdout.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI