Documentation Index
Fetch the complete documentation index at: https://mintlify.com/perplexityai/modelcontextprotocol/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Perplexity MCP Server is configured through environment variables. This page documents all available configuration options for both stdio and HTTP server modes.Core Environment Variables
PERPLEXITY_API_KEY
Your Perplexity API key from the API Portal
Default: None
Example:
pplx-abc123def456...
PERPLEXITY_TIMEOUT_MS
Request timeout in milliseconds
Default:
300000 (5 minutes)Example:
600000 (10 minutes)
Increase this value for very long research queries using the
perplexity_research tool, which can take 30+ seconds to complete.PERPLEXITY_BASE_URL
Custom base URL for API requests
Default:
https://api.perplexity.aiExample:
https://your-custom-url.com
PERPLEXITY_LOG_LEVEL
Logging verbosity level
Default:
ERROROptions:
DEBUG, INFO, WARN, ERROR
PERPLEXITY_PROXY
Proxy server URL for corporate networks
Default: None
Example:
https://proxy.company.com:8080
See the Proxy Setup guide for detailed configuration.
HTTP Server Environment Variables
These variables are only used when running the server in HTTP mode for cloud or shared deployments.PORT
HTTP server port
Default:
8080Example:
3000
BIND_ADDRESS
Network interface to bind to
Default:
0.0.0.0 (all interfaces)Example:
127.0.0.1 (localhost only)
ALLOWED_ORIGINS
CORS allowed origins (comma-separated)
Default:
* (all origins)Example:
https://app.example.com,https://staging.example.com
Standard Proxy Variables
In addition toPERPLEXITY_PROXY, the server also supports standard proxy environment variables.
HTTPS_PROXY
Standard HTTPS proxy variable
Default: None
Priority: Checked after
PERPLEXITY_PROXY
HTTP_PROXY
Standard HTTP proxy variable
Default: None
Priority: Checked after
HTTPS_PROXY
Proxy variables are checked in this order:
PERPLEXITY_PROXY → HTTPS_PROXY → HTTP_PROXY. If none are set, the server connects directly to the internet.