VestLens

Set up VestLens

You run your own copy of VestLens, connected to your own accounts through your own SnapTrade key.

The code is public.

VestLens is on GitHub at github.com/akshay-rakheja/vestlens, MIT licensed. Its README has every step and option; this page is the short version.

What you'll need

Set it up

Run these in a real terminal (the Terminal app), not in a chat box.

  1. Download VestLens
    git clone https://github.com/akshay-rakheja/vestlens.git
    cd vestlens
    cp .env.example .env
  2. Add your key

    Open .env in your editor and replace the two placeholders, SNAPTRADE_CLIENT_ID and SNAPTRADE_CONSUMER_KEY, with your SnapTrade Personal values.

  3. Choose your sign-in password

    Save a password of at least 12 characters in your password manager, then type it at this hidden prompt. .env keeps only a hash of it.

    read -rs OWNER_PASSWORD && printf '%s\n' "$OWNER_PASSWORD" | npm run setup -- --password-stdin; unset OWNER_PASSWORD
  4. Start it
    docker compose up -d

    Open http://localhost:8080 and sign in with that password.

  5. Connect Wealthsimple

    From the dashboard, follow the link to SnapTrade's page and connect read-only. The first sync takes a few minutes.

  6. Give it an HTTPS address

    To try it today, a Cloudflare Quick Tunnel needs no account (it's for testing, and its address changes every time):

    cloudflared tunnel --url http://localhost:8080

    Put the https://….trycloudflare.com address it prints in .env as APP_BASE_URL, add TRUST_PROXY=1, and run docker compose up -d again. For an address that stays put, the README covers a named Cloudflare Tunnel and Render.

  7. Add it to your assistant

    Add <your address>/mcp as a custom connector in Claude or ChatGPT. Sign in with your VestLens password, then click Allow.

Full steps in the README

Or let a coding agent do it

Point an AI coding agent at the README. It can run everything except the parts that need you: pasting your SnapTrade key, choosing your password in your own terminal, logging in to Wealthsimple on SnapTrade's page, and clicking Allow. Never give an agent your brokerage password or two-step codes.

Before you rely on the numbers

Wealthsimple's transaction history through SnapTrade starts around April 2023, so all-time deposits and returns for older accounts are incomplete. Read the known limitations.