- Your AI providers receive the content needed for parsing, embedding, reranking, and source-code documentation.
- Context7 Cloud receives license checks, a daily usage report, and public library searches, but only with an online license. See Network and data flow.
What’s Included
- Full Context7 parsing and indexing pipeline
- Local vector storage (no external vector DB required)
- Built-in MCP server. Works with any MCP-compatible AI client
- Web UI for managing indexed libraries and configuration
- REST API compatible with the public Context7 API
- Private GitHub and GitLab repository ingestion

Language Support
Context7 indexes documentation in any human language. Which pages a library keeps depends on its source:
For Google Drive and Notion libraries, Context7 detects the library language when you leave it empty.
Before 2.0.1, a long document in a mixed-language Google Drive or Notion library could lose a section in another language. After you upgrade, sync each such library once with Re-index all files (Google Drive) or Re-index all pages (Notion) selected.Before 2.0.2, Git repositories skipped pages that were not in the library’s language. After you upgrade, refresh each Git library that mixes languages once, so that Context7 indexes those pages.
docs/en and docs/de, exclude the folders you don’t need in the repository settings to avoid duplicate results.
Setup
1
Request a trial
Go to context7.com/plans and click Learn More on the Enterprise plan, then click Request On-Premise Trial. Fill out the request form. No credit card required. You’ll receive a 30-day full-featured license key via email once approved.
2
Deploy
Follow the deployment guide for your platform:
Docker
Deploy with Docker Compose
Kubernetes
Deploy on Kubernetes with raw manifests
3
Complete the setup wizard
Open
http://localhost:3000 in your browser. On first launch, the setup wizard guides you through configuring:- AI Provider - Choose OpenAI, Anthropic, Google (Google AI Studio or Google Vertex AI), AWS Bedrock, or a custom OpenAI-compatible endpoint. Enter the provider credentials and model name.
- Embedding Provider - Use the same provider as your LLM, or configure a separate one for embeddings.
- Git Tokens - Add a GitHub and/or GitLab token for the platforms you use.
4
Ingest your first repository
From the dashboard, click Add source, choose GitHub or GitLab, and enter the repository URL. Once ingestion completes, your private docs are ready to query.You can also add libraries via the REST API with a personal API key (see Authentication):
Connecting Your AI Client
The Context7 CLI is the recommended way to connect an AI coding agent. Install it once on the machine that runs your client:- Public npm registry
- Internal npm registry
ctx7 package and its dependencies in your approved internal npm registry. Once installed, on-premise setup does not contact npm, GitHub, or Context7 Cloud. It uses bundled rule and skill content and contacts only your deployment to discover its MCP authentication setting.
Pass the root URL of your deployment (without /mcp or /api) and select the client:
- Claude Code
- Cursor
- VS Code
- Codex
- OpenCode
--api-key or set CONTEXT7_API_KEY to a personal key (ctx7op-). With OAuth only, setup refuses --api-key and ignores CONTEXT7_API_KEY. --api-key takes precedence over CONTEXT7_API_KEY. Without --api-key, setup ignores a CONTEXT7_API_KEY that is not a personal key, such as a hosted Context7 key, and prints a warning. Keyless setup needs ctx7 0.13.0 or later: an older version asks for a key, and OAuth only refuses that key. The dashboard’s Connect card shows the same keyless setup.
When the deployment accepts only personal API keys, the dashboard’s Connect card presents two steps: sign in and click Create API key, then copy the command after the dashboard inserts the one-time-visible key. Select Configure manually to reveal the equivalent client-native configuration instead. If you run the base command without --api-key, the CLI requests the key with hidden input.
For non-interactive automation, provide the personal key through the environment:
--api-key ctx7op-... instead, but command-line arguments may be retained in shell history. Setup writes the MCP client configuration, a Context7 rule, and a bundled context7-mcp skill. The bundled files mean the deployment does not need to expose Context7 Cloud’s skill APIs.
Custom
--base-url setup uses the deployment’s Streamable HTTP endpoint. Local stdio transport and the CLI + Skills setup mode are not available for on-premise targets. OAuth sign-in needs CONTEXT7_PUBLIC_URL on the server. See OAuth Sign-In for MCP Clients.Query from the CLI
Without an MCP client,ctx7 library and ctx7 docs query the deployment directly. Set its root URL and a personal API key once:
/api. ctx7 search, ctx7 code and ctx7 get-upgrade-guide are available only on hosted Context7.
Manual configuration
If your client is not supported byctx7 setup, point it at <deployment-root>/mcp.
With OAuth sign-in, add only the URL. The client signs in on its first request:
Configuration
Environment Variables
These are set in yourdocker-compose.yml or .env file before starting the container.
Set AI providers, models, provider keys, and git tokens in the setup wizard. You can change them later in Workspace Settings. There are no environment variables for git tokens (such as
GITHUB_TOKEN or GITLAB_TOKEN) or for provider API keys.AWS Bedrock is the exception. It can also authenticate with AWS_BEARER_TOKEN_BEDROCK, the standard AWS credential variables, a mounted shared profile, or a workload IAM role. See AWS Bedrock.AI Provider Settings
Configured under Workspace Settings › AI models in the web UI.Examples
- OpenRouter
- Local Model (Ollama, vLLM)
Embedding Settings
By default, Context7 uses the same provider as your LLM for generating embeddings. Anthropic has no embedding models, so when the LLM provider is Anthropic, you must configure a separate embedding provider. With other providers, a separate embedding provider is optional.
See AWS Bedrock for IAM, model, region, and private-network configuration, and Google Vertex AI for Google Cloud credentials, Workload Identity, and models.
Decision Model
Optionally, a decision model can classify pages, check for duplicate snippets, and rerank search results in place of the language model. It is faster and costs less for these yes/no decisions. See Decision Models to turn it on.Parsing Settings
Change these in Workspace Settings › Parsing. Some settings also have an environment variable. The variable only sets the default; a value saved in the dashboard wins. The four count limits also have a No limit option: files per library, Notion pages, Google Drive files, and Azure DevOps work items. Setting their environment variable to0 does the same. Without a limit, a very large source can take a long time and make many LLM calls. File timeout and the concurrency settings always have a limit.

- 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, other replicas use the new value after they restart.

Git Access Tokens
Configured under Workspace Settings › GitHub, GitLab and Other Git in the web UI.
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 anadmin 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.
- Anonymous callers (no session and no API key) can do none of these.

Earlier versions allowed anonymous parse and refresh by default. If you never saved these switches, they are off after an upgrade. Scripts that call these endpoints without an API key then get
403. Add a personal API key to the script, or turn the switch on.Authorization: Bearer <key>. With OAuth sign-in, clients sign in through the browser instead, and users manage them under Personal settings > Authorized apps.
When MCP authentication is off, a client that sends a valid personal API key is still treated as that user for library access, so it reads the restricted libraries the user can access. A client with no key, or an unknown key, is anonymous and reads only libraries that are open to everyone.
Recover admin access
Lost the admin password, or locked out by a broken SSO setup? Run thereset-password script inside the container. It resets a local admin account and turns password sign-in back on. See Docker or Kubernetes.
Policies
Policies let you control which public documentation from the Context7 cloud is accessible to your on-premise instance. They do not affect locally parsed on-premise content. Open Workspace Settings › Content policies. Requires admin login and a validLICENSE_KEY.
For details on source type toggles and library filters, see Customizing What Is Retrieved.
Network and Data Flow
Besides your AI providers, git hosts, and connected sources, an instance with an online license contacts Context7 Cloud:
A context query for one of your local libraries is answered on the instance and sends nothing. No local library content or ID is sent. Per-user usage stays on the instance.
An offline license (
ctx7off. prefix) is checked locally and makes none of these calls.
To send this traffic through a forward proxy, set HTTPS_PROXY, as Egress proxy describes. For the full egress list, CONTEXT7_API_URL, and private CA setup, see Docker or Kubernetes.
Hosting
- Serve Context7 at the root of a host name, such as
https://context7.internal.yourcompany.com. Hosting under a sub-path is not supported. - Behind a reverse proxy, Context7 uses
X-Forwarded-HostandX-Forwarded-Prototo build SSO redirect URLs. Configure the proxy to set these headers and overwrite any values the client sends.
Web UI
Open your deployment URL in a browser to access the dashboard. From here you can:- Add and remove libraries
- Trigger re-indexing
- Monitor parsing status and logs
- Update AI provider settings, git tokens, and permissions
- Configure policies for public cloud documentation access
- Test MCP connectivity
- Change admin credentials