Skip to content
CAI
Software that uses CAICheck a score

upstash/context7

60.8

Adequate · 14 November 2026

17.9k

lines of production code

TypeScript

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Context7 Cursor plugin for live documentation lookup

Adds the Context7 plugin for Cursor, enabling the AI coding agent to fetch up-to-date library documentation and code examples directly from source repositories instead of relying on potentially stale training data. The plugin includes an MCP server configuration for the Context7 service, a rule to automatically trigger documentation lookups when unsure about APIs, a skill defining the workflow for resolving library IDs and querying docs, and a dedicated 'docs-researcher' agent for focused lookups. Users can install it via the Cursor Marketplace or locally, and it provides tools to resolve library identifiers and query specific versions of documentation.

plugins/cursor · high confidence

Context7 CLI initial release with skill management and documentation queries

The Context7 CLI is now available, providing a unified interface for AI coding agents to manage skills and fetch documentation context. Users can configure the CLI for various IDEs (Claude Code, Cursor, Antigravity, and Universal agents via .agents/skills) using the setup command, and remove configurations with the remove command. The tool supports installing, listing, searching, and generating skills, with output options including JSON for scripting. It also includes commands to query library documentation (library, docs) and check for CLI updates. Authentication is handled via OAuth 2.0 (login, whoami, logout), and the CLI supports custom backend URLs for on-premise deployments.

packages/cli/src · high confidence

Context7 MCP server now exposes OpenTelemetry metrics for Prometheus

The MCP server now includes native OpenTelemetry observability, exposing bounded metrics for requests, tools, authentication, and upstream API calls on an internal telemetry port (9464) for Prometheus scraping. This allows users to monitor server performance and usage patterns directly from their deployment infrastructure. Also in this area: 4 commits (0 fixes) modifying packages/mcp.

packages/mcp · medium confidence · unverified

Context7 MCP v4.0.3 release with new configuration and documentation files

This release introduces the Context7 MCP server configuration (server.json) for version 4.0.3, defining the server metadata, npm package identifier, and remote streamable-HTTP transport endpoint. It adds a .env.example file detailing required environment variables for API keys, OAuth, and MCP subscription limits, alongside a new context7.json file for Vercel Marketplace OIDC support. The update also includes a comprehensive README.md with installation instructions for CLI and MCP modes, a LICENSE file, a SECURITY.md policy, and configuration files for ESLint, Prettier, TypeScript, and pnpm workspaces to standardize the development environment.

(repo-wide) · high confidence

Initial release of the Context7 CLI package

The \packages/cli\ directory is now a standalone, buildable package containing the Context7 command-line interface. This release introduces the core CLI structure, including TypeScript configuration, ESLint rules, and Vitest test setup, alongside comprehensive documentation in the README. The package exposes commands for library documentation lookup (\ctx7 docs\, \ctx7 library\), agent configuration (\ctx7 setup\, \ctx7 remove\), and authentication (\ctx7 login\), supporting various AI coding agents like Claude, Cursor, and VS Code. It also includes a changelog detailing version history from 0.3.7 to 0.5.12, covering features such as OAuth device flow, on-premise support, and skill management.

packages/cli · high confidence

Initial release of the Context7 TypeScript SDK

The \@upstash/context7-sdk\ package is now available, providing a TypeScript client for the Context7 API. It introduces a \search\ method to find relevant documentation without separate library resolution, and supports Vercel Marketplace OIDC authentication via per-request token providers. The SDK includes production-grade HTTP controls such as configurable timeouts (defaulting to 30 seconds), retry logic for transient errors, abort signal support, and native fetch caching. It also features a typed \Context7Error\ for structured error handling and defaults to JSON response formats, with explicit support for plain text via the \type\ option.

packages/sdk · high confidence

Introduce Context7 AI SDK tools and agent for Vercel AI SDK

The \@upstash/context7-tools-ai-sdk\ package is now available, providing Vercel AI SDK-compatible tools (\resolveLibrary\, \getLibraryDocs\) and a pre-configured \Context7Agent\. This enables AI applications to access up-to-date library documentation directly within \generateText\ or \streamText\ workflows, or via the agent for automated multi-step documentation retrieval. The package includes configuration for TypeScript, ESLint, and Vitest, and relies on \@upstash/context7-sdk\ and \zod\.

packages/tools-ai-sdk · high confidence

Introduce Context7 AI SDK tools for library documentation lookup

This change adds the \@upstash/context7-tools-ai-sdk\ package, exposing two new AI SDK tools: \resolveLibraryId\, which maps a library name to a Context7-compatible ID, and \queryDocs\, which fetches specific documentation for that library. These tools allow AI agents to search for and retrieve accurate, versioned documentation for external libraries, supporting configuration via an optional API key or the \CONTEXT7\_API\_KEY\ environment variable.

packages/tools-ai-sdk/src/tools · high confidence

Introduce Context7 documentation search agent and tools

This change adds a new Context7 integration to the AI SDK tools package, providing a \Context7Agent\ class and standalone tools (\resolveLibraryId\, \queryDocs\) that allow models to search for and retrieve documentation for software libraries. The agent automates a multi-step workflow: resolving library names to Context7 IDs, fetching relevant documentation, and providing answers with code examples. This is a new capability rather than a modification of existing behavior.

packages/tools-ai-sdk/src · high confidence

Introduce Context7 plugin for OpenCode with v1 and v2 support

The new @upstash/context7-opencode plugin adds the Context7 MCP server and the context7-mcp skill to OpenCode, enabling AI agents to fetch current documentation directly from source repositories instead of relying on stale training data. The plugin supports both OpenCode v2 (via a setup entrypoint) and OpenCode v1 (via a server entrypoint), registering the hosted Context7 server with tools like context7\_resolve-library-id and context7\_query-docs. Authentication defaults to OAuth, with fallback to the CONTEXT7\_API\_KEY environment variable or an apiKey plugin option, and the skill automatically triggers documentation lookups when users ask about libraries or frameworks.

packages/opencode · high confidence

A new Context7Agent class is now available in the tools-ai-sdk package, allowing users to create agents that automatically resolve library names to Context7 IDs and fetch relevant documentation with code examples. This agent leverages the Vercel AI SDK's ToolLoopAgent to orchestrate a multi-step workflow, exposing resolveLibraryId and queryDocs tools to provide accurate, code-backed answers to developer queries.

packages/tools-ai-sdk/src/agents · high confidence

Introduce TypeScript SDK with Search API and structured documentation retrieval

The Context7 TypeScript SDK now exposes three primary client methods: \searchLibrary\ to find libraries by query and name, \getContext\ to retrieve structured documentation snippets for a specific library, and \search\ to perform broad documentation searches with library, version, and language hints. All methods support a \type\ option to return results as structured JSON objects (the default) or formatted plain text strings. The SDK handles authentication via API keys or OIDC token providers, manages HTTP transport with configurable retries, timeouts, and cache settings, and provides detailed error handling through the \Context7Error\ class. Also in this area: Search results now include a shared rank for consistent ordering. Also in this area: 2 commits (0 fixes) modifying packages/sdk.

packages/sdk/src, packages/sdk/src/commands, packages/sdk/src/http, packages/sdk/src/commands/search-library, packages/sdk/src/utils · medium confidence

MCP server v2 with native OpenTelemetry observability and enhanced enterprise authentication

The MCP server has been upgraded to v2, introducing native OpenTelemetry instrumentation for HTTP and stdio transports, including embedded Prometheus metrics support for monitoring subscription lifecycles and operation durations. Authentication now supports multi-tenant Entra ID validation, Enterprise-Managed Auth (EMA) with custom JWKS, and Vercel Marketplace OIDC, while advertising Clerk as the OAuth issuer. The server also enforces a 60-second timeout on API calls, supports custom CA certificates via NODE\_EXTRA\_CA\_CERTS for enterprise proxy environments, and includes improved error handling for rejected request bodies and client IP assertion forwarding. Also in this area: 4 commits (0 fixes) modifying packages/mcp.

packages/mcp/src/lib · medium confidence · unverified

New CLI commands for authentication, documentation, setup, removal, and upgrades

The CLI now includes dedicated commands for managing Context7 integration: \ctx7 login\, \logout\, and \whoami\ handle authentication using an OAuth 2.0 device authorization flow; \ctx7 docs\ provides library search and documentation queries with reputation and benchmark scoring; \ctx7 setup\ configures Context7 for various AI coding agents in either MCP server or CLI + Skills modes, supporting both hosted and on-premise deployments; \ctx7 remove\ (aliased as \uninstall\) cleanly removes Context7 configuration from detected agents; and \ctx7 upgrade\ checks for and applies CLI updates. These commands replace the previous ad-hoc setup mechanisms and provide a structured, user-friendly interface for installing, using, and maintaining Context7.

packages/cli/src/commands · high confidence

New Context7 CLI setup command with multi-agent support

The CLI now includes a \ctx7 setup\ command that configures Context7 integration for multiple AI coding agents, including Claude Code, Cursor, VS Code, Devin, Gemini CLI, and GitHub Copilot CLI. The setup process handles authentication (API keys or OAuth), installs documentation-lookup skills, and writes agent-specific rules and MCP configurations to the appropriate project or global directories. It also supports on-premise deployments via a custom base URL and includes specific handling for Codex CLI sandbox DNS failures. Also in this area: 6 commits (0 fixes) modifying packages/cli.

packages/cli/src/setup · medium confidence · unverified

New system prompts for Context7 documentation assistant

The Context7 AI SDK now includes a dedicated module for system prompts that define the behavior of the documentation search assistant. This update introduces a structured workflow where agents must first resolve a library name to a specific Context7 library ID before querying documentation, ensuring accurate source selection. The prompts enforce a multi-step process: resolving the library ID, analyzing results for official sources and reputation, and then querying the documentation, with safeguards to limit tool calls to three per question. This provides a consistent, reliable interface for agents to retrieve up-to-date code examples and documentation.

packages/tools-ai-sdk/src/prompts · high confidence

Behavioural changes

11 commits (0 fixes) modifying packages/pi

A change to existing behaviour in packages/pi — 11 commits, 18 files: “CTX7-3647: Agent prompt install and API keys on the Settings tab in docs (\#3695)”; “chore(release): version packages (\#3394)”; “chore(deps): consolidate pending dependency updates (\#2984)”; and 8 more (refs \#3695, \#3394, \#2984, \#2941, \#3275, …).

packages/pi · medium confidence · unverified

22 commits (2 fixes) modifying packages/admin-mcp

A change to existing behaviour in packages/admin-mcp — 22 commits (2 fixs), 44 files: “CTX7-3647: Agent prompt install and API keys on the Settings tab in docs (\#3695)”; “CTX7-3507: Document read-only API keys and the Write access box (\#3593)”; “CTX7-3595: Admin MCP ask\_delete\_site tool (\#3664)”; and 19 more (refs \#3695, \#3593, \#3664, \#3618, \#3521, …).

packages/admin-mcp · medium confidence · unverified

4 commits (1 fix) modifying examples

A change to existing behaviour in examples — 4 commits (1 fix), 14 files: “CTX7-3647: Agent prompt install and API keys on the Settings tab in docs (\#3695)”; “Update dependencies with security fixes (\#3757)”; “CTX7-3557: Use Vercel Marketplace OIDC in the Eve template”; and 1 more (refs \#3695, \#3757, \#3625).

examples · medium confidence · unverified

CLI utility layer refactored with new authentication, API, and skill management helpers

The CLI's internal utility layer has been restructured into a set of dedicated modules in \packages/cli/src/utils\. Authentication is now handled by \auth.ts\, which implements OAuth 2.0 device authorization flows, token refresh logic, and secure credential storage using XDG Base Directory paths. API interactions are centralized in \api.ts\, providing typed wrappers for skill listing, searching, downloading, and library documentation. Skill installation and management are supported by \installer.ts\ (with directory traversal protection), \github.ts\ (for GitHub API and raw file fetching), and \library-id.ts\ (which fixes Windows Git Bash path mangling). The update system is now managed by \update-check.ts\, which detects the local package manager and generates upgrade commands, while \tracking.ts\ handles telemetry events. Additional helpers include \deps.ts\ for parsing project dependencies, \prompts.ts\ for enhanced interactive UIs, and \storage-paths.ts\ for migrating legacy configuration files. Also in this area: CLI prevents concurrent token refreshes and updates Copilot plugin auth header.

packages/cli/src/utils · high confidence

MCP server introduces auth elicitation for anonymous users and fixes argument aliasing

The MCP server now proactively prompts anonymous users to sign in via an elicitation dialog (offering a setup command) when the backend signals it, replacing previous silent anonymous behavior. Additionally, the server now automatically rewrites common LLM-hallucinated argument names (such as 'userQuery' or 'libraryID') to their canonical schema keys before validation, preventing tool call failures. The entry also includes the new stdio/HTTP transport configuration via CLI flags and the basic server scaffolding for the Context7 MCP implementation.

packages/mcp/src · high confidence

Search results now include a shared rank for consistent ordering

The SDK's search response types now include a \rank\ field on both code and info snippets. This allows users to sort the combined list of snippets by their shared rank to match the order presented in the text response, ensuring consistent ordering across different snippet types. Also in this area: Removal of low-value tests; Introduce TypeScript SDK with Search API and structured documentation retrieval.

packages/sdk/src/commands/search · high confidence

Test coverage

Expanded test coverage for CLI authentication, setup, and removal workflows; Expanded test coverage for MCP authentication, telemetry, and integration.

Dependencies

Initial pnpm monorepo structure and dependency configuration

The project has been restructured into a pnpm monorepo, introducing a root package.json and individual package manifests for the CLI, MCP server, SDK, AI SDK tools, OpenCode plugin, and Pi extension. This setup establishes the core dependency graph, including the adoption of Zod v4, Vercel AI SDK v6, and the Model Context Protocol SDK v2, while setting specific Node.js engine requirements (Node 18+ for the CLI, Node 20.18.1+ for the MCP server).

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 62 → 61 (-1.7)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 73 → 70 (-3.0)
  • Architecture 96 → 96 (+0.0)
  • Maturity 63 → 70 (+7.6)
  • Readiness 62 → 63 (+0.7)
  • Security 63 → 65 (+1.7)
  • Accessibility 78 → 58 (-20.2)
  • Performance 60 → 60 (+0.0)

Resolved (44)

  • Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Critical CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Cross-context type Transport (cli → mcp) (packages/mcp/src/lib/mcp-subscription-telemetry.ts)
  • Cross-context type Transport (cli → mcp) (packages/mcp/src/lib/mcp-telemetry.ts)
  • Cross-context type Transport (cli → mcp) (packages/mcp/src/lib/mcp-telemetry.ts)
  • FunctionTooLong: index.createMcpServer (packages/mcp/src/index.ts)
  • FunctionTooLong: index.main (packages/mcp/src/index.ts)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • High CVE: [GHSA redacted] (pnpm-lock.yaml)
  • …and 24 more

New (36)

  • Deprecated: @opentelemetry/sdk-trace-base (pnpm-lock.yaml)
  • Deprecated: @opentelemetry/sdk-trace-node (pnpm-lock.yaml)
  • Deprecated: @types/figlet (packages/cli/package.json)
  • Deprecated: glob (pnpm-lock.yaml)
  • FunctionTooLong: ask.AskPage (packages/admin-mcp/ui/src/pages/ask.tsx)
  • FunctionTooLong: charts.DailyBars (packages/admin-mcp/ui/src/charts.tsx)
  • FunctionTooLong: docs7.Docs7Page (packages/admin-mcp/ui/src/pages/docs7.tsx)
  • FunctionTooLong: libraries.LibrariesPage (packages/admin-mcp/ui/src/pages/libraries.tsx)
  • Host.receive (cognitive 19) (packages/admin-mcp/ui/src/host.ts)
  • Host.receive (cyclomatic 17) (packages/admin-mcp/ui/src/host.ts)
  • Hotspot: packages/mcp/src/lib/api.ts (packages/mcp/src/lib/api.ts)
  • Low vulnerability: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium CVE: [GHSA redacted] (pnpm-lock.yaml)
  • Medium: security finding (details withheld)
  • No ADRs found (packages/mcp/package.json)
  • Off-boarding risk: anonymized user #1
  • …and 16 more

Changes since last survey

  • 135 commits — 129 feature/other, 6 fixes

By area

  • docs/enterprise — 29 commits
  • docs/howto — 23 commits
  • packages/cli — 16 commits
  • packages/mcp — 15 commits
  • packages/admin-mcp — 13 commits
  • (root) — 7 commits
  • docs/docs7 — 7 commits
  • docs/clients — 4 commits
  • docs/docs.json — 3 commits
  • docs/images — 3 commits
  • docs/api-guide.mdx — 2 commits
  • docs/library-updates.mdx — 2 commits
  • examples/eve-docs-agent — 2 commits
  • packages/sdk — 2 commits
  • .changeset/query-code-references-wording.md — 1 commit
  • .github/workflows — 1 commit
  • docs/agentic-tools — 1 commit
  • docs/installation.mdx — 1 commit
  • docs/library-owners.mdx — 1 commit
  • docs/sdks — 1 commit

Notable commits

  • fix: CTX7-3802: Fix Okta issuer and groups-claim guidance in on-prem OIDC SSO docs (#3771)
  • fix: Update dependencies with security fixes (#3757)
  • fix: fix(cli): handle CRLF line endings in the AGENTS.md rule section (#3580)
  • fix: fix(cli): keep JSONC comments when writing MCP configs (#3508)
  • fix: fix(cli): order prerelease versions before their release in update check (#3607)
  • fix: fix(mcp): keep filter notice for empty library searches (#3530)
  • change: Bump @inquirer/prompts from 8.7.2 to 8.7.5 (#3609)
  • change: Bump @types/node from 25.9.8 to 26.6.6 (#3611)
  • change: Bump dotenv from 17.4.2 to 18.0.9 (#3612)
  • change: Bump typescript-eslint from 8.71.0 to 8.72.1 (#3610)
  • change: Bump vite from 8.3.4 to 8.3.5 (#3613)
  • change: CTX7-1846: Helm deployment docs page (#3395)
  • change: CTX7-2817: Add Search API command to CLI (#3396)
  • change: CTX7-3219: Document the new Docs7 Agent tab and the Example Check Agent (#3461)
  • change: CTX7-3290: Dashboard features in the Admin MCP (#3562)
  • change: CTX7-3420: Docs Installation page with agent tabs (#3536)
  • change: CTX7-3423: README store install buttons (#3537)
  • change: CTX7-3472: Admin MCP console app (#3570)
  • change: CTX7-3479: Research preview flag for the Context7 MCP server (#3577)
  • change: CTX7-3480: Admin MCP sends tool and client telemetry headers (#3578)
  • …and 115 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

upstash/context7 was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 5c4a4b43cd5010f5678c6fceac3dd16865112e67 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-e1a3b69fc8ee.