docs/howto/claiming-libraries.mdx
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, and llms.txt sources.</Note>
Claiming ownership provides several benefits:
**From the Dashboard:**
Find your library in the dashboard and click the "Manage" button to open the admin configuration page.
<Frame>
</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`
<Frame>
</Frame>
<Frame>
</Frame>
The modal provides a JSON snippet like this:
```json
{
"url": "https://context7.com/vercel/next.js",
"public_key": "pk_abc123xyz..."
}
```
Click "Copy" to copy the configuration to your clipboard.
```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>
After claiming your library, the admin page shows a full configuration editor with five main tabs:
These fields are available for all library types.
| Field | Description | Limits |
|---|---|---|
| Project Title | Display name for your library in Context7. Used when the LLM cannot generate a name with high confidence. | Max 100 characters |
| Description | Brief description of your library's purpose. | Max 500 characters |
#### Exclusion Pattern Examples
The exclusion fields support various pattern types:
```
node_modules → Excludes any folder named "node_modules" anywhere
./build → Excludes "build" only at repository root
**/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>
| 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:
Available for Git repositories and websites.
| Field | Description | Limits |
|---|---|---|
| Skip Automatic Version Detection | By default, outdated library versions are automatically detected and excluded from indexing. Enable to include all versions regardless of age. | Boolean |
| Redirect URL | Redirect users to a different library. Leave empty to disable. | Max 500 characters |
| Disallow Indexing | Opt-out from Context7. When enabled, documentation content is removed and the library becomes inaccessible. | Boolean |
The Versions tab lets you configure previous versions of your library that should be available in Context7.
<Frame> </Frame>You can add versions using either:
v1.2.0)release-1.x)| Limit | Value |
|---|---|
| Maximum versions | 20 |
| Tag/branch name | Max 50 characters |
The Metrics tab provides insights into how developers are using your library through Context7.
<Frame> </Frame>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 team members can view and edit library settings. See Teamspace Management for role details.</Note>
Ensure the file is:
context7.json (lowercase)The url field in your context7.json must exactly match:
https://context7.com/{owner}/{repo}
Check for typos, case sensitivity, and trailing slashes.
The public_key in your file must match the key shown in the claiming modal. Copy the entire key including the pk_ prefix.
After saving configuration changes, you may need to: