# Copy to .env for local development only.
# Do not commit real secrets.
# Ensure your .env is listed in .gitignore to avoid committing secrets;
# .env.example is intentionally allowed (see .gitignore).

# Mistral (required for embeddings, OCR, transcription, and generation)
MISTRAL_API_KEY=your_mistral_api_key
# Base URL of the Mistral API.  Most users should leave this at the
# default `https://api.mistral.ai`.  Change it only for private deployments,
# custom endpoints, or when proxying requests through another host.
MISTRAL_BASE_URL=https://api.mistral.ai
# Optional override for max encoded Mistral upload payload size (bytes).
# Used for OCR payloads and also enforced for Mistral transcription uploads.
# Increase this if large PDFs or audio files are rejected as too large.
DIR2MCP_MISTRAL_MAX_OCR_PAYLOAD_BYTES=20971520

# ElevenLabs (optional)
# Text-to-Speech (TTS) and Speech-to-Text (STT) service.  Provide your
# API key below and the base endpoint for the ElevenLabs API.  The default
# value is the global URL, but some users may need a region-specific
# endpoint (e.g. `https://api.elevenlabs.io` or another host supplied by
# ElevenLabs).
ELEVENLABS_API_KEY=your_elevenlabs_api_key
# replace if you use a different region/host
ELEVENLABS_BASE_URL=https://api.elevenlabs.io

# Server auth (optional, auto-generated by dir2mcp up if not set)
DIR2MCP_AUTH_TOKEN=

# CORS: additional allowed browser origins, comma-separated (optional).
# e.g. `http://localhost:3000,https://example.com` (include scheme, no trailing
# slashes).  Useful when embedding from multiple frontends.
# SECURITY: Validate each origin carefully.  Do not use wildcards like `*`,
# only list trusted frontend domains and include scheme/no trailing slashes.
# Misconfigured CORS can expose the API to unauthorized cross-origin access;
# see the DIR2MCP_ALLOWED_ORIGINS variable above when reviewing or updating.
DIR2MCP_ALLOWED_ORIGINS=

# x402 payment gating (optional)
# If set, dir2mcp will integrate with the x402 payment adapter to
# enforce 402-style request gating on certain features (e.g. model
# usage or enhanced retrieval).  The token ties the server to a
# facilitator service and enables paid-access workflows.  See
# docs/x402-payment-adapter-spec.md for details on x402 modes and
# configuration.
DIR2MCP_X402_FACILITATOR_TOKEN=

# ElevenLabs bridge (optional helper binary)
# The bridge forwards ElevenLabs webhook calls to a running dir2mcp MCP
# endpoint.  It can read the dir2mcp bearer token explicitly or from the
# state directory token file when MCP_TOKEN is unset.
MCP_URL=http://127.0.0.1:8087/mcp
MCP_TOKEN=
STATE_DIR=.dir2mcp
PORT=8088
