questrade-mcp
This server provides read-only Questrade account, market-data, and technical-analysis access.
List Questrade accounts.
Get positions and balances for an account.
Fetch real-time quotes for up to 50 symbol IDs.
Get orders, optionally filtered by account, state, and date range.
Search for stock symbol IDs by prefix.
Retrieve historical candles with selectable intervals and an ASCII chart.
Fetch historical transactions/activities over a date range.
Compare performance of multiple symbols with a normalized chart.
Calculate technical indicators such as RSI, SMAs, VWAP, and Bollinger Bands.
Screen a list of symbols against technical criteria like RSI limits, VWAP, 200-day SMA, and lower Bollinger Band conditions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@questrade-mcp Show me my current account balances and positions."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Questrade MCP
A read-only Model Context Protocol server for Questrade. It covers Questrade's whole read API: accounts, balances, positions, activities, executions, orders, symbols, quotes, option chains with Greeks, candles and markets. It adds technical analysis and portfolio reports across accounts, and keeps responses small enough that a model can page through years of activity without flooding its context.
Not affiliated with Questrade. Read-only by design: no tool places, changes or cancels orders.
What it can do
Area | Tools | What you get |
Context |
| sign-in state and command, accounts, default account, server time |
Balances |
| cash, market value, equity, buying power; per currency and combined; start of day |
Positions |
| quantity, cost, price, value, open/day P&L, currency, weight; totals per currency |
Activity |
| trades, dividends, deposits, withdrawals, interest, fees, FX; any date range; filters; totals |
Fills and orders |
| fills with commission and fees; order history and one order in full |
Symbols and quotes |
| tickers to IDs, fundamentals (P/E, EPS, yield, 52-week range), live quotes with change, market hours |
Options |
| expiries, strikes near the money, IV and Greeks |
Price history |
| stats, ASCII chart and OHLCV rows, 1 minute to 1 year candles |
Analysis |
| % change and drawdown, RSI, SMA 50/200, VWAP, Bollinger Bands, screens |
Reports |
| portfolio summary, allocation, dividend income, activity summary (below) |
19 tools, 2 resources (questrade://guide, questrade://limitations) and 3
prompts (portfolio_review, dividend_report, research_symbol). Every
tool, parameter and default is listed in docs/TOOLS.md,
which is generated from the server.
Reports
qt_run_report works across all active accounts (or one), and every result
states its basis:
Report | Source | Period |
| live balances; each account's total in CAD and USD at Questrade's rate | now |
| live positions combined by symbol, weights within each currency, by security type | now |
| dividend activities by symbol and by month | any range (default year to date) |
| activities by type and currency, net deposits per account, commissions | any range (default year to date) |
How it handles Questrade's API
Questrade behaviour | Handling |
Activities allow about a month per request | Any range is split into 30-day requests, back to back with no overlap, and cached briefly |
Times need an ISO offset and Questrade works in Eastern time | Tools take |
Positions carry no currency | Added from symbol details, so totals and weights never mix CAD and USD |
Tools take numeric symbol IDs | Tools also accept exact tickers ( |
Candles stop at 2000 per request | Defaults per interval stay under it; a warning says when a range was cut |
Each refresh token works once | Rotation is shared safely between processes (see Sign in) |
Rate limits ( | 429s wait for the reset (at most 10 s) and retry; 5xx and network errors back off |
What Questrade's API cannot do
See questrade://limitations:
No trading for personal apps (and this server never trades).
No tax lots, realized gains or tax slips: use Questrade's statements for tax filing.
No watchlists and no streaming through this server.
Quotes follow the account's market-data subscription and can be delayed.
Related MCP server: Webull MCP Server
Install
Node.js 20 or later. Agents get two things on top of the server:
the
questrade-portfolioskill (skills/questrade-portfolio/SKILL.md), which covers first steps, sign-in, the tools and the rules;the sign-in command, which the server puts into its connector description,
qt_get_context(auth.signIn) and every auth error, with this machine's real path and host name.
pi / Phosphor: one command
pi install npm:@saccolabs/questrade-mcp # from npm
pi install git:github.com/agustinsacco/questrade-mcp # or straight from GitHubpi installs the npm dependencies. The package's extension registers the
questrade MCP server for every session (codemode exposure), and the skill
joins every session's skill index. Phosphor can also install it from
Settings → Skills & extensions. Until someone signs in, each new session
shows:
Questrade is not signed in on <host>. In a terminal there, run: node <package>/bin/questrade-mcp.js loginA questrade entry in mcp.json takes precedence over the package's
registration.
Claude Code, Claude Desktop, Cursor: no clone needed
The package is on npm as
@saccolabs/questrade-mcp.
npx downloads and runs it:
claude mcp add --scope user questrade -- npx -y @saccolabs/questrade-mcpOther clients take the same command in their config:
{ "mcpServers": { "questrade": { "command": "npx", "args": ["-y", "@saccolabs/questrade-mcp"] } } }Then sign in, in a terminal on the same machine:
npx -y @saccolabs/questrade-mcp loginEvery other command works the same way (npx -y @saccolabs/questrade-mcp check,
… setup). When the server runs through npx, its sign-in messages show the
npx command too. These clients don't install the questrade-portfolio skill. They get the
same guide from the questrade://guide resource, and the start-here tool points
to it. npx -y @saccolabs/questrade-mcp setup adds the server and a copy of the
skill to Claude Code in one step.
From a clone: setup
git clone https://github.com/agustinsacco/questrade-mcp && cd questrade-mcp && npm install
node bin/questrade-mcp.js setupsetup looks for pi and Claude Code, shows each change and asks first:
pi:
pi install <this folder>.Claude Code:
claude mcp add --scope user questrade …, plus a link at~/.claude/skills/questrade-portfolio.
It then runs login and check. Re-running it skips whatever is already set
up, and --yes accepts every step without asking. For other clients (Claude
Desktop, Cursor, …) it prints the config entry to add:
{ "mcpServers": { "questrade": { "command": "node", "args": ["/path/to/questrade-mcp/bin/questrade-mcp.js"] } } }Clients without skills can read the same guide from the questrade://guide
resource. Credentials stay on the machine that runs the server, so sign in on
each machine where it runs.
Sign in
node bin/questrade-mcp.js loginLog in at https://my.questrade.com and open App Hub → API Centre. Activate API access the first time.
Open your personal app (register one if needed), click New manual authorization, then Generate new token.
Paste the token at the hidden prompt. It is never printed.
login exchanges the token right away, so a mistyped or already-used token is
caught immediately. Tokens are stored outside the repository in
~/.config/questrade-mcp/credentials.env, mode 600 (override with
QUESTRADE_CREDENTIALS_FILE). Running servers pick up a new token on their
next call. Other commands:
checkverifies the login and lists the accounts.secrets listshows which keys are set, never their values.logoutforgets the tokens. To revoke access on Questrade's side too, remove the authorization in the API Centre.
Token lifecycle. Access tokens last about 30 minutes, and each refresh token works once:
Every server process reads the current access token from the credentials file.
A refresh runs under a lock file and re-reads the file first, so when several processes (one per agent session) need a new token at once, only one spends the refresh token and the rest reuse its result.
A 401 on a token another process already replaced reuses the new one.
While a server runs it refreshes every 25 minutes, which keeps the chain alive. A manually generated token expires after 7 days if unused, so after a longer stretch with no server running, sign in again.
Writes are atomic (temp file, fsync, rename, chmod 600).
Configuration
Variable | Default | Meaning |
| auto | Default account. Otherwise the only active account; with several, tools ask for |
| all | Comma list: |
| 60000 | Hard cap per tool result (trailing list items are dropped, with a note) |
| 3660 | Longest activity/execution/order range one call may fetch |
| 60000 | Cache for account data, ranges and candles |
| 4 | Concurrent Questrade requests |
| 30000 / 3 | Per request |
| off | Skip the 25-minute refresh while the server runs |
| info |
|
| 127.0.0.1 / 8788 / /mcp | HTTP transport |
| loopback | Host/Origin allow-list for HTTP |
| — | Bearer token for HTTP (credentials file); required off loopback |
|
| Credentials file ( |
Use it
Ask things like "what's my allocation across TFSA and RRSP?", "how much did I
get in dividends last year, by month?", "show my trades in XEQT this year",
or "compare XEQT.TO, VFV.TO and AAPL over 3 years". The prompts give ready-made
versions: portfolio_review, dividend_report (year) and research_symbol
(symbol).
Streamable HTTP (one server for several clients)
node bin/questrade-mcp.js serve --http # http://127.0.0.1:8788/mcp
QUESTRADE_MCP_HTTP_HOST=100.x.y.z QUESTRADE_MCP_ALLOWED_HOSTS=myhost,100.x.y.z node bin/questrade-mcp.js serve --httpOff loopback the server refuses to start without QUESTRADE_MCP_HTTP_TOKEN,
and clients send Authorization: Bearer <token>. Host and Origin headers are
validated against DNS rebinding. GET /healthz reports liveness.
Response design
Pagination everywhere. Lists use
page/pageSize(default 20, max 100); reports and candles useoffset/limit. Every response sayshasMoreand givesnextPage/nextOffset.Summary by default.
detail: "summary"returns key fields and clips long text;"full"returns every field Questrade sends.Compact JSON. Nulls, empty strings and empty lists are dropped.
A hard budget. Results above
QUESTRADE_MCP_MAX_RESPONSE_CHARSare trimmed, never silently.Totals cover all rows even when only a page of rows is returned.
Errors are tool results (
isError: true) whose text names the fix: Questrade's own message and code, the account choices when one is needed, unknown tickers, auth problems with the command to run.
MCP practices followed
Official TypeScript SDK v2 (
@modelcontextprotocol/server), spec 2026-07-28, serving 2025-era clients from the same factory over stdio and Streamable HTTP.Zod input schemas with per-field descriptions and bounds; arguments are validated before handlers run.
Tool annotations on every tool:
readOnlyHint: true,destructiveHint: false,idempotentHint: true,openWorldHint: true.Server
instructions, resources for the guide and limitations, and user-invoked prompts.stdout carries only JSON-RPC; logs go to stderr with secrets redacted.
Toolsets for least privilege; no tool accepts or reveals credentials.
Security
Read-only: no order placement, cancellation or any other write.
Credentials live only in the mode-600 credentials file on the machine that runs the server. They are never in MCP arguments, logs or tool results.
loginandsecrets setread them with echo off.Agents are told never to ask for a token in the chat, and never to run
loginthemselves.HTTP binds to loopback unless a bearer token is set.
Development
npm test # unit + end-to-end over both transports against a fake Questrade (no network)
npm run smoke # live, with your credentials: every tool once, against the default account
npm run docs # regenerate docs/TOOLS.md (a test fails when it is out of date)
npm run inspect # MCP InspectorThe fake Questrade (test/helpers/fake-questrade.js) behaves like the real
one where it matters:
one-use refresh tokens, and only the latest access token works;
the 31-day activity limit (error 1003);
{ code, message }errors and rate limits.
The token tests run six real processes at once to prove only one spends the refresh token.
Releasing
CI (.github/workflows/ci.yml) runs the tests on Node 20, 22 and 24 for every
push and pull request. When a push to master has a package.json version
that isn't on npm yet, and the tests pass, CI publishes it with provenance,
then tags v<version> and creates a GitHub release. To release:
npm version minor --no-git-tag-version # or patch / major
npm run docs # TOOLS.md records the version
git commit -am "x.y.z: what changed" && git pushA version with a hyphen, such as 1.2.0-beta.1, goes to the next dist-tag.
CI publishes through npm trusted publishing, so no npm token is stored in
GitHub. It was set up once with
npm trust github @saccolabs/questrade-mcp --repo agustinsacco/questrade-mcp --file ci.yml --allow-publish.
A NPM_TOKEN repository secret also works, as a fallback.
Migrating from 1.x
2.0 matches wave-mcp: the same
SDK, CLI, install paths and response design. Tool names follow its
list_/get_ convention:
1.x | 2.0 |
|
|
|
|
|
|
|
|
|
|
| same names; symbols may also be tickers |
Account tools no longer fall back silently to the first account: set
QUESTRADE_ACCOUNT_ID or pass accountId. Times may be plain dates.
src/main.js is now bin/questrade-mcp.js, and the credentials file gains
the current access token, so several processes can share it.
Related
wave-mcp, an MCP server for Wave accounting, works the same way: it installs the same way, signs in the same way, and has the same CLI and response design.
License
MIT
Available Tools
11 toolsqt_analyze_technicalsB
Calculate technical indicators (RSI, SMAs, VWAP, Bollinger Bands) for a given symbol over a timeframe.
Inputs: endTime (required), symbolId (required), startTime (required), interval.
qt_compare_symbolsC
Compare performance of multiple symbols with normalized chart
Inputs: endTime (required), startTime (required), symbolIds (required), interval.
qt_get_accountsA
Get all Questrade accounts
Inputs: no named parameters.
qt_get_balancesC
Get account balances
Inputs: accountId.
qt_get_candlesC
Get historical candle data with ASCII chart
Inputs: endTime (required), symbolId (required), startTime (required), interval.
qt_get_ordersB
Get read-only orders for an account, optionally filtered by state and date range.
Inputs: endTime, accountId, startTime, stateFilter.
qt_get_positionsC
Get current positions for an account
Inputs: accountId.
qt_get_quotesA
Get read-only real-time quotes for one or more symbol IDs.
Inputs: symbolIds (required).
qt_get_transactionsC
Get historical transactions/activities for an account
Inputs: endTime (required), startTime (required), accountId.
qt_lookup_symbolC
Search for a stock symbol ID
Inputs: prefix (required).
qt_screen_watchlistC
Screen a list of symbols against technical criteria (e.g. maxRsi, mustBeAbove200Sma).
Inputs: endTime (required), startTime (required), symbolIds (required), criteria, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools target distinct resource types: accounts, positions, balances, quotes, orders, candles, transactions, and symbol lookup. The slight overlap is among compare_symbols, analyze_technicals, and screen_watchlist, but their descriptions differentiate normalized charting, indicator calculation, and criteria-based screening well enough.
Every tool uses the qt_ prefix and follows a clear verb_noun pattern, such as qt_get_accounts, qt_lookup_symbol, and qt_screen_watchlist. Although verbs vary beyond get, the convention is consistent and predictable across the entire set.
With 11 tools, the server is well-scoped for Questrade data retrieval and analysis. Each tool serves a distinct purpose, and the count is appropriate for covering account data, market data, historical candles, and technical screening without unnecessary bloat.
The toolset covers account information, positions, balances, orders, quotes, candles, transactions, symbol lookup, comparisons, and technical analysis. It appears intentionally read-only, so order placement/cancellation is absent, but for market data and analysis workflows the coverage is strong with only minor gaps.
Maintenance
Related MCP Connectors
Read-only access to InfluSense influencer discovery, ratings, watchlists, and reports via MCP.
Read-only access to Genie accounts, transactions, investments, and financial summaries.
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Read-only market charts, OHLC, backtests and a view of your connected broker accounts
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables querying portfolio data, positions, balances, quotes, price history, orders, and account activity through the Questrade API.18 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to read Webull account balances, positions, orders, stock quotes, historical bars, and US option market data, with live equity trading available only as an explicitly enabled opt-in.MIT
- AlicenseAqualityDmaintenanceEnables read-only access to Finary portfolio data, including profiles, organizations, institution connections, portfolios, and transactions, through MCP.5MIT
- FlicenseNot gradedqualityBmaintenanceEnables MCP clients to securely access read-only Psagot Trade account and market information through authenticated HTTP endpoints. It exposes only read-only tools, with no trade-submission capabilities.-