- Home
- MCP servers
- Questrade
Questrade
- typescript
1
GitHub Stars
typescript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"zachmelin-questrademcp": {
"command": "npx",
"args": [
"questrade-mcp-server"
],
"env": {
"QUESTRADE_REFRESH_TOKEN": "your_refresh_token_here"
}
}
}
}You can connect to the Questrade API through an MCP server to access your trading accounts, market data, and portfolio information in your preferred MCP-enabled client. This server handles authentication, token refresh, and data retrieval so you can build workflows and prompts around your Questrade data.
How to use
Once the MCP server is running, you can configure your MCP client to talk to it using a standard stdio setup. The server expects a refresh token to obtain access tokens and maintain sessions, so you only need to provide that token in your environment.
How to install
Prerequisites: Node.js and npm must be available on your system.
Option 1: Install from npm (Recommended)
npm install -g questrade-mcp-server
Option 2: Clone and Build
- Clone this project locally
git clone https://github.com/zachmelin/QuestradeMCP.git
cd QuestradeMCP
- Install dependencies
npm install
- Copy the environment template and configure credentials
cp .env.example .env
- Set 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
Additional setup for MCP client integration
To connect through your MCP client, you mainly need to provide the refresh token and run the MCP server in a way your client expects (usually via a simple stdio config). The server will automatically refresh tokens, discover the API URL, and persist new tokens to the specified directory.
Configuration and running
The MCP server relies on environment variables to configure access to Questrade. The most important variable is the refresh token. The server will use it to obtain access tokens and stay authorized.
{
"mcpServers": {
"questrade": {
"command": "npx",
"args": ["questrade-mcp-server"],
"env": {
"QUESTRADE_REFRESH_TOKEN": "your_refresh_token_here"
}
}
}
}
Security and maintenance
Never commit your .env file to version control. Access tokens expire after seven days, and refresh tokens are used to obtain new access tokens automatically. This MCP server is an unofficial community tool; ensure you comply with Questrade's API terms of service and verify trading decisions independently.
Troubleshooting and notes
If you need to test the connection, run the test command provided by your setup and verify that you can retrieve accounts and market data. If you encounter token-related errors, ensure your refresh token is valid and that the token file path (defaulting to ~/.questrade-mcp) is writable.
Tools and capabilities recap
The MCP server exposes data access and authentication capabilities including: account data, positions, balances, orders, symbol search, quotes, candles, and token refresh.
Notes for production use
For production, run the server in a stable environment and monitor token refresh behavior. Use the provided MCP commands through your client to query accounts, markets, and portfolios.
Available tools
get_accounts
Retrieve all Questrade trading accounts associated with your credentials.
get_positions
Fetch the current positions for a specified account.
get_balances
Retrieve balances for a specified account.
get_orders
Get the order history for a specific account.
search_symbols
Search available symbols by prefix to find instruments.
get_symbol
Get detailed information for a symbol.
get_quotes
Obtain real-time quotes for given symbols.
get_candles
Fetch historical price data for symbols.
refresh_token
Refresh the API access token using the refresh token.