Open-source, self-hosted market research terminal: SEC filings, market data on your own vendor keys, and 37 read-only MCP tools for your own AI agent.
A dense, fast market-research terminal and integration platform. Readers connect their own market-data and news providers; AlphaDesk is the workspace that connects, checks and presents what those providers — and the public record at SEC EDGAR and the US Treasury — actually say. Questions are asked in the reader's own AI agent (Claude, ChatGPT, Codex, Cursor, opencode), which reads the same records through 37 read-only agent tools (MCP).
AlphaDesk reads: quotes and charts, news, SEC filings, financial statements, ownership and insider activity, earnings and corporate calendars, options, crypto. It does not trade, route orders, hold positions, score ideas or write summaries.
Two ways to use it — the managed cloud or your own server. The code is open source under the GNU AGPL-3.0, with a commercial licence for anyone who cannot meet its terms. See Licence.
It is offered free at present (payments are designed but switched off; see Accounts).
You need a SEC User-Agent with real contact details (SEC blocks requests without one), Python 3.11+ or Docker, and — for anything beyond EDGAR and Treasury data — your own vendor keys.
1. Configure. Copy the template and fill in the two required values:
cp alphadesk/deploy/env.example .env Setting in .env Required What to put ALPHADESK_VAULT_KEY yes 32 random bytes, base64 — seals stored vendor keys; keep a copy, losing it makes them unreadable SEC_USER_AGENT yes AlphaDesk (you@example.com) — a name and a real email ALPHADESK_AUTH for one person off: a single local account with no sign-in ALPHADESK_DATABASE_URL no a postgres:// URL; unset, SQLite in ALPHADESK_DATA (~/.alphadesk) ALPACA_API_KEY, ALPACA_SECRET_KEY, FMP_API_KEY, FINNHUB_API_KEY, POLYGON_API_KEY, ALPHAVANTAGE_API_KEY, COINGECKO_API_KEY no your own keys; sealed into the local account with python -m alphadesk.main keys import-env (or connect them on the Account page instead) ALPHADESK_SEMANTIC_SEARCH no off skips the ~1.2 GB embedding model; search then matches words only GOOGLE_CLIENT_ID / GITHUB_CLIENT_ID (+ secrets), ALPHADESK_BASE_URL for several people single sign-on for a shared instance Generate the vault key with:
python -c "import os, base64; print(base64.b64encode(os.urandom(32)).decode())" 2a. Install from PyPI — the shortest route; the built interface ships with the package:
pip install alphadesk python -m alphadesk.main dashboard The terminal is at http://127.0.0.1:8000. The first start downloads the embedding model into the Hugging Face cache (skip it with ALPHADESK_SEMANTIC_SEARCH=off).
2b. Or run from a clone, which is what you want if you intend to change anything:
pip install -r requirements.txt python -m alphadesk.main keys import-env python -m alphadesk.main dashboard 2c. Or run with Docker. The image bakes the embedding model in, so a container downloads nothing at start:
docker build -t alphadesk . docker run -d --name alphadesk -p 8000:8000 --env-file .env -e ALPHADESK_DATA=/data -v alphadesk-data:/data alphadesk With ALPHADESK_AUTH left on and no sign-on provider configured, create a password account inside the container:
docker exec -it alphadesk python -m alphadesk.main user add you@example.com 3. Keep it private or publish your changes. Under the AGPL, if you let other people use a modified copy over a network, you must offer them the source of your version. Using it yourself, unmodified, or keeping your changes to yourself on your own machine carries no such obligation. Billing stays off (ALPHADESK_BILLING_ENFORCE is off by default), so every account on your instance has full access.
These are the product. Much of what might look missing was built, measured and removed on purpose — DECISIONS.md says what and why. Bring evidence and open an issue.
For each panel the reader's connected vendors are asked in a fixed, documented order; the first that carries the figure answers. Charts and option chains are pinned to one vendor, never stitched across tapes.
Alpaca (Benzinga), Polygon, Finnhub, Benzinga, Tiingo, Alpha Vantage, Marketaux and FMP. Several feeds merge into one window per reader, de-duplicated by URL. Alpaca's news streams live; the rest poll every five minutes.
Every source, how it is collected and its terms are listed in docs/data-sources.md. Vendor terms are separate from the code licence; see Known limitations.
News search works two ways at once, everywhere a reader searches — the News filter box, "Search all" and the agent's news_search tool:
By words — one rule shared by the server and the browser: whole words in order, plurals matched to singulars, a capitalised ticker matched exactly, and a query that names a company also finds stories tagged with it ("robinhood" finds stories tagged HOOD).
By meaning — stories whose headline is close in meaning to the query are added and marked related, so "AI data center spending" finds "Equinix plans $5B–$7B annual data center buildout" without a shared phrase. This uses Qwen3-Embedding-0.6B (Apache 2.0), self-hosted inside the server: no text leaves AlphaDesk and there is no model key. Headlines are embedded once as they arrive; the threshold (cosine 0.50) was calibrated so that only on-topic stories are added. Results remain newest first.
The embedding work never competes with the site: the model runs on a single CPU thread, the background worker runs at the lowest operating system priority, and it embeds only while no request is being served. Searches take about a third of a second.
A coin's news panel reads all crypto and what moves it — any coin's stories, crypto stocks, stories naming crypto, and Fed and rates headlines — each marked with the reason it is there.
AlphaDesk exposes the same records the interface shows as 37 read-only tools over the Model Context Protocol, at /api/agent/tools/mcp. Every call runs as the reader, on their keys, rate-limited to 120 requests a minute per token.
The tools are written for an agent that cannot see the screen: find_symbol resolves a name to a ticker from the SEC list rather than letting an agent guess; price_chart returns a thinned series carrying each point's RSI and MACD; filing_text and transcript_text return whole documents in pages; news_search marks each story as a word or meaning match. Tools that return publisher or filer text say that it is untrusted input.
The full account, session, key-vault and agent-credential design is in docs/hosted-mode.md.
┌──────────────────────────────────────────────┐ Browser (React SPA) ─┤ FastAPI · one process · one port │ Reader's agent (MCP) ┤ │ │ /api/* ── panels, composed per request │ │ /api/agent/tools/mcp ── 37 read-only tools │ │ OAuth 2.1 at the root (/authorize, /token…) │ │ │ │ Per-reader DataRouter ──► reader's vendors │──► Alpaca · FMP · Polygon │ (ordered per panel; 428 when none carry) │ Finnhub · Alpha Vantage │ │ CoinGecko │ Background: │ │ news poll (5 min) + held news sockets │──► each reader's feeds │ EDGAR results sweep (15 min, weekdays) │──► SEC EDGAR │ daily earnings forecast capture │──► Treasury │ embedding worker (search by meaning) │ └──────────────┬───────────────────────────────┘ │ Postgres (Cloud SQL) in production SQLite (WAL) in development Backend — Python 3.11+. FastAPI with synchronous handlers on a 40-worker thread pool and explicit socket deadlines for every upstream. Providers are structural Protocols (NewsProvider, PriceProvider, TranscriptProvider), built per reader from their sealed keys and discoverable through entry points. The request's reader identity travels in a context variable; background threads deliberately do not inherit it. The store speaks SQLite locally and Postgres through the pure-Python pg8000 driver in production. The embedding model runs in process on CPU via sentence-transformers and PyTorch's CPU build.
Frontend — TypeScript, React 19 and Vite, built to static files the Python process serves. Tailwind CSS v4 carries the design tokens (14-pixel root, 4-pixel spacing grid, six type roles, light and dark). TanStack Query shares one query per endpoint. There is no component library and no chart library: primitives are hand-rolled, and the chart is AlphaDesk's own SVG renderer, with candles batched into four paths so the node count is constant in bar count.
alphadesk/ main.py entry point: web server + background loops, and the CLI app/ FastAPI app, auth, admin, agent access (tokens, OAuth, MCP mount) providers/ the plugin seams, vendor implementations, catalogue, per-reader router ingest/ EDGAR, news polling, calendars, movers, prices and indicator math desk/ screener window, filings, transcripts, market-today ledger/ store (SQLite / Postgres), database adapter, key vault mcp_server.py the agent tools semantic.py search by meaning (self-hosted embedding model) cryptonews.py a coin's news selection newsquery.py the word-search rule billing.py owners, trial, the (off) access gate and payment seam config.py settings, retention, curated baskets ui/ React 19 + Vite frontend (built into app/static) deploy/ deployment guide and the configuration template docs/ data sources, providers, widgets, hosted mode scripts/deploy.sh build on Cloud Build and roll the Cloud Run service tests/ pytest suite Development Prerequisites Python 3.11+, Node with pnpm A SEC User-Agent string with real contact details (SEC requires one) Your own vendor keys for anything beyond EDGAR and Treasury About 1.5 GB of disk for the embedding model, downloaded on first use (or set ALPHADESK_SEMANTIC_SEARCH=off) Set up and run pip install -r requirements.txt cp alphadesk/deploy/env.example .env # then edit: vault key, SEC user agent python -m alphadesk.main dashboard # API + built SPA on http://127.0.0.1:8000 Generate a vault key (32 random bytes, base64):
python -m alphadesk.main keys import-env Frontend with hot reload (proxies /api to the running server):
The full annotated template is alphadesk/deploy/env.example; every setting's default lives in alphadesk/config.py.
The reference service runs on Google Cloud Run (alphadesk, us-east4) with Cloud SQL for Postgres.
Deploying — continuous integration runs the tests, lint and build on every pull request; deploying stays a maintainer's step. After a merge to main:
scripts/deploy.sh The script refuses unless the checkout is a clean main matching the remote, builds the image on Cloud Build, rolls the service with the new image only (environment, database mount and scaling untouched), and checks that the live page serves the new build. The frontend bundle is committed under alphadesk/app/static, so the image needs no Node build step.
Logs: Cloud Logging for the alphadesk service; the ingest loops, pruning and the embedding worker log their progress there.
Always-on is required as built; approximate cost at this size is $110–120 a month for the service (plus Cloud SQL). The lever for cost is a smaller embedding model, not scaling to zero.
Graceful shutdown is bounded: a revision stops within seconds.
Kill switch for search by meaning. If the service ever slows or refuses requests, turn it off without a rebuild — search falls back to words alone:
gcloud run services update alphadesk --region us-east4 --update-env-vars ALPHADESK_SEMANTIC_SEARCH=off Always use --update-env-vars (adds or changes one variable), never --set-env-vars (replaces every variable). The worker's start-up log line reports the cores the machine claims and the thread the model uses (expected: one).
Background work is shipped switched off, then enabled and watched. A 2-vCPU container reports more cores than it has, so behaviour on a many-core laptop does not predict production: sizing threads from the reported core count once starved the web server of a live instance.
AlphaDesk became a consumption terminal by subtraction. Screener ranking, operator-held data and unofficial sources, the in-app agent and the in-app language model were each removed in turn, every one for a measured or stated reason — see DECISIONS.md. The one model that remains is the self-hosted embedding model used for search.
Open source — GNU AGPL-3.0 (LICENSE). You may use, study, modify and redistribute AlphaDesk. The AGPL is a strong copyleft licence with one clause beyond the GPL: if you run a modified copy and let others use it over a network, you must offer those users the complete source of your version under the same licence. Distributing copies, modified or not, likewise carries the source with it. Running it for yourself imposes nothing.
Commercial licence. For organisations that want to embed AlphaDesk in a proprietary product, run a modified hosted service without publishing their changes, or need an enterprise exception, a commercial licence is available — contact muruganvignesh0810@gmail.com. The managed cloud is offered under its own terms of service; subscribers take on no AGPL obligations.
Dependencies are all under permissive licences (MIT, ISC, BSD, Apache 2.0), and no copyleft dependency may be added — it would prevent the commercial licence. The web interface ships its third-party notices at /third-party-notices.txt, written by every build from the packages the bundle actually contains (the fonts are under the SIL Open Font License). The embedding model, Qwen3-Embedding-0.6B, is Apache 2.0.
Data is not code. The code licence grants nothing over market data. Each vendor's terms govern the data fetched on your key; see docs/data-sources.md.
market-data sec-edgar financial-data terminal research mcp model-context-protocol self-hosted finance stocks options earnings fastapi open-source-finance
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




