Skip to content
Quant Brain / DocsBack to website
SETUP / ENVIRONMENT SETTINGS

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.

Open main settings
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:

research-desk.env
export QUANT_YFINANCE_ENABLED=1

Optional NSE fetching

Enable only if NSE permits your access. Downloading and importing an official results file is also supported.

research-desk.env
export QUANT_EXCHANGE_FETCH_ENABLED=1

Save the file and restart the assistant’s Quant Brain server after changing settings.

3. Know which settings belong where

SettingWhat it doesWhere it belongs
QUANT_RESEARCH_DBPath to your saved research database; created by setup.research-desk.env
QUANT_YFINANCE_ENABLEDEnables historical Yahoo prices.research-desk.env
QUANT_EXCHANGE_FETCH_ENABLEDEnables optional exchange requests.research-desk.env
QUANT_SEC_USER_AGENTIdentifies requests to the SEC.Use setup_research_desk.py --configure-sec; it writes research-sec.env.
QUANT_BROKER_ACCOUNTSBroker credentials mapped to your owner ID.research-brokers.env
MCP_API_KEYSServer-side token digest map for hosted HTTP.Hosting provider’s private environment settings.
QUANT_CLIENT_TOKENThe matching raw token used by the remote client.Private client environment.
MCP_ALLOWED_HOSTSYour 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

SettingPurpose
QUANT_RULES_DATABASE_URLPostgreSQL-backed rules and workflows, configured in the server process environment. Filings and facts still require persistent SQLite storage.
DATABASE_URLPostgreSQL 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=1Blocks tools that save data, including imports and some calculations.

Advanced setup, backup and validation guides