Skip to content
Quant Brain / DocsBack to website
GET STARTED / STEP BY STEP

Let’s get you
set up.

Install Quant Brain, connect your assistant, then try your first question. Add stock prices and broker accounts when you need them.

1. Before you start

You need Git, Python 3.12, access to the private Quant Brain repository, and one supported AI assistant. You don’t need a broker account to begin.

Open Terminal on macOS or Linux. On Windows, these commands work inside Ubuntu / WSL with an assistant running there. For a native Windows client, use the Windows notes.

The guide describes a 101-tool Python catalog. Codex verification used synthetic stored data; Hermes discovery covered 100 tools before the broker tool was added. Check your installed tool list rather than assuming every connection is live-tested.

2. Install Quant Brain

First time? Copy this into Terminal and press Enter. If you already have the project, open Terminal in that folder and skip this command.

Download the project
git clone https://github.com/paarths-collab/quant-brain-mcp.git
cd quant-brain-mcp

Next, copy this block. It creates a separate Python environment so Quant Brain’s packages stay together.

Install packages
python3.12 -m venv .venv
.venv/bin/python -m pip install --require-hashes -r requirements/research.txt
.venv/bin/python -m pip install --no-deps .

Create a private folder for your settings and saved research.

Create private settings
QB_CONFIG="$HOME/.local/share/quant-brain"
.venv/bin/python scripts/ops/setup_research_desk.py --directory "$QB_CONFIG"
printf "Server: %s\nSettings: %s\n" "$PWD/.venv/bin/quant-brain-stdio" "$QB_CONFIG"
Keep the two paths printed at the end.

Your assistant may ask for the server path and settings folder. If a command fails, stop and check the error before continuing.

Check the installation without an API key

Run the built-in demo from the project folder. It uses invented filings and a temporary database, so you can check the software before connecting an assistant.

Run the local demo
.venv/bin/python scripts/demos/demo_research_desk.py

Look for the final success message covering financials, screening, peers, valuation, guidance and a filing-driven thesis breach. This is a synthetic software check, not live market verification.

3. Pick your assistant

Choose the app you use. Each button opens instructions just for that app.

After connecting, start a new chat and paste this:

Your first question
Use Quant Brain to list companies already saved for me.
Show the tool name and the returned count.
If there are none, say so.

What you should see: a Quant Brain tool call and a count. Zero companies is normal for a new installation.

4. Understand your environment settings

“Environment variables” are settings that tell Quant Brain which features to enable and where to keep your data. You edit them on your computer, not in the AI chat.

research-desk.env

Your main settings file. Optional Yahoo prices and NSE fetching are enabled here.

research-brokers.env

Your optional Kotak and Zerodha credentials. Keep this file private.

Open environment setup

5. Try a US company filing

Run this in the project folder. Enter an email you’re happy to send to the SEC as your contact, then restart your assistant. No SEC API key is required.

Enable SEC access
QB_CONFIG="$HOME/.local/share/quant-brain"
.venv/bin/python scripts/ops/setup_research_desk.py --directory "$QB_CONFIG" --configure-sec
Ask your assistant
Use Quant Brain to search the US directory for AAPL with refresh enabled. Find the exact Apple Inc. row.
Use its returned SEC issuer ID to sync_company_filings with max_filings=2.
If no exact match is found, stop.
Show one saved revenue figure with its period, currency and source.
Report missing data rather than guessing.

If the SEC blocks the request, import a supported official filing you downloaded instead. See the filing instructions.

6. Try an Indian company filing

Download an official Reliance results PDF from NSE financial results. Give it to a local assistant that can read files, together with the source URL.

Ask your assistant
Import this official Reliance results document with ingest_company_filings.
Keep the source URL, publication date and reporting period.
Show accepted and skipped facts.
Show available revenue with its unit and source.
Keep consolidated and standalone results separate.

Listing setup and optional automatic imports

Use RELIANCE for the NSE listing and broker quote; use RELIANCE.NS for Yahoo prices. If registration is needed, use entity ID IN:RELIANCE, type EQUITY, currency INR, and the exact company name from the official filing.

Ask for the two latest available consolidated quarters and check INR, lakh and crore units. Report a missing quarter rather than filling it in.

Optional filing watches need a running worker using the same database and owner. Check its heartbeat, last attempt and last success with get_system_status. Worker commands and direct NSE access.

7. Add historical stock prices

Install the optional Yahoo price provider in the project folder:

Install price provider
.venv/bin/python -m pip install --require-hashes -r requirements/yfinance.txt

Add the following line to research-desk.env, save the file, then restart your assistant. Show me how to edit it.

Environment setting
export QUANT_YFINANCE_ENABLED=1
Compare two strategies
Use Quant Brain first. Run backtest_sma_crossover and
backtest_rsi_mean_reversion on AAPL, both with period 2y.
Show actual dates, return, drawdown and trade count where available.
Flag differences in dates or warm-up. Report failures and label fallbacks.

Repeat with RELIANCE.NS for Reliance. A backtest checks a rule against historical prices; a current broker quote cannot replace that history.

8. Connect a broker — optional

Use your own account to request supported quotes. Pick one or both. The adapters have passed simulated tests; live broker verification is still pending.

Zerodha Kite

Set up your API key and current access token.

Set up Zerodha

Kotak Neo

Set up your Neo token and assigned API address.

Set up Kotak

9. Run on the cloud — optional

Choose one route: local stdio, Docker Compose, Linux/systemd, Railway, Fly.io, AWS Lightsail or Render. The /health address checks the process; clients connect to /mcp.

Your local installation is enough to start. For a remote assistant, use an authenticated HTTPS server and persistent storage for saved research.

Cloud hosting instructions, including Render · Regular ChatGPT requirements

Need help?

  • No tools: restart your assistant and check that Quant Brain is enabled.
  • No prices: install the Yahoo provider, add its setting and restart.
  • Broker not connected: check the credentials, owner ID and token expiry.

Full troubleshooting checklist · Technical reference

After your first demo

Explore sourced company research, screening, valuation, guidance and thesis watches. A thesis watch needs a baseline fact and a measurable assumption.

  • Reuse saved criteria with rules and workflows under the same owner.
  • Add the optional local dashboard or chart exports.
  • Preprocess scanned PDFs with the PDF profile and Tesseract OCR, then review the extracted text.
  • Set durable price alerts with PostgreSQL and a polling client.
  • Verify backups and restoration before offering read-only access.
See requirements and project guides