> ## Documentation index
> Fetch the complete documentation index at: https://upstash-context7-git-ctx7-4280-helm-registry-login-c44ca5.docs7.io/llms.txt
> Ask it with GET https://upstash-context7-git-ctx7-4280-helm-registry-login-c44ca5.docs7.io/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.
> Feature requests: https://upstash-context7-git-ctx7-4280-helm-registry-login-c44ca5.docs7.io/resources/feature-requests.md lists what users asked for and how to vote for a request or add one.
> Page rating: `GET https://upstash-context7-git-ctx7-4280-helm-registry-login-c44ca5.docs7.io/feedback?path=/howto/claiming-libraries&helpful={true|false}&comment={comment}` records whether this page helped. The `comment` (URL-encoded, at most 500 characters) says what helped, or what was missing or wrong; a `helpful=false` rating needs it. It is anonymous and needs no key. Comments hold no code, secrets or personal data.

# Claim Your Library

> Verify ownership and manage your library's configuration via the admin panel

As a library owner, you can claim your library on Context7 to unlock advanced configuration options through a web-based admin panel. This gives you full control over how your documentation is parsed and presented to developers.

<Note>Library claiming is available for Git repositories, websites, llms.txt sources, and OpenAPI specs added by URL.</Note>

## Why Claim Your Library?

Claiming ownership provides several benefits:

- **Web-based configuration**: Edit settings through a user-friendly interface instead of committing changes
- **Teamspace management**: All project members can manage the library configuration
- **Version management**: Add and manage multiple versions of your library documentation
- **Usage analytics**: View metrics on how developers use your library's documentation
- **Higher refresh limits**: Get higher rate limits for refresh operations to better manage your content
- **Apply for verification**: Only owners can apply for the verified badge. [Learn more about verification](/howto/verification)

## Claiming Process

<Steps>
  <Step title="Navigate to the Admin Page">
    You can access the admin page in two ways:

    **From the Dashboard:**
    Find your library in the **Owned Sources** list on the dashboard and click its row to open the admin configuration page. You can also click the **Admin** button on the library page.

    <Frame>
      <img src="/images/dashboard/admin/library-manage-button.png" alt="Admin button on library page" />
    </Frame>

    **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`

  </Step>

  <Step title="Open the Claim Modal">
    If you haven't claimed the library yet, you'll see a "Claim to manage" button in the header. Click it to open the claiming modal.

    <Frame>
      <img src="/images/dashboard/admin/claim-library-button.png" alt="Claim Library button" />
    </Frame>

  </Step>

  <Step title="Get Your Public Key">
    In the claiming modal, you'll see a generated `context7.json` configuration with your unique public key:

    <Frame>
      <img src="/images/dashboard/admin/claim-modal.png" alt="Claim library modal" />
    </Frame>

    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.

  </Step>

  <Step title="Host the context7.json File">
    <Tabs>
      <Tab title="Git Repository">
        Create a `context7.json` file in the **root** of your repository with the copied content:

        ```json
        {
          "url": "https://context7.com/vercel/next.js",
          "public_key": "pk_abc123xyz..."
        }
        ```

        <Warning>
          The `url` must exactly match your library's URL on Context7, and the `public_key` must match the key shown in the modal.
        </Warning>

        Commit and push the file to your repository's default branch.
      </Tab>
      <Tab title="Website / llms.txt">
        Host the `context7.json` file anywhere under your library's base URL so it is publicly reachable. For example:

        ```
        https://docs.example.com/mylib/context7.json
        ```

        The file must contain the copied content:

        ```json
        {
          "url": "https://context7.com/websites/mylib",
          "public_key": "pk_abc123xyz..."
        }
        ```

        <Warning>
          The `url` must exactly match your library's URL on Context7, and the `public_key` must match the key shown in the modal.
        </Warning>

        Once the file is live, paste the full URL to your hosted `context7.json` into the input field shown in the modal.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Verify Ownership">
    Click "Claim Library". Context7 will fetch your `context7.json`, verify the URL and public key, and grant you access to the admin panel.
  </Step>
</Steps>

## Admin Panel Overview

After claiming your library, the admin page shows a full configuration editor with these tabs:

- **Configuration**: Edit all library settings
- **Chat**: Embed an AI chat assistant on your documentation site
- **Benchmark**: Evaluation of the quality of your library's documentation
- **Metrics**: View usage statistics
- **Versions**: Manage different versions and tags of your library (Git repositories and websites)

## Configuration Fields

### Basic Information

These fields are available for all library types.

| Field             | Description                                                                                               | Limits             |
| ----------------- | --------------------------------------------------------------------------------------------------------- | ------------------ |
| **Project Title** | Library name shown on Context7 and given to coding agents. Replaces the generated name.                   | Max 100 characters |
| **Description**   | Brief description of your library's purpose, shown on Context7 and given to coding agents.                | Max 500 characters |

Context7 checks a new title or description before it saves it. If the text gives instructions to AI agents, or is a slogan or promotional offer instead of a description of the library, the save fails with a reason and the current text stays.

### Source Settings

<Tabs>
  <Tab title="Git Repository">
    | Field                  | Description                                                                               | Limits                          |
    | ---------------------- | ----------------------------------------------------------------------------------------- | ------------------------------- |
    | **Branch**             | Git branch to parse. Leave empty for default branch.                                      | Max 100 characters              |
    | **Folders to Include** | Specific folder paths to include when parsing. Leave empty to scan the entire repository. | Max 50 folders, 255 chars each  |
    | **Folders to Exclude** | Folder paths or patterns to exclude from parsing. Supports glob patterns.                 | Max 50 patterns, 255 chars each |
    | **Files to Exclude**   | Specific file names to exclude (filename only, not full path).                            | Max 100 files, 255 chars each   |

    #### Exclusion Pattern Examples

    The exclusion fields support various pattern types:

    ```
    node_modules     → Excludes any folder named "node_modules" anywhere
    **/dist          → Excludes any "dist" folder anywhere (globstar)
    docs/**/internal → Excludes "internal" folders under docs
    *.test           → Excludes folders ending with .test
    ```

    <Note>
      `excludeFiles` only accepts filenames, not paths. Use `CHANGELOG.md` instead of
      `docs/CHANGELOG.md`.
    </Note>
  </Tab>
  <Tab title="Website">
    | Field                        | Description                                                                                      | Limits                          |
    | ---------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------- |
    | **Base URL**                 | The root URL to crawl for documentation.                                                         | Max 100 characters              |
    | **Display URL**              | Optional URL shown to users instead of the base URL.                                             | Max 500 characters              |
    | **Query parameters**         | Keep or drop the part after `?`. Keep treats URLs with different query strings as distinct pages, and is the default. With Drop, links that carry the start page's own query parameters are still crawled. | Keep / Drop                     |
    | **URLs to exclude**          | URL patterns to exclude from crawling. Supports wildcards.                                       | Max 100 patterns                |

    <Note>
      The crawl stays under the Base URL. A Base URL without a trailing slash is a plain
      prefix, so `https://example.com/docs/api/admin` also includes
      `https://example.com/docs/api/admin-graphql/...`. Add a trailing slash to keep the
      folder boundary: `https://example.com/docs/` includes `/docs` and `/docs/x` but
      not `/docs-old`.

      Hash fragments (`#...`) are not indexed. Pages that differ only by their fragment, such as
      hash-routed documentation sites, are crawled as a single page.

      A URLs to exclude pattern that leaves out old releases does not stop a version at that URL
      from being crawled.

      A library that was first added at a page inside the site crawls from that page, not from the
      Base URL. Saving a new Base URL moves the crawl to the Base URL when that page is outside it;
      a page still under the new Base URL stays the start page.

      A crawl recovers from a start page the site has since moved or removed: when the start page is
      gone, the crawl starts from the nearest live page above it in the scope, or from the Base URL;
      when the page or its site moved to a new host, the crawl follows it there. These recoveries
      do not change the saved settings.
    </Note>
  </Tab>
</Tabs>

### AI Instructions

| Field            | Description                                                                     | Limits                       |
| ---------------- | ------------------------------------------------------------------------------- | ---------------------------- |
| **Custom Rules** | Best practices and guidelines for AI coding assistants when using your library. | Max 50 rules, 255 chars each |

Example rules:

- "Always use TypeScript for better type safety"
- "Import components from the main package, not internal paths"
- "Use environment variables for API keys, never hardcode them"

### Advanced Settings

Git repositories and websites have a **Version detection** field. By default, outdated library versions are automatically detected and excluded from indexing. Select **Index every version, old ones too** to include all versions regardless of age.

Private repositories also have a **Generate docs** field. An AI agent writes documentation from the source code on each refresh with new commits, and each run is billed as parsing. When disabled, the next refresh removes the generated pages.

These cards are available for all library types, below the configuration editor:

| Card               | Description                                                                                                 |
| ------------------ | ----------------------------------------------------------------------------------------------------------- |
| **Redirect**       | Redirect users to a different library. Remove the redirect to disable it.                                   |
| **Block indexing** | Opt-out from Context7. When enabled, documentation content is removed and the library becomes inaccessible. |

Context7 refuses a redirect to the library itself, a redirect that would form a loop, and a chain longer than three redirects, counting libraries that already redirect to yours. Readers follow up to three redirects. Point the redirect at the library the chain ends at.

## Managing Versions

The Versions tab shows the versions of your library that are available in Context7. Context7 chooses and adds the versions of the most popular public libraries itself. You add versions to every other library.

<Frame>
  <img src="/images/dashboard/admin/managing-versions.png" alt="Versions tab" />
</Frame>

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.

<Frame>
  <img src="/images/dashboard/admin/library-metrics.png" alt="Metrics tab" />
</Frame>

### 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.

<Note>All members of the teamspace that owns the library can view and edit library settings. Only owners and admins can transfer or remove ownership. See [Teamspace Management](/howto/teamspace) for role details.</Note>

## Removing Ownership

<Steps>
  <Step title="Go to the Admin Page">
    Navigate to your library's admin page at `https://context7.com/{owner}/{repo}/admin`.
  </Step>
  <Step title="Open the Ownership Menu">Click the "⋮" ownership menu in the header area.</Step>
  <Step title="Remove Ownership">Select "Remove ownership" and confirm the action.</Step>
</Steps>

<Warning>
  Removing ownership keeps the admin configuration intact. Another user can claim the library and
  inherit the existing settings.
</Warning>

## Troubleshooting

### "context7.json not found"

Ensure the file is:

- Named exactly `context7.json` (lowercase)
- Located in the repository root, not a subdirectory
- Committed and pushed to the default branch

### "URL mismatch"

The `url` field in your `context7.json` must exactly match:

```
https://context7.com/{owner}/{repo}
```

Check for typos, case sensitivity, and trailing slashes.

### "Public key mismatch"

The `public_key` in your file must match the key shown in the claiming modal. Copy the entire key including the `pk_` prefix.

### "Ownership of a private repository cannot be verified with context7.json"

A private repository is not claimed with `context7.json`. The teamspace that adds a private repository becomes its owner automatically, so manage the library with that teamspace selected. If another teamspace added it, ask its owner or an admin to make the change.

### Changes not appearing

After saving configuration changes, you may need to:

- Manually trigger a refresh from the library page
- Clear any cached documentation on your end
