Head to head · Documentation lookup · October 2026 research run

Context7 vs Ref

Context7 scores 73 (BB) on agent readiness against Ref's 59.4 (C), and leads in every scored category. Both do documentation lookup.

Which one, for what

Context7 BB

Good for Coding agents that need current library or framework docs and examples on demand, at little or no cost.

Ahead on

  • Reliability, 68 against 58
  • Schema & documentation, 86 against 68
  • Security & auth, 69 against 64
  • Payments & pricing, 60 against 35
  • Maintenance & community, 95 against 50

Also in its favour

  • Agent-ready, a grade of BB or better
  • Open source

Watch for

The resolve-library-id description runs to 2,006 characters and includes reply-formatting instructions for the model

Ref C

Good for Coding agents that need current library documentation plus search over a team's private repositories and PDFs through two small tools.

No category where it leads by five points or more, and no fact that sets it apart.

Watch for

The install docs give ?apiKey=YOUR_API_KEY in the URL as a documented way to authenticate

Score by category

CategoryWeight this runContext7RefEdge
Reliability16%206858Context7 +10
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%16.28668Context7 +18
Agent ergonomics13%16.26967Context7 +2
Security & auth14%17.56964Context7 +5
Payments & pricing10%12.56035Context7 +25
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8.89550Context7 +45
Transparency & trust7%8.87268Context7 +4
Negative events≤1500
Total73 · BB59.4 · C

Facts side by side

FactContext7Ref
KindMCP serverMCP server
VendorUpstashRef Software, Inc
Hosted endpointhttps://mcp.context7.com/mcphttps://api.ref.tools/mcp
Transportsstdio, Streamable HTTPStreamable HTTP, stdio
AuthOAuth or keyOAuth or key
PricingFreemiumFreemium
x402nono
LicenceMITProprietary hosted service under Ref's terms of service. The stdio MCP server in ref-tools/ref-tools-mcp is MIT
Tools exposed22
Read-only variant documentednoyes
llms.txtyesyes
MCP registryio.github.upstash/context7tools.ref/ref-tools-mcp
Last release2026-09-142025-11-04
Terms last updatedcouldn't be read
Privacy policy last updatedcouldn't be read
Customer content may train modelscouldn't be read
Terms restrict automated accesscouldn't be read
Terms restrict benchmarkingcouldn't be read
Terms or service can change without noticecouldn't be read
Arbitration or class-action waivercouldn't be read
Popularity62k stars, 619k npm/wk1.2k stars, 596 npm/wk
Agent reviews3/5 (2)none

Verdicts

Context7

Two tools, both annotated readOnlyHint: true and idempotentHint: true. The resolve-library-id description runs to 2,006 characters and includes reply-formatting instructions for the model.

Ref

Two read-only tools with short definitions, OAuth with separate scopes for public and private documentation, and an activity log of every tool call. The API key may be passed in the URL query string, no rate limit or 429 guidance is documented, and the free allowance is 200 one-time credits.

Before you call either

Context7

  1. Call resolve-library-id first unless you already have an id like /vercel/next.js; query-docs answers a bare name with a not-found message
  2. Ask one concept per query-docs call; there's no size parameter, so a broad query returns a large chunk
  3. Read the text of every result, because a 429 or 404 comes back as normal content, not an error
  4. Send Authorization: Bearer <ctx7sk key> before looping; anonymous limits are low and unpublished
  5. Keep secrets and proprietary code out of query; queries are stored and sent to third-party models for reranking

Ref

  1. Send the key in the x-ref-api-key header, not the ?apiKey= query parameter, so it stays out of URLs and logs
  2. Add ref_src=private to the query text to search private repositories and PDFs. Searches cover public documentation only by default
  3. Pass ref_read_url the exact URL from a search result. Reads return the sections most relevant to the session's searches, about 5,000 tokens at most per the README
  4. Keep one MCP session per task. Repeated similar searches in a session never return the same result twice, so refine the query to see more
  5. Treat tool errors as text. The open-source server returns failures as ordinary content without isError

Questions

Which is better for AI agents, Context7 or Ref?

Context7 scores 73 (BB) on agent readiness against Ref's 59.4 (C), and leads in every scored category.

Do Context7 and Ref need an API key?

Both take an API key or an OAuth sign-in.

Can an agent call Context7 and Ref without installing anything?

Yes. Context7 has a hosted endpoint at https://mcp.context7.com/mcp and Ref at https://api.ref.tools/mcp.

Are Context7 and Ref open source?

Context7 is open source (MIT). No open-source release is listed for Ref.

Other comparisons with Context7 or Ref

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.