Your settings.
One private folder.
1. Open your settings file
Run this after the main installation. QB_CONFIG is a shortcut to your private settings folder; set it again whenever you open a new Terminal.
QB_CONFIG="$HOME/.local/share/quant-brain"
nano "$QB_CONFIG/research-desk.env"Keep the existing lines. Add only the settings you need below. In nano, press Ctrl+O, then Enter to save, and Ctrl+X to exit.
2. Enable the features you need
Yahoo historical prices
First install requirements/yfinance.txt in the server’s Python environment. Then add this line to research-desk.env:
export QUANT_YFINANCE_ENABLED=1Optional NSE fetching
Enable only if NSE permits your access. Downloading and importing an official results file is also supported.
export QUANT_EXCHANGE_FETCH_ENABLED=1Save the file and restart the assistant’s Quant Brain server after changing settings.
3. Know which settings belong where
| Setting | What it does | Where it belongs |
|---|---|---|
| QUANT_RESEARCH_DB | Path to your saved research database; created by setup. | research-desk.env |
| QUANT_YFINANCE_ENABLED | Enables historical Yahoo prices. | research-desk.env |
| QUANT_EXCHANGE_FETCH_ENABLED | Enables optional exchange requests. | research-desk.env |
| QUANT_SEC_USER_AGENT | Identifies requests to the SEC. | Use setup_research_desk.py --configure-sec; it writes research-sec.env. |
| QUANT_BROKER_ACCOUNTS | Broker credentials mapped to your owner ID. | research-brokers.env |
| MCP_API_KEYS | Server-side token digest map for hosted HTTP. | Hosting provider’s private environment settings. |
| QUANT_CLIENT_TOKEN | The matching raw token used by the remote client. | Private client environment. |
| MCP_ALLOWED_HOSTS | Your hosted server hostname, without https:// or a path. | Hosting provider’s private environment settings. |
For local stdio, use the installer’s settings. Don’t replace generated authentication values with invented examples. Never paste your actual credentials into this website or an AI chat.
Zerodha credentials · Kotak credentials · Hosted environment setup
4. Settings on a hosted server
Enter values in the hosting dashboard without export or surrounding shell quotes. Keep the raw client token on the client; the server uses its digest map.
- QUANT_RESEARCH_DB: a path on persistent storage, such as /var/data/research.sqlite3 on Render.
- MCP_API_KEYS: the JSON digest map created by setup.
- MCP_ALLOWED_HOSTS: your assigned hostname, without https:// or a path.
- QUANT_SEC_USER_AGENT: the identifying value from research-sec.env.
- QUANT_YFINANCE_ENABLED: 1, after installing requirements/yfinance.txt.
- QUANT_BROKER_ACCOUNTS: raw owner-keyed JSON, matching the authenticated owner IDs.
On Render use one worker, /health for health checks, and /mcp for clients. Verify saved data after a restart. A separate Render worker cannot share the service’s attached disk.
5. Optional advanced features
| Setting | Purpose |
|---|---|
| QUANT_RULES_DATABASE_URL | PostgreSQL-backed rules and workflows, configured in the server process environment. Filings and facts still require persistent SQLite storage. |
| DATABASE_URL | PostgreSQL for durable price alerts. Enable the price source and schedule a client to poll triggered alerts; the filing worker handles filing watches. |
| QUANT_READ_ONLY=1 | Blocks tools that save data, including imports and some calculations. |