**Via Direct URL:**
Go directly to your library's admin page at:
```
https://context7.com/{owner}/{repo}/admin
```
For example: `https://context7.com/vercel/next.js/admin`
The modal provides a JSON snippet like this:
```json
{
"url": "https://context7.com/vercel/next.js",
"public_key": "pk_abc123xyz..."
}
```
Click "Copy JSON" to copy the configuration to your clipboard.
You can add versions using either:
- **Git tags**: Reference a specific release tag (e.g., `v1.2.0`)
- **Git branches**: Reference a branch for version-specific documentation (e.g., `release-1.x`)
- **Website versions**: For a website library, enter the **Version URL** of the documentation for that version (e.g., `https://docs.example.com/2.0/`). The URL must be on the same site as the library. As an owner, you can also add a release that lives under a different path of that site's documentation, such as one manual of a portal (e.g., `https://dev.mysql.com/doc/refman/8.0/en/` for a library whose docs are under `https://dev.mysql.com/doc/`). A URL without a version replaces the latest version.
| Limit | Value |
| ---------------- | ----------------- |
| Maximum versions | 17 |
| Tag/branch name | Max 50 characters |
## Library Metrics
The Metrics tab provides insights into how developers are using your library through Context7.
### Usage Statistics
At the top of the metrics page, you'll see key usage numbers:
| Metric | Description |
| ---------------------- | --------------------------------------------------------------------- |
| **Page Views** | Number of times your library page was viewed on Context7 |
| **API Requests (TXT)** | Documentation requests via the REST API |
| **MCP Requests** | Documentation requests via the MCP server (from AI coding assistants) |
The metrics page also includes a usage chart showing trends over time, topic queries showing what developers ask about, and country distribution of requests.
This badge appears on:
- Your library's main page
- Search results
- Library listings and tables
## How to Get Verified
There are two paths to verification:
### Automatic Verification
Libraries are automatically verified when they meet a quality threshold:
- **High trust score**: Libraries with a high trust score are verified when a parse completes. Trust score is calculated based on the GitHub organization/user profile, considering factors like total stars, number of repositories, account age, recent activity, followers, and profile completeness.
If your library qualifies, it will be verified automatically without any action required.
### Manual Verification
If your library doesn't qualify for automatic verification, you can apply manually:
## ❌ Without Context7 Ask
- ❌ AI agents crawl many pages to learn about your product
- ❌ You don't know why AI agents are visiting your website
- ❌ You don't know if AI agents found what they needed
## ✅ With Context7 Ask
- ✅ AI agents ask your site a question instead of crawling
- ✅ See every question AI agents ask about your product
- ✅ See which questions your website doesn't answer
---
## How it works
You add two things to your website: a verification tag in `` and a short note at the top of ``. People don't see the note, but agents that read your page do. It tells them that your site has a search endpoint:
```txt
https://context7.com/api/v2/ask?siteKey=ask_4f9c2e81a7b3d6e05c1f8a92&query=How+do+I+retry+webhooks
```
From there, it's three steps:
| Step | What happens |
| -------------------------- | ------------------------------------------------------------------------------------------------- |
| **1. Agents read your site** | Claude, ChatGPT, Cursor and other agents find the endpoint in your page |
| **2. Your site answers** | Context7 searches your pages and returns the parts that answer the question, each with its URL |
| **3. You see the questions** | Every question shows up in the Ask dashboard, with the agent that asked it and the answer it got |
If nothing on your site answers a question, the agent is told so. It never gets a made-up answer, and you see the question in your **Unanswered** list.
Agents spend fewer tokens browsing your website, and you finally see what they're looking for.
---
## Plans
| Plan | Sites |
| ---------------- | -------- |
| Free | 3 |
| Pro & Enterprise | No limit |
There is no charge for questions or answers on any plan.
---
## Start here
---
## 2. Add the tag to ``
The tag proves the site is yours. It's the same method search consoles use, so only someone who controls your page template can add it.
```html
```
Add it to the shared layout of your site, so every page has it.
---
## 3. Add the note to ``
Agents that read your page as text never see ``, so the note goes at the top of ``. It is hidden from people and from screen readers. Your design and page speed stay the same.
```html
```
Copy the exact note from the dashboard. It has your site's key.
---
## Test it
You can ask your site a question yourself, from the **API** card on the **Site** tab or with curl:
```bash
curl "https://context7.com/api/v2/ask?siteKey=ask_4f9c2e81a7b3d6e05c1f8a92&query=How+do+I+retry+webhooks"
```
The response is plain text: the parts of your pages that answer the question, each with its URL. Your question shows up in the [Questions](/ask/dashboard) tab right away.
| Status | Meaning |
| ------ | --------------------------------------------------------------------- |
| `200` | The answer, or a message that nothing on your site matched |
| `202` | Context7 is still reading your site. Try again shortly |
| `400` | The request has no `siteKey`, or the question is too long |
| `404` | No site is published for that key |
| `429` | Too many requests for this site. Retry after the `Retry-After` header |
| `503` | Context7 could not read your site |
---
## Optional: llms.txt, markdown pages and headers
Some agents never read your HTML. They fetch `llms.txt`, a `.md` version of a page, or only the response headers. The prompt from **Copy prompt for your agent** adds the endpoint to all of these too:
- A **Search** section in `llms.txt` and `llms-full.txt`
- The same section at the top of each markdown page, with a link to your `llms.txt` first
- A link to your `llms.txt` as the first line of the note, so agents can find every page
- A `Link` header with `rel="search"` on every page response
These are optional. The tag and the note are all Context7 checks.
# Questions and Analytics
Source: https://context7.com/docs/ask/dashboard
> See what AI agents ask about your product, and which questions your site can't answer
Every question an agent sends to your site ends up in the Ask dashboard: **which agent asked it, whether your pages had an answer, and what the agent got back**. Open [context7.com/ask](https://context7.com/ask) and pick a site to see them.
---
## Analytics
The **Analytics** tab shows which agents ask your site, and what they ask. Pick the last 24 hours, 7 days or 30 days at the top.
| Card | What it shows |
| --------------------- | ---------------------------------------------------------------- |
| **Question activity** | Questions per day, split by agent |
| **Questions** | How many questions each agent asked |
| **Unanswered** | Questions that found nothing on your site |
| **Most asked** | The questions agents repeat most |
| **Recent questions** | The latest questions agents asked |
The **Unanswered** list is your to-do list. Each question in it is something agents wanted to know and your website didn't say. Add a page for it, and the next agent that asks gets an answer.
---
## Questions
The **Questions** tab lists every question, newest first. Search the questions, or filter them by agent or by whether your pages answered (**Answered** or **No match**). Click a question to read the answer the agent got back.
Each question is marked **Answered** or **No match**. We keep questions for 60 days.
---
## Agents
Ask recognizes Claude, OpenAI, Perplexity, Cursor, OpenCode, Meta, Mistral and Grok by name. A question from a browser shows as **Browser**, and one from any other agent shows as **Unknown**.
# Manage API Keys
Source: https://context7.com/docs/howto/api-keys
> Create and manage API keys for Context7 authentication
API keys authenticate your requests to Context7's documentation services. Use a key for the REST API, the SDKs, CI and other headless hosts, and gateways or proxies.
### Step 2: Add Context7 as a resource app
Go to **Applications → Applications → Browse App Catalog**, search for **XAA Resource App**, and click **Add Integration**.
- **Application label:** `Context7`
- **Issuer URL:** `https://context7.com`
Click **Done**.
### Step 3: Add your MCP client as a requesting app
Browse the catalog again, search for **XAA Requesting App**, and click **Add Integration**.
- **Application label:** a name for the MCP client (for example `MCP Client`)
- **Issuer URL:** `https://context7.com`
- **Client ID:** the client identifier the MCP client uses (for example `mcpclient-at-context7`)
Click **Done**, then open the **Sign On** tab and note the Client ID and secret if your client needs them.
### Step 4: Connect the two apps
Open the requesting app → **Manage Connections** tab. Under **Apps providing consent**, choose **Add resource apps**, select **Context7**, and **Save**.
### Step 5: Assign your users
On both apps, open the **Assignments** tab and assign the people (or groups) who should have access. Only assigned users can obtain an ID-JAG.
## Part 2: Configure Context7
Sign in to [context7.com/dashboard](https://context7.com/dashboard), select your enterprise teamspace, open the **Enterprise** tab, and select **Okta**.
- **Identity provider issuer:** your Okta org issuer, for example `https://
## Language Support
Context7 indexes documentation in any human language. Which pages a library keeps depends on its source:
| Source | Languages indexed |
|---|---|
| Confluence, Google Drive, Notion | Every page, whatever its language. One library can mix languages. Requires 2.0.1 or later |
| Git repository | Every page, whatever its language. One library can mix languages. Requires 2.0.2 or later |
| Website, llms.txt | The language of the site, detected from its first page. Pages in other languages are skipped |
| OpenAPI | English |
For Google Drive and Notion libraries, Context7 detects the library language when you leave it empty.
When a change takes effect:
- **Settings with an environment variable:** at the next parse, on every replica.
- **Max concurrent parses, Max concurrent LLM requests, LLM timeout:** at once on the replica that saves them. In a [multi-replica deployment](/enterprise/deployment/scaling), other replicas use the new value after they restart.
| Setting | Default | Range | Env fallback | Description |
|---|---|---|---|---|
| Max concurrent parses | `1` | 1–10 | — | Parses each replica runs at the same time |
| Max concurrent LLM requests | `5` | 1–64 | — | Requests in flight to the language model, shared by parsing and search |
| LLM timeout | `120` s | 30–1800 s | — | How long to wait for one model call. Each part of a page takes up to four calls in a row (a page check, then code, API and info extraction), so it may run up to four times this value |
| Max files per library | `500` | 1–100000, or no limit | `MAX_FILES` | Documentation files a repository parse reads, or pages a website or llms.txt parse keeps. Extra files are skipped and logged |
| Files parsed in parallel | `5` | 1–64 | `PARSE_CONCURRENCY` | Files one parse processes at the same time |
| File timeout | `500` s | 30–3600 s | `PARSE_TIMEOUT` | How long one file may take. The parse skips a file that takes longer |
| Max pages per Notion library | `10000` | 1–100000, or no limit | `NOTION_MAX_PAGES` | A Notion selection with more pages is refused |
| Max files per Google Drive library | `10000` | 1–100000, or no limit | `GOOGLE_DRIVE_MAX_FILES` | A Google Drive selection with more Docs and Slides is refused |
| Max work items per Azure DevOps library | `20000` | 1–200000, or no limit | `AZURE_DEVOPS_MAX_WORK_ITEMS` | An Azure DevOps library indexes the newest matching work items up to this limit, and shows a warning |
### Git Access Tokens
Configured under **Workspace Settings › GitHub**, **GitLab** and **Other Git** in the web UI.
| Setting | Description |
|---|---|
| GitHub Token | GitHub Personal Access Token. Required for GitHub repositories |
| GitLab Token | GitLab token. Required for GitLab repositories |
| GitLab **Server URL** | Your self-hosted GitLab host, such as `gitlab.your-company.com`. In the **GitLab** row, select **Self-managed**, then enter it in **Server URL** |
You only need tokens for the platforms you use. If you only parse GitLab repos, you don't need a GitHub token, and vice versa. Create tokens with `repo` scope (GitHub) or `read_repository` scope (GitLab) for private repository access.
The GitLab token is sent only to `gitlab.com` and the host in **Server URL**.
## Access Control
The server creates an `admin` account with the password `admin` at first boot. Change these credentials immediately after setup from **Personal settings > Password > Change password**.
Who can do what by default:
- **Admins** can do everything.
- **Signed-in members and their API keys** can parse and refresh libraries. To re-parse or replace an existing library, a member needs read access to it under the [library access rules](/enterprise/security/library-access).
- **Anonymous callers** (no session and no API key) can do none of these.
Delete, cancel parse, and support bundle downloads are for admins only. Use the switches in **Workspace Settings › Authorization** to open some actions to anonymous callers. The **MCP authentication** switch in **Workspace Settings › Authentication** requires authentication for MCP and API search.
| Permission | Default | Description |
|---|---|---|
| Parse repositories | Off | Allow anonymous callers to trigger parsing. Source code indexing and CodeDocs generation always need a session or a personal API key |
| Refresh repositories | Off | Allow anonymous callers to refresh libraries. Notion, Google Drive, and Azure DevOps libraries stay admin-only, and a library with source code indexing needs a session or a personal API key |
| Delete repositories | Off | Allow anonymous callers and members to delete libraries and cancel parses |
| Download support bundle | Off | Allow anonymous callers and members to download the support bundle |
| MCP authentication | On for a new install | Require a session or personal API key for `/mcp`, `/api/v2`, and the library, log, and queue read endpoints. The mode chooses whether `/mcp` accepts personal API keys, OAuth access tokens, or both. See [Authentication](/enterprise/api/authentication#non-admin-permissions) and [OAuth Sign-In for MCP Clients](/enterprise/security/mcp-oauth) |
### Verify the App configuration
The setup flow configures everything below automatically, so a newly created App is ready to use. The exception is an instance on `localhost` or `127.0.0.1`: GitHub cannot reach a local address, so the manifest has no webhook and no push event. Add them by hand when the instance has a reachable URL. Use this section to confirm the App, or to fix an App you connected before GitOps existed (it will be missing the push event; see [Webhooks](#webhooks)). Open the App at `github.com/settings/apps`.
| Setting | Required value |
| ------- | -------------- |
| Repository permission: Contents | Read-only |
| Repository permission: Metadata | Read-only (mandatory) |
| Subscribed events | Push |
| Webhook | Active |
| Webhook URL | `https://
Under **Webhook**, it is active and points at your instance with a secret configured:
## Personal access token
As a simpler alternative, add a GitHub personal access token in the **GitHub token** row under **Workspace Settings › GitHub**. Use a token with the `repo` scope for private repository access.
A personal access token can clone and index repositories, but it **cannot receive webhooks**. With a token only, push-triggered GitOps syncs are unavailable; use the GitOps sync schedule or trigger syncs from CI instead.
## GitHub Enterprise Server
Context7 works with GitHub Enterprise Server, not only github.com. Set your server host **before** you create the GitHub App or add a token, so the App is created on your own server instead of github.com.
| Field | Description |
| ----- | ----------- |
| Host | The Git host, without `https://`. For example, `gerrit.your-company.com`. Repositories whose `https://` URL is on this host are cloned with the credentials below. |
| Username | The account username. This is required, because HTTP basic auth needs a username (for Gerrit, generate an HTTP password in its settings and use that account's username). |
| HTTP password or token | The account's HTTP password or access token. |
Then add a repository with its HTTPS clone URL, for example `https://gerrit.your-company.com/a/platform/sdk`.
Generate the `known_hosts` entry with `ssh-keyscan`, for example:
```bash
ssh-keyscan -p 29418 gerrit.your-company.com
```
That's all you need. Add repositories with their `ssh://` URL and they clone with the pasted key.
### Mount a key into the container (alternative)
If you prefer the private key never touch the application (it is never written to the database or included in backups), mount it into the container instead and point Git at it with `GIT_SSH_COMMAND`. Leave the UI SSH key blank, and a mounted key is used whenever no key is configured in the UI.
The **Find pages** toggle in the form offers two ways to choose what to index:
- **Browse spaces** — pick a space, then index the whole space or select pages from its tree.
- **By page URL** — paste the URLs of the exact pages you want. No page tree is loaded, so it stays fast even for spaces with thousands of pages, and the pages can come from different spaces.
### Browse spaces
The organization URL is the part of the browser address before the project name:
| Deployment | URL |
| ---------- | --- |
| Azure DevOps Services | `https://dev.azure.com/your-organization` (or `https://your-organization.visualstudio.com`) |
| Azure DevOps Server | The collection URL, for example `https://server/tfs/DefaultCollection` |
Context7 stores the credential encrypted. You can replace it at any time: libraries are tied to the organization URL, not to the credential.
Each sync lists the matching work items again. It indexes only the work items that changed, adds new matches, and removes work items that no longer match, were deleted, or that the credential can no longer read. A page is also indexed again when what it shows of other work items changes: a new test link, a renamed linked item, edited shared steps, or a test case added to a suite. To index every work item again, choose **Refresh** with **Re-index all work items**.
### When a sync fails
Context7 keeps the indexed content:
- **The listing fails**, for example because the credential expired or the project is gone. The library keeps its work items and shows the error. Context7 retries after 15 minutes, 1 hour and 6 hours.
- **A work item fails.** It keeps its last indexed version and is retried on the next sync. The library lists it; choose **Export failures as CSV** for the full list.
- **A sync would remove too many work items:** all of them, or more than half of a library with 20 or more, with unchanged filters. Context7 stops and keeps the index, because the credential has usually lost access. If the removal is expected, choose **Refresh** with **Re-index all work items**.
Throttled requests (HTTP 429) and server errors are retried as long as Azure DevOps asks, up to 2 minutes each.
Connecting a different organization or disconnecting stops the syncs, and the libraries keep their content. To stop serving a library, delete it.
## Access and network
The credential controls what Context7 can read. [Library access](/enterprise/security/library-access) controls who can query it. A new Azure DevOps library is restricted to admins until you grant access, and a sync never changes the access you set.
Allow outbound HTTPS to your organization URL (`dev.azure.com` or your server), and to `login.microsoftonline.com` for a service principal.
## Wikis and repos
A project wiki and a Git repository in Azure DevOps are Git repositories. Index them through [Other Git](/enterprise/integrations/other-git):
To change the embedding model, run the setup wizard again. Vectors from different embedding models cannot be searched together, so refresh your libraries afterwards to rebuild their vectors. Until a library is refreshed, it may not appear in search.
## Models
| Use | Models |
|---|---|
| Parsing, reranking, and CodeDocs | Gemini: `gemini-3.8-flash` (default), `gemini-3.7-flash`, `gemini-3.5-flash-lite` |
| Parsing, reranking, and CodeDocs | Claude: `claude-sonnet-5-5`, `claude-haiku-5-5`, `claude-opus-5-5`, `claude-haiku-4-5` |
| Embeddings | `gemini-embedding-001` (default), `gemini-embedding-2`, `text-embedding-005` |
- Reranking uses `gemini-3.5-flash-lite` unless you set a rerank model.
- The `global` location has the newest models. Regional locations have fewer, so check that yours serves the model you pick.
- `gemini-embedding-2` is available only in `global`.
Then open **Users and groups**, click **+ Add user/group**, and assign the users or groups that can sign in. Assign yourself, so that you can test the flow.
### Part 3: Configure Context7
1. In the **SAML 2.0** tab, turn on **Enable SAML 2.0**.
2. Paste the **App Federation Metadata Url** into **IdP metadata URL** and click **Import**. Context7 fills in the IdP entity ID, sign-on URL, logout URL and signing certificate.
3. Leave the attribute fields blank. Context7 detects the Microsoft email, name and group claims.
4. In **Group mapping**, enter the **Object ID** of the Entra group for admins as **Admin group value**, and the Object ID of the group for members as **Member group value**. Entra sends group Object IDs, not group names. If you leave both blank, every assigned user gets the member role.
5. Click **Check configuration**, then **Save and apply**.
Open `/login` in a private browser window and click the SSO button to test the sign-in.
## Option 2: OIDC
### Part 1: Register the application in Entra
1. In the [Azure portal](https://portal.azure.com), open **Microsoft Entra ID › App registrations** and click **+ New registration**.
2. Enter `Context7` as the name and select *Accounts in this organizational directory only*.
3. For **Redirect URI**, select **Web** and enter `https://
- **Groups claim**: the name of the claim in the token that contains the user's groups. Default is `groups`.
- **Admin group value**: the exact group name that maps to the Context7 admin role. Admins can open workspace settings and manage other users.
- **Member group value**: the exact group name that maps to the member role. Members can use the workspace but cannot access settings.
If you leave both group values blank, every authenticated user gets the member role automatically. This is useful when your IdP does not emit a groups claim and you want to allow any user from your organization in.
Click it. You are redirected to your identity provider's login page. After authenticating there, your provider sends you back to Context7 with an authorization code. Context7 exchanges the code for tokens, validates the ID token signature and claims, and either creates a new user or updates the existing one.
The first time someone signs in, Context7 creates a user record using their name, email, and role from the token claims. On subsequent sign-ins, the name, email, and role are refreshed from the latest token, so changes in your IdP take effect automatically on the next login.
## Sign-in from MCP clients
With [OAuth sign-in for MCP clients](/enterprise/security/mcp-oauth), an MCP client sends the user to this sign-in flow when it needs a token. After the IdP sends the user back, Context7 returns to the client's consent step instead of the dashboard. Nothing changes in your IdP configuration.
An OAuth authorization outlives the browser session: removing a user from the IdP group ends it only when it expires, after at most 30 days. To end it at once, choose **Disable sign-in** for the user on the **Members** page.
## Disabling password sign-in
Once OIDC is live, you can turn off password-based sign-in entirely so that all users must authenticate through your IdP.
Open the **Password sign-in** card directly below the SSO card and toggle it off.
Roles are controlled by group membership in your IdP. To change someone's role, update their group assignment in your identity provider. The change takes effect on their next sign-in.
To revoke access, remove the user from the relevant group in your IdP. Existing Context7 sessions stay valid until they expire, after at most 7 days, or until the user signs out. To block the user in Context7 too, open **Members** and choose **Disable sign-in** in the user's row menu. SSO members can be disabled, but not removed.
## Troubleshooting
### "OIDC SSO is not configured"
The toggle is on but some required fields are missing or the config was not saved. Open the OIDC tab in the SSO card and check that Issuer URL, Client ID, and Client secret are all filled in, then click **Save and apply**.
### Check configuration fails
The most common reasons are:
- **Wrong issuer URL**: double-check it does not include a trailing slash and points to your realm root. For Keycloak, the format is `https://host/realms/realm-name`, not `https://host/auth/realms/realm-name` (the `/auth` prefix was removed in Keycloak 17).
- **Network access**: the Context7 server must be able to reach your IdP's HTTPS endpoint. If you are running air-gapped or on an internal network, confirm there is no firewall blocking outbound requests to your IdP from the server.
### "This account is not assigned a supported Context7 group"
The user authenticated successfully but their token did not contain either of the configured group values. Check that:
1. The groups claim is included in the token from your IdP (use your IdP's token preview or decode the returned JWT at jwt.io).
2. The **Groups claim** field in Context7 matches the claim name exactly (case-sensitive).
3. The **Admin group value** or **Member group value** matches the group name exactly, including casing and spacing.
### "Single sign-on session expired. Please try again."
The short-lived cookie that tracks the in-progress sign-in was lost between the redirect to the IdP and the return. The most common causes are:
- Starting the flow on one hostname and returning on a different one (for example, `localhost:3000` vs `localhost:5173`).
- A browser or proxy stripping the session cookie.
- Taking longer than 10 minutes to complete the IdP login, which is when the cookie expires.
Having the user retry in a clean browser window usually resolves it.
### Redirect URI mismatch
If your IdP returns a redirect URI error, the callback URL you registered in the IdP does not exactly match what Context7 sends. Copy the **Callback URL** from the Context7 settings card using the copy button and paste it verbatim into your IdP's allowed redirect URIs. Pay attention to `http` vs `https` and the port number.
If Context7 is behind a reverse proxy, make sure the proxy forwards the `Host` and `X-Forwarded-Proto` headers correctly so Context7 can build the right callback URL.
---
For anything not covered here, contact [context7@upstash.com](mailto:context7@upstash.com).
# SAML 2.0 SSO
Source: https://context7.com/docs/enterprise/security/saml-sso
> Let your team sign in with any SAML 2.0 identity provider, such as Okta, Microsoft Entra ID, ADFS, Ping or Keycloak.
Context7 On-Premise supports single sign-on with any identity provider (IdP) that speaks SAML 2.0: Okta, Microsoft Entra ID, Active Directory Federation Services (ADFS), Ping Identity, Keycloak, Shibboleth, and others. Team members sign in at your IdP, and Context7 creates or updates their user record on each sign-in. In SAML terms, Context7 is the service provider (SP).
## Before you start
You need:
- Admin access to your identity provider, to register a new SAML application.
- A running Context7 On-Premise instance, served over HTTPS in production.
- A Context7 admin account. On a fresh install it is `admin` / `admin` until you change it.
| Context7 value | URL | Where it goes in your IdP |
| --- | --- | --- |
| **SP metadata URL** | `https://
- IdP URLs must use HTTPS. Plain HTTP is accepted only for `localhost`.
- The metadata must describe one IdP. If yours publishes a federation file with many IdPs, use your own IdP's metadata URL.
- **Single logout URL** is optional. Without it, signing out of Context7 does not sign the user out of the IdP.
Leave these at their defaults unless your IdP needs otherwise:
- **Requested NameID format**: **Let the IdP decide** works for most IdPs.
- **User ID attribute**: identify users by an attribute instead of the NameID. Required when the IdP sends a transient NameID.
- **Email attribute**, **Display name attribute**, **Username attribute** and **Groups attribute**: blank means auto-detect. Context7 recognizes the common names, such as `email` or `mail`, `displayName` or `givenName` and `sn`, `groups` or `memberOf`, and the standard Microsoft (Entra ID and ADFS) claims. Enter a name here only if your IdP uses a different one.
You sign in at your IdP and come back to Context7 signed in. A short **Signing in…** page may appear on the way back.
On the first sign-in Context7 creates the user. On later sign-ins it updates their name, email, role and groups, so changes in your IdP apply at the next sign-in. A session lasts up to 7 days, or less if your IdP sets a shorter session lifetime.
## Signing out
- **From Context7**: if a **Single logout URL** is set, Context7 also signs the user out of the IdP and then returns them to the Context7 login page.
- **From your IdP**: when your IdP sends Context7 a logout request, Context7 ends all of that user's Context7 sessions. The request must be signed by the IdP; unsigned requests are rejected.
## Certificates
**Context7's certificate.** Context7 creates its own key pair the first time SAML is used and stores the private key encrypted. It signs Context7's requests, and your IdP can use it to encrypt assertions. Under the service provider values you can:
- **Download metadata** to give your IdP the current certificate.
- **Use your own certificate**: upload an RSA private key and its certificate in PEM format.
- **Regenerate certificate**: create a new key pair.
Roles follow group membership in your IdP and update at each sign-in. To remove someone's access, remove them from the mapped groups or disable them in your IdP. You can also choose **Disable sign-in** in their row menu on the **Members** page. SSO members can be disabled, but not removed. If your IdP supports single logout, signing them out there also ends their Context7 sessions right away.
## Troubleshooting
### "Sign-in must start from Context7"
The user started from your IdP's app portal. Sign in from the Context7 login page, or turn on **Allow IdP-initiated sign-in**.
### "Single sign-on session expired. Please try again."
The sign-in took more than 10 minutes, started and ended on different hostnames, or lost its cookie at a proxy. Try again in a new browser window.
### "The SAML response signature could not be verified"
Context7 does not have your IdP's current signing certificate, or the IdP did not sign the response. Import the IdP metadata again, and check that your IdP signs the response or the assertion.
### "Unknown SAML issuer" or "audience mismatch"
The IdP entity ID in Context7, or the SP entity ID in your IdP, does not match. Import the IdP metadata again, and check that your IdP uses the **SP entity ID** shown in Context7.
### "SAML response was sent to … not to this service's ACS URL" or "no valid bearer subject confirmation"
The IdP sends users to a different URL than Context7 expects, usually because of a reverse proxy. Check that the proxy sends `X-Forwarded-Proto` and `X-Forwarded-Host`, and that the Assertion Consumer Service URL in your IdP matches the one in Context7 exactly.
### "The SAML assertion has expired or is not yet valid"
The clocks on the Context7 server and the IdP differ by more than 60 seconds. Sync both with NTP.
### "The identity provider sent a transient NameID"
Set your IdP to send a persistent NameID, or set a **User ID attribute** in Context7 that never changes for a user, such as an employee ID.
### "This account is not assigned a supported Context7 group"
None of the user's groups matches the admin or member group value. Check that your IdP sends groups, and that the group values match exactly, including case. For Entra ID, use the group object IDs.
---
For anything not covered here, contact [context7@upstash.com](mailto:context7@upstash.com).
# Library Access Control
Source: https://context7.com/docs/enterprise/security/library-access
> Restrict which libraries each user can query over the MCP and API, based on their SSO groups or individual grants.
By default, every signed-in user can query every library indexed on your instance. Library access control lets you lock specific libraries down so only the right people can reach them. This is useful when you index a repository that only one team has access to in your source control, and you want that boundary to carry over to Context7.
Access is decided per library. A library is either open to everyone or restricted to a set of principals: SSO groups, individual users, or both. Admins always have access to every library.
The table tells you three things at a glance:
- **Access**: whether the library is open to **Everyone** or **Restricted**. Libraries you have not configured follow the longest matching namespace rule and show `via
Anyone in a listed group, plus the users you added, can now query this library. Everyone else stops seeing it.
## Restrict a namespace
A namespace rule covers every library under a path. Use it to control a whole organization in one step:
1. In the **Library Access** section, switch to **Namespaces**.
2. Choose **Add rule**.
3. Enter a prefix, such as `/acme` or `/acme/backend`.
4. Choose **Everyone** or **Restricted**, and add groups and users as for a library.
A prefix matches whole path segments: `/acme` covers `/acme/payments`, but not `/acme-labs/payments`.
Context7 decides each library in this order:
1. The library's own rule, if it has one.
2. The namespace rule with the longest matching prefix.
3. The workspace default.
In the **Libraries** view, a library that takes its access from a namespace rule shows the rule under its access, for example `via /acme/*`.
## How it applies
Access is enforced everywhere a user reaches a library:
- **MCP**: restricted libraries are hidden from library search results, and a documentation request for a library the user cannot access returns the same "not found" response as a library that isn't indexed. Restricted libraries can't be told apart from ones that don't exist.
- **API**: the same filtering applies to library search and documentation requests made with a personal API key.
- **OAuth**: an MCP client that signed in with [OAuth](/enterprise/security/mcp-oauth) acts as the user who approved it. It gets exactly that user's library access, the same as the user's personal API key. OAuth scopes do not widen or narrow it.
- **Dashboard**: members only see the libraries they can access in their library list.
Admins are never restricted. They see and can query every library, which is also how they manage access in the first place.
Successful queries are not logged.
- **Access denials:** Context7 keeps the latest 2,000 and deletes older ones.
- **Rule changes:** kept forever.
- **The page** shows the latest 200 entries.
# OAuth Sign-In for MCP Clients
Source: https://context7.com/docs/enterprise/security/mcp-oauth
> Let MCP clients sign in through the browser, with your company SSO or a workspace password, instead of a personal API key.
MCP clients such as Claude Code, Cursor, VS Code and MCP Inspector can sign in to your deployment with OAuth. The user adds the server URL to the client, the client opens a browser, and the user signs in with the workspace's SSO provider or password and approves the client. No key goes into a config file.
The deployment is its own OAuth 2.1 authorization server and follows the [MCP authorization specification](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization) (2026-07-28). Personal API keys keep working unless you choose **OAuth only**.
## Turn on OAuth
The mode applies to `/mcp` only: `/api/v2`, the other read endpoints and the `ctx7` CLI keep using personal API keys. A dashboard session also works on `/mcp`, for the MCP test page.
**MCP authentication** must be on: a client starts the sign-in only when `/mcp` answers `401`. With it off, `/mcp` answers anonymous callers.
| Setting | Default | Options |
|---|---|---|
| Client ID metadata documents | Any public host | **Any public host**, **Allowlist** (only the hosts you list, such as `claude.ai`), or **Off**. For an air-gapped site, choose **Off** and keep DCR on |
| Dynamic client registration | On | Off refuses new registrations. Registered clients keep working |
When a policy change refuses a client, its authorizations end.
DCR allows 10 registrations per address per hour and 1,000 unused registrations per day. Unused registrations are deleted after 7 days. Behind a reverse proxy or load balancer, every client shares the proxy's address, so set `CONTEXT7_TRUSTED_PROXY_HOPS` to the number of proxies, for example `1` for one ingress. A higher number lets callers choose their address.
**Redirect URIs:** an `https` URI must match a registered URI exactly. `http://127.0.0.1`, `http://[::1]` and `http://localhost` may use any port. Native schemes such as `cursor://` and `vscode://` are allowed. `javascript:`, `data:`, `file:` and plain `http` to other hosts are refused.
## Sign in and approve
The client opens `/oauth/authorize` in the browser. A user without a session signs in with SSO or a password, and then sees the consent page. It shows the account, the app, its client ID, and where the browser goes back to. A DCR client chose its own name, so it is marked **Self-registered**.
The user chooses **Connect** or **Cancel**. A request that is not valid, such as an unknown client or a wrong redirect URI, shows an error page and never sends the browser to the client.
The only scope is `docs:read`. A client reads what the user's [library access rules](/enterprise/security/library-access) allow, as with the user's personal API key.
For client developers: the client gets `401` with `WWW-Authenticate: Bearer resource_metadata="
## Security
| Credential | Lifetime |
|---|---|
| Authorization code | 60 seconds, single use |
| Access token | 1 hour |
| Refresh token | 7 days without use, and at most 30 days after approval |
After 30 days, the user signs in and approves again. Context7 on-premise has no SCIM, so to end access at once, disable the user in Context7.
**Rotation:** every refresh returns a new refresh token. If an old refresh token or a used authorization code comes back, the server revokes the authorization and writes a "token reuse" audit entry. Access tokens are checked against the user on every request, so a disabled or deleted user is refused at once.
**An authorization ends when** the user or an admin revokes it, an admin switches to **Personal API keys** or refuses the client, the client revokes its refresh token (`/oauth/revoke`, RFC 7009), the user's password changes or is reset, or an admin disables or removes the user. An SSO sign-out does not end it.
**Storage:** codes and tokens are stored only as SHA-256 hashes, and no client secrets are issued. Tokens start with `ctx7oc-`, `ctx7oa-` and `ctx7or-`, so logs and support bundles mask them. An access token works only on the `/mcp` resource of the deployment that issued it. In the OAuth modes, a dashboard session token sent as a bearer token is refused on `/mcp`.
**CIMD fetch:** the server fetches the client ID URL from inside your network, so the fetch is limited: `https` only, public addresses only (checked when each connection opens), no redirects, no query strings, at most 64 KB and 5 seconds. Documents are cached for 5 minutes to 24 hours. `NODE_EXTRA_CA_CERTS` applies.
**Audit log:** **Workspace Settings › Audit log** records registrations, approvals, denials, revocations with their cause, token reuse and changes to the OAuth settings. It never records a code, token or PKCE verifier.
**Clickjacking and CSRF:** the consent page and every `/oauth` answer refuse framing. Approval is a `POST` from the deployment's own origin, bound to the signed-in user and to a signed request that expires after 10 minutes and works once.
## Troubleshooting
| Symptom | Cause |
|---|---|
| The OAuth modes are disabled in the settings | `CONTEXT7_PUBLIC_URL` is missing or not a valid origin. The card shows why |
| The client never opens a browser | **MCP authentication** is off |
| "This app cannot sign in" | An unknown client, an unregistered redirect URI, or a CIMD document the server cannot fetch or accept. The reason is in parentheses |
| Registration answers `429` for many users | The server is behind a proxy and `CONTEXT7_TRUSTED_PROXY_HOPS` is not set |
| `(invalid_target)` | The client sent no `resource`, or not `
## Limitations
- With pgvector, vector search runs in Postgres. For typical on-prem workloads this is well within reach; for a very large index, size Postgres accordingly.
- Built-in backups (scheduled and manual) are disabled whenever `DATABASE_URL` is set. Back up PostgreSQL with your provider's managed backups or `pg_dump`, and back up Milvus separately if you store vectors there. See [Backup and Restore](/enterprise/backup-restore).
# Vector Stores
Source: https://context7.com/docs/enterprise/deployment/vector-stores
> Choose where Context7 On-Premise stores embeddings: embedded LanceDB, pgvector, or Milvus
Context7 stores every library's embeddings in a vector store and searches it on each query. The store is chosen independently of the relational database, so you can keep configuration and metadata in one place and send vectors somewhere else ("bring your own store"). This page covers the three backends and how to configure each.
Each library is queued as its own job. Follow progress on the **Parse queue** page while snippets are re-embedded locally.
Because your install didn't parse these libraries from source, it can't refresh them. The Refresh action is disabled for imported libraries. To update one, export a fresh bundle from Context7 Cloud and import it again with **Overwrite existing libraries** enabled.
You can configure up to 10 schedules. Each schedule has a name, a cron expression, and an enabled state. Cron expressions run in the server timezone.
## Before you start
GitOps clones your manifest repository and the repositories it indexes using the Git credentials you configure under **Workspace Settings › GitHub**, **GitLab** or **Other Git**. Connect a GitHub App or a personal access token first; see [GitHub Integration](/enterprise/integrations/github). Automatic syncs on every push require the **GitHub App** (a personal access token cannot receive webhooks).
## Define the classes
Open **Workspace Settings** and select **Authority labels** under **Access**. The classes are on the same card as the **Enable authority labels** switch. While the feature is off, the card marks it as off, and you can still edit the classes. A new instance starts with three classes:
| Class | Default definition |
| --- | --- |
| `standard` | An approved standard or requirement. Follow it unless a newer standard replaces it. |
| `guideline` | Recommended practice. Follow it by default and deviate only with a clear reason. |
| `example` | An illustration of how something was done. It is not a requirement. |
You can rename a class, change its definition, add a class, and remove a class. The order of the list is the order of authority: the top class is the most authoritative. To change the order, drag a class by its handle. With a keyboard, focus the handle and press the up or down arrow key.
You cannot remove a class that a library rule still uses. Change or delete those rules first.
## Assign classes to a library
Open the library, click **Settings**, and find the **Authority** section. When authority labels are off for the workspace, the section shows a notice: you can still edit and save rules, but they do not apply.
- **Library default**: the class for all content in the library, or **Excluded** to hide the whole library.
- **Path rules**: a class for part of the library, or an exclusion. A rule is a **Prefix** or a **Glob**.
Click **Preview** to see which pages a rule matches before you add it. A saved rule that matches no indexed page shows a **no matches** badge. To add a path rule, click **Add**, then click **Save changes**. Context7 saves the whole set of rules together in one request, so a new or changed rule applies only after you click **Save changes**.
### What a rule matches
A pattern that starts with `https://` or `http://` matches the page URL, the same link that appears on the `Source:` line of a result. For Confluence, this is the link that opens the page in your browser. Any other pattern matches the page path:
| Source | Page path |
| --- | --- |
| Git repository | The path inside the repository, for example `/docs/standards/release.md` |
| Website, Confluence, llms.txt, OpenAPI | The path of the page URL, for example `/wiki/spaces/QA/pages/123` |
| Google Drive | The Drive folder path and file name, for example `/QA/Standards/Release sign-off`. A slide uses the path of its presentation. |
| Notion | The title path of the page inside the selected pages and databases, for example `/QA Handbook/Standards/Release sign-off`. A `/` in a page title becomes `/`. |
The path of a page URL includes its query string, if it has one.
A path pattern without a leading `/` gets one, so `standards/` and `/standards/` are the same rule.
A prefix matches whole path segments. `/drafts` matches `/drafts` and `/drafts/plan`, but not `/drafts-old/plan`. In a URL pattern, a `?` or `#` after the prefix also ends the segment. To match the start of a file or folder name, use a glob, for example `/drafts*/**`.
### Library Filters
Restrict which libraries are accessible to your teamspace. You can choose between two modes:
- **Filter by Quality** — set criteria like verification status, minimum trust score, recency, blocked libraries, and more
- **Select Manually** — pick specific libraries or organizations
## Data Handling
### Data Storage
**Context7 does not store your source files.**
- We only index and store **documentation** and **code examples** from repositories
- Your code, and source files are not stored or shared
- All indexed content is stored in a secure vector database optimized for retrieval
**What we store:**
- Library documentation
- Code examples from documentation
- Metadata about indexed libraries
- Queries formulated by the MCP client, used for benchmarking (not stored for Enterprise teamspaces)
**What we don't store:**
- Your source code
- Your original prompts or conversations
- Your conversations with AI assistants
### Privacy by Design
- **Data Minimization**: We only collect and store what's necessary
- **Purpose Limitation**: Documentation data is used only for documentation retrieval
- **Storage Limitation**: Automated cleanup of outdated data
- **Transparency**: Clear documentation of what we collect and why
### GDPR Compliance
Context7 provides:
- The right to access your data
- The right to delete your data
- Data portability options
- Clear consent mechanisms
- Privacy-first data processing
### Data Residency
All indexed documentation and metadata are stored within Upstash's SOC 2 compliant infrastructure in the United States and the European Union.
Cross-border data transfers comply with the EU General Data Protection Regulation (GDPR) and the EU-U.S. Data Privacy Framework (DPF), and enterprise customers can request region-specific data residency to meet local regulatory requirements.
### Data Retention
- **Library Documentation**: Retained while the library is active and public
- **API Logs**: Retained for 30 days for debugging and analytics
- **User Data**: Retained according to your account status
- **Deleted Data**: Permanently removed within 30 days of deletion request
# Infrastructure Security
Source: https://context7.com/docs/security/infrastructure
> The platform-level protections behind Context7, including hosting, abuse prevention, and secure development
The operational and platform-level protections behind Context7, including hosted infrastructure, abuse prevention, and secure development practices.
## Platform Infrastructure
### SOC 2 Compliance
Context7 runs on **SOC 2 compliant infrastructure** provided by Upstash.
- Type II SOC 2 certified infrastructure
- Regular security audits and assessments
- Continuous monitoring and compliance checks
- Industry-standard security controls
### Managed by Upstash
Context7's infrastructure is managed by the experienced Upstash team:
- 24/7 infrastructure monitoring
- Automated security patching
- DDoS protection and mitigation
- Redundant backups and disaster recovery
- Enterprise-grade reliability and uptime
### Upstash Security Practices
All security practices and certificates of Upstash apply to Context7 products:
- **Data Encryption**: Encryption at rest and in transit (TLS 1.2+)
- **Network Security**: VPC isolation, firewall rules, and network segmentation
- **Access Control**: Role-based access control (RBAC) and least privilege principles
- **Audit Logging**: Comprehensive logging of all system activities
- **Incident Response**: Documented incident response procedures
- **Vulnerability Management**: Regular security scanning and penetration testing
## Rate Limiting and Abuse Prevention
- IP-based rate limiting for anonymous requests
- API key-based rate limiting with tiered limits
- Automatic detection and blocking of abusive patterns
- Protection against DDoS and scraping attacks
## Secure Development Practices
- Regular security code reviews
- Automated dependency scanning
- Secure CI/CD pipelines
- Principle of least privilege for all systems
- Security testing in development lifecycle
# Authentication and Access Control
Source: https://context7.com/docs/security/auth-and-access-control
This guide covers the authentication mechanisms and access controls available in Context7, including API key handling and enterprise identity features.
## API Key Security
- API keys use cryptographic random generation
- Keys are stored hashed, never in plain text
- Keys can be rotated at any time from your dashboard
- Rate limiting prevents abuse and unauthorized access
## Enterprise SSO
**Single Sign-On (SSO) is available for Enterprise plans.**
### Supported SSO Providers
- SAML 2.0
- OAuth 2.0
- OpenID Connect (OIDC)
### Enterprise Features
- Centralized user management
- Teamspace access controls
- Audit logs for compliance
- Custom authentication policies
### Setup Guides
For step-by-step configuration on self-hosted deployments, see:
- [Microsoft Entra ID (SSO)](/enterprise/security/entra-sso) — wire up Entra ID sign-in for an On-Premise instance
- [OIDC SSO](/enterprise/security/oidc-sso) — sign in to an On-Premise instance with any OpenID Connect provider
- [SAML 2.0 SSO](/enterprise/security/saml-sso) — sign in to an On-Premise instance with Okta, ADFS, Ping, Keycloak or any SAML 2.0 provider
- [Microsoft Entra ID SSO](/enterprise/enterprise-managed-auth/entra-sso) — sign in to Context7 Cloud with Entra ID over SAML, no Azure subscription needed
- [Azure APIM gateway](/enterprise/enterprise-managed-auth/entra) — optional: proxy the Context7 MCP server through Azure APIM with Entra authentication
Contact our sales team at [context7.com/contact](https://context7.com/contact) for Enterprise plan details.
# Compliance and Reporting
Source: https://context7.com/docs/security/compliance-and-reporting
> How Context7 handles security reporting, transparency, and compliance certifications
How Context7 handles security reporting, transparency, and compliance.
## Reporting Security Issues
If you discover a security vulnerability:
1. **Do not** publicly disclose the issue
2. Report via [GitHub Security](https://github.com/upstash/context7/security)
3. Include detailed steps to reproduce the issue
4. Allow reasonable time for us to address the issue
We take all security reports seriously and will respond promptly.
## Open Source
The Context7 MCP server is open source:
- Code is publicly available on GitHub
- Community can audit and contribute
- Transparent implementation and practices
Repository: [github.com/upstash/context7](https://github.com/upstash/context7)
## Compliance Certifications
Context7 benefits from Upstash's compliance certifications:
- SOC 2 Type II
- GDPR compliant
- ISO 27001 (in progress)
# Data Safety
Source: https://context7.com/docs/security/data-safety
> How Context7 detects prompt injection and malicious content in indexed documentation
## Prompt Injection and Malware Pattern Detection
To prevent malicious content from reaching AI assistants, Context7 screens documentation from public sources before it is indexed.
- **Robust Detection** — Each chunk of content is analyzed by a classifier tailored for Context7 to identify prompt injection attempts and malware-related patterns
- **Blocking** — Content that the classifier flags is not indexed
- **Continuous Monitoring** — Flagged content is tracked and reviewed on an ongoing basis
- **Regular Updates** — Detection logic is updated to address evolving attack methods and new injection techniques
This helps keep documentation retrieved through Context7 safe to consume by both human developers and AI coding agents.
# Best Practices for Users
Source: https://context7.com/docs/security/best-practices
> Recommendations for using Context7 securely across credentials, repository access, and network usage
These recommendations cover how to use Context7 securely across credentials, repository access, and network usage.
## Secure Your API Keys
- Never commit API keys to version control
- Use environment variables for key storage
- Rotate keys regularly
- Use different keys for different environments
- Revoke unused or compromised keys immediately
## Private Repositories
For private repository access:
- Only grant minimum required permissions
- Use dedicated API keys for private repos
- Regularly audit access permissions
- Consider using GitHub Apps with fine-grained permissions
## Network Security
- Use HTTPS for all API communications (enforced)
- Configure proxy settings securely if behind a firewall
- Monitor API usage for unusual patterns
- Implement request timeouts and retries
# Claude Code
Source: https://context7.com/docs/clients/claude-code
> Using Context7 with Claude Code
Context7 integrates with Claude Code to provide current library documentation instead of relying on training data. Set it up with `ctx7 setup`, or install the Context7 plugin.
## Installation
Run the setup command to configure Context7 for Claude Code:
```bash
npx ctx7 setup --claude
```
This flow authenticates via OAuth, generates an API key, and installs the appropriate skill. You can choose between CLI or MCP mode. Login uses the OAuth device flow — it shows a verification link and short code you open on any device, so it works the same locally or on a remote, headless, or SSH host.
Create or manage API keys in the [Context7 dashboard](https://context7.com/dashboard?tab=settings). For manual MCP installation or other configuration options, see [All MCP Clients](/resources/all-clients).
---
## Using Context7
With `ctx7 setup`, a skill is installed that triggers automatically when you ask about libraries — no need to say "use context7". You can also invoke it explicitly:
```
use context7 to show me how to set up a proxy in Next.js 16
use context7 for Prisma query examples with relations
use context7 for the Supabase syntax for row-level security
```
If you know the library ID, use it directly to skip resolution:
```
use context7 with /supabase/supabase for authentication docs
use context7 with /vercel/next.js for app router setup
```
---
## The Context7 Plugin
The Context7 plugin connects Claude Code to the hosted Context7 MCP server (`https://mcp.context7.com/mcp`). It adds the `resolve-library-id` and `query-docs` tools, with no local Node.js, npm, or npx required.
### Installing the Plugin
The plugin is available from the Context7 marketplace. Run these commands in Claude Code:
```
/plugin marketplace add upstash/context7
/plugin install context7@context7-marketplace
```
### Signing In
After installing the plugin, restart Claude Code and run `/mcp`. Select Context7 and follow the browser sign-in flow. No API key is required.
Alternatively, select **Edit JSON** and use this configuration:
```json
{
"mcpServers": {
"context7-api-key": {
"url": "https://mcp.context7.com/mcp",
"headers": {
"Context7-API-Key": "YOUR_CONTEXT7_API_KEY"
}
}
}
}
```
Alternatively, add it as a custom MCP connection with your API key:
1. Navigate `Settings` > `Connectors` > `Custom MCP`.
2. Fill in the configuration:
| Field | Value |
| ------------------ | ------------------------------ |
| **Server Name** | `Context7` |
| **Transport Type** | `HTTP` |
| **Server URL** | `https://mcp.context7.com/mcp` |
| **Custom headers** | `CONTEXT7_API_KEY`: `YOUR_API_KEY` |
3. Click `Save`.
Every push to the production branch creates a new deployment. Pull requests get a preview site.
Next, learn [how production and preview builds work](/docs7/builds) or browse the [MDX components](/docs7/components/callouts).
# Plans & Pricing
Source: https://context7.com/docs/docs7/plans
> What Docs7 Free and Pro include
Docs7 is free to start. A Free teamspace can host up to three documentation sites with most Docs7 features, including the Context7 Agent. Pro adds private repositories and unlimited AI use.
| Feature | Free | Pro |
| --- | --- | --- |
| Price | $0 | $200 / month |
| Sites | 3 | 3 included, $200 / month for each additional site |
| **For agents** | | |
| [Markdown pages, `llms.txt`, and an Agent Skill](/docs7/agent-readiness) | ✓ | ✓ |
| Automatic [Context7](/overview) library updates | ✓ | ✓ |
| [Ask endpoint and WebMCP](/docs7/agent-readiness) | ✓ | ✓ |
| [AI Visibility and analytics](/docs7/ai-visibility) | 7-day history | 90-day history |
| [Context7 Agent](/docs7/agent) | Limited usage | Unlimited |
| [PR Review Agent](/docs7/agent#pr-review-agent) | Limited usage | Unlimited |
| [Code Watch Agent](/docs7/agent#code-watch-agent) | Public repositories, limited usage | Unlimited, private repositories too |
| [Example Check Agent](/docs7/agent#example-check-agent) | — | Monthly checks |
| **For people** | | |
| [Custom domain](/docs7/custom-domains) | ✓ | ✓ |
| API playground | ✓ | ✓ |
| AI chat assistant | Limited usage | Unlimited |
| [Feature requests](/docs7/feature-requests) | ✓ | ✓ |
| **For your team** | | |
| [Mintlify compatible](/docs7/migrate-from-mintlify) | ✓ | ✓ |
| [Preview deployments](/docs7/builds) for each pull request | ✓ | ✓ |
| [CLI deploys](/docs7/cli) | ✓ | ✓ |
| Private repositories | — | ✓ |
| Team support | — | ✓ |
"Limited usage" is a monthly allowance for each site. It resets at the start of each month. When a site uses its allowance, the agent or assistant stops for that site until the reset.
Free sites show a **Built with Docs7** link in the footer. All sites run on the same [SOC 2 Type II infrastructure](/security/infrastructure).
## Upgrade and downgrade
The teamspace owner changes the plan on the [Docs7 page](https://context7.com/docs7). When you downgrade to Free, you choose up to three public sites to keep. Docs7 removes the other sites. The current build of each site that you keep stays online.
Docs7 plans are separate from [Context7 plans](/plans-pricing).
# Docs7 configuration
Source: https://context7.com/docs/docs7/configuration
> Configure Docs7-only fields in docs.json
Docs7 supports the `docs.json` format that was established by Mintlify. We also support options beyond this spec to make your documentation easier to navigate and to create custom content groups.
## Validate docs.json in your editor
Point `$schema` at the Docs7 schema. Your editor then completes and checks the Mintlify fields and the Docs7-only fields on this page.
```json docs.json
{
"$schema": "https://context7.com/schema/docs7.json"
}
```
## Group products
Product groups add a product switcher to the sidebar. A reader picks a product, and the sidebar shows only the pages for that product.
To set this up, add a `productGroups` list to one tab. That tab shows the product switcher. The tab's own pages fill the sidebar until the reader picks a product. Each product then lists its own pages. If your docs have several versions or languages, add the list to one tab in each of them.
```json docs.json
{
"navigation": {
"tabs": [
{
"tab": "Documentation",
"pages": ["index"],
"productGroups": [
{
"group": "Products",
"products": [
{
"product": "Redis",
"icon": "/images/redis.svg",
"description": "Serverless Redis",
"pages": ["redis/overview", "redis/get-started"]
}
]
},
{
"group": "Utility",
"products": [
{
"product": "Rate Limit",
"pages": ["ratelimit/overview", "ratelimit/get-started"]
}
]
}
]
},
{
"tab": "API Reference",
"pages": ["api/introduction"]
}
]
}
}
```
In this example:
- The Documentation tab shows the product switcher. Until the reader picks a product, the sidebar shows the index page.
- Redis and Rate Limit are the two products. Each one lists the pages that appear when it is selected.
- The API Reference tab is a normal tab and does not use product groups.
Rules:
- Each product needs either a list of pages or a list of groups, not both.
- That list must have at least one entry.
- Inside one tab, product names must be unique, and group names must be unique.
If you do not add product groups, Docs7 uses your regular navigation.
## Enable sidebar filtering
Set `filterSidebar` to `true` to add a filter above the sidebar. Readers can press `/` to focus it.
```json docs.json
{
"filterSidebar": true
}
```
The default value is `false`.
## Show Docs7 attribution
Set `poweredByDocs7` to `true` to add a **Built with Docs7** link to the footer. The link opens [the Docs7 page](https://context7.com/docs7).
```json docs.json
{
"poweredByDocs7": true
}
```
The default value is `false`. Docs7 always shows this link for sites on the Free plan.
## Ask for cookie consent
Set `consentBanner` to `true` to ask visitors for cookie consent before your analytics and marketing integrations load.
```json docs.json
{
"consentBanner": true,
"integrations": {
"ga4": { "measurementId": "G-XXXXXXXXXX" }
}
}
```
New visitors see a banner with **Reject all**, **Accept all**, and **Customize**. **Customize** lets them turn each category on or off:
- **Analytics**: Adobe Analytics, Google Analytics, Google Tag Manager, Heap, Microsoft Clarity, Plausible, and Segment.
- **Marketing**: Clearbit and Koala.
An integration loads only after the visitor accepts its category. The footer shows a **Cookie settings** link, so visitors can change their choice at any time.
The banner shows only when your site uses at least one of these integrations. It does not show in previews.
The banner does not control Intercom. The Intercom chat widget loads for every visitor, with or without the banner.
The default value is `false`. Without the banner, your integrations load for every visitor.
## Add an agent setup menu
Set `agentSetup` to add a second button next to **Copy as Markdown** on every page. Use it to give readers what their coding agent needs: a prompt, your MCP server URL, or a command that installs your skills.
```json docs.json
{
"agentSetup": [
{
"title": "Copy prompt",
"description": "Paste it into Claude Code, Cursor or any agent.",
"copy": "Set up Acme in this project. Read https://docs.acme.com/llms.txt first."
},
{
"title": "Copy remote MCP URL",
"copy": "https://mcp.acme.com/mcp"
},
{
"title": "Copy skills command",
"copy": "npx skills add acme/skills"
},
{
"title": "See all agent resources",
"href": "/agent-resources"
}
]
}
```
The first item is the button. A chevron next to it opens the other items. Each item has these fields:
- `title` (required): the label of the item.
- `copy` or `href` (one of the two is required): `copy` puts the text on the clipboard. `href` opens the link in a new tab. A link must be an `http://` or `https://` URL, or a path on your site.
- `description`: text under the title in the menu. When the button copies its text, the description also shows under the button.
- `icon`: an icon name, as in other `icon` fields. The default is a copy icon for `copy` and an arrow for `href`.
Without `agentSetup`, Docs7 does not show the menu.
# Custom Domains
Source: https://context7.com/docs/docs7/custom-domains
> Serve your docs from your own domain or from a path on your website
Every Docs7 site gets a `*.docs7.io` URL. You can also serve it from an address you own:
- **Its own domain**, such as `docs.example.com`. You add DNS records, and Docs7 serves the site and issues its HTTPS certificate.
- **A path on an existing website**, such as `example.com/docs`. Your website sends that path to Docs7 through a reverse proxy.
When you save a custom URL, Docs7 rebuilds the production site. Canonical URLs, the sitemap, and `llms.txt` then use the new address.
| Type | Name | Value |
| --- | --- | --- |
| `CNAME` | `docs.example.com` | `cname.docs7.io` |
| `TXT` | `_cf-custom-hostname.docs.example.com` | Shown in the dashboard |
The `CNAME` record sends traffic for the domain to Docs7. The `TXT` record verifies the hostname. Docs7 can show more records, for example when the certificate authority asks for DNS validation. Add every record in the table.
Your Mintlify deployment stays online until you move the domain.
## 3. Move the domain
If you use a custom domain, add it to the Docs7 site. Docs7 shows the DNS records it needs. Add the `TXT` records, then change the `CNAME` to Docs7. Docs7 issues the HTTPS certificate a few minutes after the `CNAME` points at Docs7.
See [Custom Domains](/docs7/custom-domains) for each record and for serving the docs from a path.
After the switch, remove the Mintlify GitHub integration so one push does not deploy to both services.
# Builds
Source: https://context7.com/docs/docs7/builds
> Configure production builds, previews, and local builds
Publish from a connected GitHub repository or upload local files with [`docs7 deploy`](/docs7/cli#deploy). For GitHub sites, Docs7 reads the configured documentation folder whenever it builds.
The folder must contain `docs.json` or `mint.json`. It can also contain MDX pages, assets, snippets, OpenAPI files, and any other files referenced by the documentation.
## Build settings
For a GitHub site, open **Docs7**, choose a site, then open **Settings**.
| Setting | What it controls |
| --- | --- |
| **Slug** | The site's `*.docs7.io` hostname. Changing it moves the production site and its previews. |
| **Production branch** | The branch used for production builds. Leave it on the GitHub default branch, or select another branch. |
| **Docs path** | The repository-relative folder that contains `docs.json` or `mint.json`. Use `.` for the repository root. |
Branch and docs path changes take effect on the next deployment. You can also serve the site from [its own domain or from a path](/docs7/custom-domains) such as `example.com/docs`.
## Production builds
Docs7 starts a production build when:
1. You publish a site for the first time.
2. You push a commit to the production branch.
3. You click **Redeploy** in Docs7.
4. You run `docs7 deploy` for a CLI site.
For GitHub builds, Docs7 resolves the exact commit, checks out the repository, and reads the configured docs path. CLI builds use the uploaded local files instead. Both render the pages, build the search index, run documentation health checks, and publish the completed release.
Publication happens only after the release is ready. If a build fails, the previous successful release stays live.
## AI requests
An AI request is one visit from a tracked AI product. It is not a unique person, conversation, citation, or answer. One product can make several requests while researching a question.
The provider ranking groups requests by product. The activity chart shows request volume over time and can be filtered by provider.
## Included providers
Docs7 currently tracks:
- OpenAI
- Claude
- Perplexity
- Cursor
- OpenCode
- Meta
- Mistral
- Grok (xAI)
## Visitors and views
Docs7 records a page view for a document navigation from a browser after filtering known AI crawlers and generic bots.
| Metric | Meaning |
| --- | --- |
| **Visitors** | Privacy-preserving daily visitor identifiers in the selected window. |
| **Views** | Document page views in the selected window. |
| **Country** | The countries with the most visitors. |
| **Visitor activity** | Visitors or views plotted by day. |
Visitor identifiers are derived from the day, site, IP address, and user agent, then stored as a hash. Docs7 does not store the raw IP address. Because the identifier changes daily, the same browser can count again on a later day.
## Searches
The search report shows what readers type into the site's search box, how many times each query was used, and how many visitors searched for it.
Search runs as the reader types. Docs7 counts one reader's edits as one search, recorded under the last query, while the reader keeps typing with pauses shorter than 30 seconds. For example, `rate`, `rate l`, and `rate limit` count as one search for `rate limit`.
A **No results** label means every recorded search for that term returned no result. Use these terms to find missing pages, missing vocabulary, or titles that do not match the words readers use.
## Assistant questions
This report covers questions visitors send to the documentation assistant. It shows the total number of questions and conversations.
Questions are grouped into topics once per day. Expand a topic to see recent examples. Questions that have not been grouped yet appear under **Uncategorized**.
## Top pages and referrers
**Top pages** ranks documentation paths by visitors and views. **Referrers** shows where visitors came from. Requests without a referrer are grouped under **Direct**.
Use Top pages to see what readers rely on, then compare it with Searches and Assistant questions. A frequently requested topic with no strong destination page is a concrete documentation gap.
There are five agents:
- **Context7 Agent** turns the questions that AI agents ask Context7 about your docs into docs fixes.
- **Build Fix Agent** fixes the errors and warnings that a build finds in your docs.
- **PR Review Agent** reviews documentation changes in each eligible pull request.
- **Code Watch Agent** updates the docs when a pull request merges in your code.
- **Example Check Agent** runs the code examples in your docs against your services and fixes the ones that fail.
The **Agents** card holds each agent's settings, and the **Activity** card below it lists every run of every agent, newest first. Select a run to open its pull request on GitHub.
The agents work on the Free plan with a monthly allowance for each site. Pro has unlimited use. See [Plans & Pricing](/docs7/plans).
## Context7 Agent
The Context7 Agent works from suggestions. Suggestions come from the questions that AI agents ask Context7 about your docs. When its schedule comes around, the agent picks up the pending suggestions on its own.
A run verifies each suggestion against the repository and edits only the configured docs path. Up to 10 suggestions go into one pull request. A run waits while its last pull request is still open, so unreviewed pull requests do not stack up.
### Schedule
New sites start with the schedule disabled. Turn the agent on and choose **Daily** or **Weekly**. Turning it on selects **Weekly** first. A scheduled run starts only when at least one suggestion is waiting.
## Build Fix Agent
Build issues come from the latest live production build. They cover fixable page errors, broken internal links, unknown components, and source warnings. The Build Fix Agent needs Docs7 hosting, because the issues come from a Docs7 build.
A run fixes up to 20 issues in one pull request. It waits while its last pull request is still open, and it skips the issues its last finished run took, so a closed pull request does not come back after every build.
### Schedule
Choose **After each build**, **Daily**, or **Weekly**. New sites start with it off, and turning it on selects **After each build** first.
An after-build run starts once a production build finishes. A daily or weekly run starts on that schedule.
## PR Review Agent
The PR Review Agent starts 5 minutes after an eligible pull request preview finishes, so a quick follow-up push replaces the review before it uses a run. For a repository that Docs7 does not host, there is no preview: the review starts 5 minutes after the pull request is opened or receives a new commit. It reviews only files inside the configured docs path and posts its findings in the pull request's Docs7 summary.
New sites start with PR reviews disabled and **Comment only** selected.
### Checks
Every review runs every check:
- **Broken links**: broken internal links, dead external links, and links to missing headings in changed docs files.
- **Build health issues**: new fixable issues introduced by the preview compared with production.
- **Grammar and spelling**: mistakes in text added or changed by the pull request.
- **Docs conventions**: changed pages against repository instructions and nearby documentation patterns.
Build health finds issues only on a hosted Docs7 site. The other checks also run for a repository connected only for the agent.
### Response modes
The findings comment is always posted. The response mode controls what happens to fixes:
- **Comment only** reports findings and does not change files.
- **Open a fix PR** opens a separate pull request with supported fixes.
- **Commit to branch** pushes supported fixes to the pull request branch. If the branch refuses the push, Docs7 opens a pull request against it instead.
Docs7 skips pull requests from forks and pull requests that do not change the configured docs path. It also skips commits created by the agent, which prevents review loops.
### Add variables
Select **Edit**, then open the variables in the Example Check Agent row and add the environment variables your code examples read, for example `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN`. To add many at once, paste the contents of a `.env` file into any field: each line becomes one variable.
Docs7 encrypts every value and never shows it again. A URL goes into the sandbox where the code runs. Any other value is a secret and never enters the sandbox: Docs7 sends it in one header of HTTPS requests to one host: `Authorization: Bearer
## Add the page
Feature Requests is off for a site until one of its pages has the `
The agent reads your navigation, chooses a place for the page, and opens a pull request with the new page and its navigation entry. The card shows a link to the pull request. Merge it, and Feature Requests turns on with the next production build.
The run uses one agent run of the site. This option needs a site that is connected to GitHub.
### Add it yourself
Add the component to a page in your docs repository. The page can have any path and any place in your navigation.
```mdx feature-requests.mdx
---
title: "Feature requests"
description: "Ask for a feature or vote for one."
---
Tell us what is missing. Vote for the requests that you need, or add your own.
| Action | Result |
| --- | --- |
| **Ship** | Moves the request to **Shipped**. You can add the URL of the page that documents the feature. Readers and agents that ask for it again get that link. |
| **Reopen** | Moves a shipped request back to **Requested**. |
| **Delete** | Removes the request and its votes. You cannot undo this. |
Owners and admins can change requests. Developers can read the list.
For example, an agent that requests `/config.md` on a site whose page lives at `/configuration.md` receives that page as a suggestion. The agent can follow it directly without running a separate search, so a wrong guess costs one extra request instead of a dead end.
## Write content for agents
Use the same source for people and agents whenever possible. When an agent needs extra context, use `Visibility`:
```mdx