For Agents
Search for libraries and retrieve current documentation context for grounding an LLM, and index new sources from repositories, files, websites, or Notion. Search and context reads work with or without a bearer token.
Use for: Search for a library's documentation by name, Get current documentation context to ground a code-generation prompt, Find code examples for a specific library version, Add a GitHub repository so its docs become searchable
Not supported: Does not handle code execution, vector-database hosting, or model inference. Use for indexing and retrieving library documentation only.
The Context7 Public API searches and retrieves up-to-date library documentation and code examples for use as model context. It resolves a library by name, returns documentation context in a single request, and searches across indexed sources. Teams extend the index by adding GitHub, GitLab, and Bitbucket repositories, uploading OpenAPI specs, PDFs, and Word documents, or pulling in websites, Confluence spaces, and Notion pages, and can refresh a library to re-index it.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Context7 Public API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fcontext7.com%2Fcontext7" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fcontext7.com%2Fcontext7" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Context7 Public API.
Search for a library by name and resolve it to its documentation
Retrieve up-to-date documentation context for a library in a single request
Search indexed documentation across sources in one request
Index a GitHub, GitLab, or Bitbucket repository to make its docs searchable
Ingest an OpenAPI spec, PDF, Word document, website, Confluence space, or Notion pages
Refresh a library to re-index its latest documentation
Read API usage and read or update teamspace policies
Patterns agents use Context7 Public API for, with concrete tasks.
★ Grounded Code Generation
A coding agent resolves a library by name and pulls its current documentation context from Context7 before writing code, so it generates against the live API surface rather than stale training data. The context request returns documentation and code examples in one call, which the agent injects into its prompt to cut hallucinated method names.
Call GET /v2/libs/search to resolve the library, then GET /v2/context to retrieve its documentation for the prompt
Private Documentation Indexing
A team makes its internal docs searchable by adding a GitHub repository, uploading an OpenAPI spec, or pulling in a Confluence space, then refreshing the library so retrieval reflects the latest changes. Context7 handles the ingestion and indexing, so an agent can later search across both public and private sources in one request.
Call POST /v2/add/repo/github to index a repository, then POST /v1/refresh to re-index its latest documentation
AI Agent Integration via Jentic
An AI agent reaches Context7 through Jentic without handling the bearer token itself. It searches by intent, receives the matching operation and its input schema, and executes the call with the credential injected at run time. This lets an agent fetch documentation context as a grounding step before it answers a coding question.
Search Jentic for 'fetch current documentation for a library', load the GET /v2/context schema, and execute it with Jentic-managed credentials
21 endpoints — the context7 public api searches and retrieves up-to-date library documentation and code examples for use as model context.
METHOD
PATH
DESCRIPTION
/v2/libs/search
Search for libraries
/v2/context
Get documentation context
/v3/search
Search documentation in one request
/v2/add/repo/github
Add a GitHub repository
/v2/add/openapi
Add an OpenAPI specification by URL
/v1/refresh
Refresh a library
/v2/usage
Get API usage
/v2/libs/search
Search for libraries
/v2/context
Get documentation context
/v3/search
Search documentation in one request
/v2/add/repo/github
Add a GitHub repository
/v2/add/openapi
Add an OpenAPI specification by URL
/v1/refresh
Refresh a library
/v2/usage
Get API usage
This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.
Base layer of spec validity and structural soundness.
Aggregated quality score from linter diagnostics, weighted by severity.
Percentage of `$ref` references that resolve successfully.
Checks whether the API description parses successfully and conforms to its declared specification (e.g., OpenAPI).
Structural correctness score based on schema issues using logarithmic dampening.
Clarity, completeness, and ingestion readiness for developers and tooling.
How richly the API is illustrated with examples.
Percentage of examples that conform to their schemas.
Percentage of operations with complete response definitions (success, client error, server error).
Health of API ingestion, bundling, and resolution within Jentic pipelines.
Semantic breadth, depth, and agent comprehension for AI systems.
Coverage of descriptions across API elements.
Coverage of RFC 9457 Problem Details for error responses.
Coverage, uniqueness, and casing consistency of operationIds for AI inference.
Coverage of summaries across operations/tags/info.
Functional utility, complexity comfort, and AI orchestration readiness.
Agent comfort level based on API operational and structural complexity.
Trust, risk posture, and security compliance.
Average quality of security schemes based on authentication method strength (weakest link for OAuth2).
Findability, semantic richness, and reasoning readiness.
Clarity and depth of descriptions across API elements.
Score it yourself
Every API in the directory is allowlisted, so you can re-score it with no key required.
npx @jentic/api-scorecard-cli score <openapi-url>What agents get from Jentic-routed access to this vendor.
Setup
Wiring Context7 by hand means managing its bearer token, deciding which endpoints need a key, and threading the token through each search, context, and indexing call. Through Jentic you install once, import Context7 from the API Directory, store the key once, and your agent calls it.
Permission scoping
Context7 carries the target library or source in the request body, so a rule bounds which operations your agent may call, not which library. You choose the operations it may call, so retrieval reads can be allowed while repository indexing and teamspace-policy updates are not included unless you add them.
Credential isolation
Your Context7 key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'fetch current documentation' or 'search a library', and Jentic returns the matching Context7 operation with its input schema so the agent calls the right endpoint without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using Context7 Public API through Jentic.
What authentication does the Context7 Public API use?
The Context7 Public API authenticates with a bearer token in the Authorization header, per its OpenAPI spec, with your API key issued from the Context7 dashboard. The library search and context endpoints work with or without a key, while indexing and policy operations require the token. Through Jentic the key is stored encrypted by your own Jentic One instance and injected at execution time, so it never reaches the agent.
Can I index my own documentation with the Context7 Public API?
Yes. You can add a GitHub, GitLab, or Bitbucket repository, upload an OpenAPI spec, PDF, or Word document, or pull in a website, Confluence space, or Notion pages, then refresh the library to re-index it. After ingestion an agent can search across your private sources alongside public libraries in one request.
What are the rate limits for the Context7 Public API?
The OpenAPI spec does not publish specific rate-limit numbers; check https://context7.com/dashboard for the current limits on your plan. The usage endpoint reports your consumption so an agent can gauge headroom before a batch of context requests.
Is there a Context7 MCP server?
You don't need an MCP server to give your agent Context7. Jentic connects it directly from the API Directory: import it, store your credential once, and your agent calls the search and context operations. Operations are discovered on demand, so nothing extra loads into the agent's context until one is invoked.
Can I limit what my agent is allowed to do with the Context7 Public API?
Yes. Context7 carries the target library or source in the request body, so a rule bounds which operations your agent may call rather than which library. Allow only the search and context reads and the agent can retrieve documentation while the repository-add and policy-update operations stay out of reach, with every call logged by your own Jentic One instance.
How do I fetch documentation context with the Context7 Public API through Jentic?
Search Jentic for 'fetch current documentation for a library', and it returns the Context7 context operation with its input schema. Load the schema and execute GET /v2/context for the resolved library with the credential injected at run time. To run it on your own infrastructure, install Jentic One from its GitHub repo.
GET STARTED