Files
nginx-proxy-manager-mcp/env.example
T
b3nwandb3nw 21bce2ad91 feat(#9): add bearer token auth for HTTP transport (#12)
* feat(#9): add bearer token auth for HTTP transport

Adds NPM_MCP_AUTH_TOKEN env var. When set, HTTP transport requires
Authorization: Bearer <token> on all requests except /health.
Uses timing-safe comparison via hmac.compare_digest.

Closes #9

* fix(auth): fix lifespan context and 401 status/headers spec compliance

---------

Co-authored-by: b3nw <189466+b3nw@users.noreply.github.com>
2026-08-11 19:54:01 -05:00

26 lines
946 B
Plaintext

# NPM MCP Configuration
NPM_API_URL=http://localhost:81/api
NPM_IDENTITY=admin@example.com
NPM_SECRET=changeme
# Server Configuration
NPM_MCP_HOST=0.0.0.0
NPM_MCP_PORT=8000
NPM_MCP_TRANSPORT=stdio # stdio or http
# Enable destructive/write operations (create, update, delete, enable, disable)
# NPM_MCP_ENABLE_DESTRUCTIVE_TOOLS=true
# Optional: Require bearer token for MCP HTTP clients
# NPM_MCP_AUTH_TOKEN=your-secret-token-here
# Log Access (optional)
# Mount NPM's /data/logs directory and set this to the mount path.
# Enables the get_proxy_host_logs tool for reading nginx access/error logs.
# NPM_LOG_DIR=/data/npm-logs
# Proxy Host Creation Defaults (JSON)
# Set default values for create_proxy_host tool parameters
# Example with wildcard cert: NPM_PROXY_DEFAULTS='{"certificate_id": 24, "ssl_forced": true}'
# NPM_PROXY_DEFAULTS='{"certificate_id": 0, "ssl_forced": true, "block_exploits": true, "allow_websocket_upgrade": true}'