Naming Convention
Environment variables follow this pattern:<PATH> is the configuration path in UPPER_SNAKE_CASE.
Examples:
| Config Path | Environment Variable |
|---|---|
scraper.maxPages | DOCS_MCP_SCRAPER_MAX_PAGES |
server.ports.default | DOCS_MCP_SERVER_PORTS_DEFAULT |
app.telemetryEnabled | DOCS_MCP_TELEMETRY |
scraper.document.maxSize | DOCS_MCP_SCRAPER_DOCUMENT_MAX_SIZE |
Core Application Variables
General Settings
Path to data storage directory. Stores SQLite database, embeddings, and cached data.Default:
- Linux:
~/.local/share/docs-mcp-server - macOS:
~/Library/Application Support/docs-mcp-server - Windows:
%LOCALAPPDATA%\docs-mcp-server
Path to configuration file (YAML or JSON). When set, the config is read-only.Example:
Enable or disable telemetry collection.Default:
trueExample:Run in read-only mode (disable write tools and job scheduling).Default:
falseExample:Default embedding model in format
provider:model-name.Examples:openai:text-embedding-3-smallvertex:text-embedding-004bedrock:amazon.titan-embed-text-v1
Logging
Set log level directly. Overrides
--verbose and --silent flags.Values: DEBUG, INFO, WARN, ERRORDefault: INFOExample:Server Configuration
Server protocol for MCP communication.Values:
auto, stdio, httpDefault: autoExample:Host to bind the server to.Default:
localhostExample:Alternative to
DOCS_MCP_HOST. Lower precedence.Example:Port Configuration
Default port for all services (unless overridden by specific port variables).Default:
8080Example:Alternative to
DOCS_MCP_PORT. Lower precedence (commonly used in hosting platforms).Example:Port for web interface. Falls back to
DOCS_MCP_PORT if not set.Default: 8082Example:Explicit default port (highest precedence for default port).Example:
Port for pipeline worker service.Example:
Port for MCP server.Example:
Authentication
Enable OAuth2/OIDC authentication for MCP endpoints.Default:
falseExample:OAuth2/OIDC issuer URL for authentication.Example:
JWT audience claim (identifies the protected resource).Example:
Scraper Configuration
Maximum number of pages to scrape per job.Default:
1000Example:Maximum navigation depth from starting URL.Default:
10Example:Maximum concurrent page requests.Default:
5Example:Maximum document size in bytes. Documents larger than this are rejected.Default:
10485760 (10 MB)Example:Minimum document size in bytes. Documents smaller than this are rejected.Default:
100Example:Embedding Provider Configuration
Each embedding provider has its own environment variables for authentication.OpenAI
OpenAI API key for embedding generation.Required for:
openai:* embedding modelsExample:Custom OpenAI API base URL (for OpenAI-compatible services).Example:
Google Vertex AI
Path to Google Cloud service account JSON key file.Required for:
vertex:* embedding modelsExample:Google Generative AI
Google API key for Generative AI models.Required for:
google:* embedding modelsExample:AWS Bedrock
AWS region for Bedrock service.Required for:
bedrock:* embedding modelsExample:Alternative to
BEDROCK_AWS_REGION. Lower precedence.Example:AWS profile for authentication (uses AWS credentials file).Example:
AWS access key ID for direct authentication.Example:
AWS secret access key for direct authentication.Example:
AWS session token for temporary credentials.Example:
Azure OpenAI
Azure OpenAI API key.Required for:
azure:* embedding modelsExample:Azure OpenAI instance name.Example:
Azure OpenAI deployment name.Example:
Azure OpenAI API version.Example:
Vector Embeddings
Vector dimension size for embeddings. Must match the embedding model.Common values:
- OpenAI
text-embedding-3-small:1536 - OpenAI
text-embedding-3-large:3072 - Vertex
text-embedding-004:768
Size of text chunks for embedding (in characters).Default:
2000Example:Overlap between consecutive chunks (in characters).Default:
200Example:Configuration Precedence
Settings are applied in this order (highest to lowest priority):- CLI flags (e.g.,
--max-pages 2000) - Environment variables (e.g.,
DOCS_MCP_SCRAPER_MAX_PAGES=2000) - Configuration file (e.g.,
config.yaml) - Built-in defaults
Common Patterns
Development Environment
Production Environment
Docker Compose
GitHub Actions
Security Best Practices
Protect API Keys
Restrict Permissions
Use Read-Only Mode
See Also
- Global Options - CLI flags
- config Command - Manage configuration
- Configuration Reference - Complete configuration guide
- Embedding Models - Provider setup
