Questrade MCP Server
About
An unofficial server to integrate with the Questrade API, providing access to trading accounts, market data, and portfolio information.
Details
- Author
- zachmelin
- Categories
- Other, Finance, API
Jump to
Option 1: Install from npm (Recommended)
Configure your Questrade API credentials in.env:
QUESTRADE_API_URL=https://api01.iq.questrade.com QUESTRADE_REFRESH_TOKEN=your_refresh_token_here # QUESTRADE_TOKEN_DIR=/path/to/custom/directory
For detailed information about Questrade's API authorization, see theofficial API documentation.
-
Log in to yourQuestrade accountor navigate directly tohttps://apphub.questrade.com/UI/UserApps.aspx
In the top right corner, select"API centre"from the drop-down menu under your login name
Click"Activate API"and agree to the API access agreement
Click"Generate new token"for manual authorization
QUESTRADE_REFRESH_TOKEN=your_refresh_token_here
- Use your refresh token to get an access token
- Discover the correct API server URL
- Handle token refresh when needed
- Persist new tokens to~/.questrade-mcp/tokens.json(or system temp directory as fallback)
Important: Refresh tokens are single-use only. The server will attempt to persist new refresh tokens to~/.questrade-mcp/tokens.json(configurable viaQUESTRADE_TOKEN_DIRenvironment variable), but if a token expires or gets used by another process, you'll need to manually generate a new one following the steps above.
Note: If you get a "'tsx' is not recognized" error, the test script will automatically build the project first and use Node.js instead.
- Windows:%APPDATA%\Claude\claude_desktop_config.json
- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Linux:~/.config/Claude/claude_desktop_config.json
{ "mcpServers": { "questrade": { "command": "npx", "args": ["questrade-mcp-server"], "env": { "QUESTRADE_REFRESH_TOKEN": "your_refresh_token_here" } } } }
{ "mcpServers": { "questrade": { "command": "node", "args": ["/path/to/your/project/dist/index.js"], "env": { "QUESTRADE_REFRESH_TOKEN": "your_refresh_token_here" } } } }
If using local build, update the pathto match your actual project location
Test the connectionby asking Claude to show your Questrade accounts
For detailed setup instructions, seeclaude-desktop-config.md.
- get_accounts- Get all Questrade accounts
- get_positions- Get positions for a specific account
- get_balances- Get balances for a specific account
- get_orders- Get order history for an account
- search_symbols- Search for symbols by prefix
- get_symbol- Get detailed symbol information
- get_quotes- Get real-time quotes for symbols
- get_candles- Get historical price data
- refresh_token- Refresh the API access token
The MCP server includes helpful prompts for common trading analysis tasks:
- Get a comprehensive portfolio analysis with account balances, positions, and performance
- Optional: SpecifyaccountNumber(uses first account if not provided)
- Analyze a specific stock with current quotes, symbol information, and recent performance
- Required:symbol(e.g., "AAPL", "TSLA", "MSFT")
- Identify potential trading opportunities based on current positions and market data
- Optional:accountNumber(uses first account if not provided)
- Optional:riskLevel("conservative", "moderate", or "aggressive")
- "Use the portfolio_summary prompt to analyze my trading account"
- "Analyze AAPL stock using the stock_analysis prompt"
- "Show me trading opportunities with conservative risk level"
{ "name": "get_accounts" }
{ "name": "get_positions", "arguments": { "accountNumber": "12345678" } }
{ "name": "search_symbols", "arguments": { "prefix": "AAPL", "offset": 0 } }
{ "name": "get_quotes", "arguments": { "symbolIds": [8049, 9291] } }
The server uses environment variables for configuration:
- QUESTRADE_API_URL: Base URL for Questrade API (default:[https://api01.iq.questrade.com)
- QUESTRADE_REFRESH_TOKEN: Your API refresh token
- QUESTRADE_TOKEN_DIR: Custom directory for token storage (default:~/.questrade-mcp)
The server includes comprehensive error handling for:
- Invalid or expired tokens (automatic refresh)
- Missing required parameters
- API rate limits and network errors
- Invalid account numbers or symbol IDs
- Never commit your.envfile to version control
- Access tokens expire after 7 days
- Refresh tokens are automatically used to get new access tokens
- This is an unofficial tool - ensure you comply with Questrade's API terms of service
- Always verify trading decisions independently before executing trades
src/ ├── index.ts # Main MCP server implementation ├── questrade-client.ts # Questrade API client └── types.ts # TypeScript type definitions
Manage stock and crypto portfolios, place trades, and access market data via the Alpaca Trading API.
An MCP server for brokerage functionalities, built with the MCP framework.
A simple MCP server to interact with prediction market Kalshi
A server for performing trading operations using the Kite Connect API.
AnunofficialModel Context Protocol (MCP) server for integrating with the Questrade API, providing access to trading accounts, market data, and portfolio information.
⚠️ Disclaimer: This is an unofficial, community-built integration and is not affiliated with, endorsed by, or supported by Questrade Inc. Use at your own risk.
- 🔐Authentication: OAuth 2.0 token management with automatic refresh
- 📊Account Data: Access accounts, positions, balances, and order history
- 📈Market Data: Real-time quotes, symbol search, and historical candles
- 🛡️Error Handling: Comprehensive error handling and logging
- 🔧TypeScript: Full TypeScript support with proper type definitions
Option 1: Install from npm (Recommended)
Configure your Questrade API credentials in.env:
QUESTRADE_API_URL=https://api01.iq.questrade.com QUESTRADE_REFRESH_TOKEN=your_refresh_token_here # QUESTRADE_TOKEN_DIR=/path/to/custom/directory
For detailed information about Questrade's API authorization, see theofficial API documentation.
-
Log in to yourQuestrade accountor navigate directly tohttps://apphub.questrade.com/UI/UserApps.aspx
In the top right corner, select"API centre"from the drop-down menu under your login name
Click"Activate API"and agree to the API access agreement
Click"Generate new token"for manual authorization
QUESTRADE_REFRESH_TOKEN=your_refresh_token_here
- Use your refresh token to get an access token
- Discover the correct API server URL
- Handle token refresh when needed
- Persist new tokens to~/.questrade-mcp/tokens.json(or system temp directory as fallback)
Important: Refresh tokens are single-use only. The server will attempt to persist new refresh tokens to~/.questrade-mcp/tokens.json(configurable viaQUESTRADE_TOKEN_DIRenvironment variable), but if a token expires or gets used by another process, you'll need to manually generate a new one following the steps above.
Note: If you get a "'tsx' is not recognized" error, the test script will automatically build the project first and use Node.js instead.
- Windows:%APPDATA%\Claude\claude_desktop_config.json
- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Linux:~/.config/Claude/claude_desktop_config.json
{ "mcpServers": { "questrade": { "command": "npx", "args": ["questrade-mcp-server"], "env": { "QUESTRADE_REFRESH_TOKEN": "your_refresh_token_here" } } } }
{ "mcpServers": { "questrade": { "command": "node", "args": ["/path/to/your/project/dist/index.js"], "env": { "QUESTRADE_REFRESH_TOKEN": "your_refresh_token_here" } } } }
If using local build, update the pathto match your actual project location
Test the connectionby asking Claude to show your Questrade accounts
For detailed setup instructions, seeclaude-desktop-config.md.
- get_accounts- Get all Questrade accounts
- get_positions- Get positions for a specific account
- get_balances- Get balances for a specific account
- get_orders- Get order history for an account
- search_symbols- Search for symbols by prefix
- get_symbol- Get detailed symbol information
- get_quotes- Get real-time quotes for symbols
- get_candles- Get historical price data
- refresh_token- Refresh the API access token
The MCP server includes helpful prompts for common trading analysis tasks:
- Get a comprehensive portfolio analysis with account balances, positions, and performance
- Optional: SpecifyaccountNumber(uses first account if not provided)
- Analyze a specific stock with current quotes, symbol information, and recent performance
- Required:symbol(e.g., "AAPL", "TSLA", "MSFT")
- Identify potential trading opportunities based on current positions and market data
- Optional:accountNumber(uses first account if not provided)
- Optional:riskLevel("conservative", "moderate", or "aggressive")
- "Use the portfolio_summary prompt to analyze my trading account"
- "Analyze AAPL stock using the stock_analysis prompt"
- "Show me trading opportunities with conservative risk level"
{ "name": "get_accounts" }
{ "name": "get_positions", "arguments": { "accountNumber": "12345678" } }
{ "name": "search_symbols", "arguments": { "prefix": "AAPL", "offset": 0 } }
{ "name": "get_quotes", "arguments": { "symbolIds": [8049, 9291] } }
The server uses environment variables for configuration:
- QUESTRADE_API_URL: Base URL for Questrade API (default:https://api01.iq.questrade.com)
- QUESTRADE_REFRESH_TOKEN: Your API refresh token
- QUESTRADE_TOKEN_DIR: Custom directory for token storage (default:~/.questrade-mcp)
The server includes comprehensive error handling for:
- Invalid or expired tokens (automatic refresh)
- Missing required parameters
- API rate limits and network errors
- Invalid account numbers or symbol IDs
- Never commit your.envfile to version control
- Access tokens expire after 7 days
- Refresh tokens are automatically used to get new access tokens
- This is an unofficial tool - ensure you comply with Questrade's API terms of service
- Always verify trading decisions independently before executing trades
src/ ├── index.ts # Main MCP server implementation ├── questrade-client.ts # Questrade API client └── types.ts # TypeScript type definitions
Manage stock and crypto portfolios, place trades, and access market data via the Alpaca Trading API.
An MCP server for brokerage functionalities, built with the MCP framework.
A simple MCP server to interact with prediction market Kalshi
A server for performing trading operations using the Kite Connect API.
Korea Investment & Securities (KIS) REST API
Provides stock trading and market data using the Korea Investment & Securities (KIS) REST API.
Access the Shioaji trading API for financial data and trading operations, requiring a SinoPac Securities account.
A MCP server for integrating with the Upstox trading API by Upstox.
A Model Context Protocol (MCP) server that integrates with the Upstox Trading API, enabling AI agents like Claude to securely access Indian stock market data, perform technical analysis, and view account information in read-only mode.
The Capital.com MCP Server lets your AI assistant talk to your trading account directly. Market data, position checks, trade previews – all in plain language, without leaving your AI tool.
US/HK markets — 110 tools: real-time quotes, options, orders, fundamentals, alerts, DCA & portfolio
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




