ZQ

zachmelin/questrademcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

6 stars 5 forks Качество 76 Тренд 18MIT

Unofficial Questrade MCP server - access your trading accounts and market data in AI conversations.

Обзор

An Model Context Protocol (MCP) server for integrating with the Questrade API, providing access to trading accounts, market data, and portfolio information. : This is an unofficial, community-built integration and is not affiliated with, endorsed by, or supported by Questrade Inc. Use at your own risk. - 🔐 : OAuth 2.0 token management with automatic refresh - 📊 : Access accounts, positions, balances, and order history - 📈 : Real-time quotes, symbol search, and historical candles - 🛡️ : Comprehensive error handling and logging - 🔧 : Full TypeScript support with proper type definitions 1. Clone this repository 2. Install dependencies: 4. Configure your Questrade API credentials in .env: For detailed information about Questrade's API authorization, see the official API documentation. 1. Log in to your Questrade account or navigate directly to https://apphub.questrade.com/UI/UserApps.aspx 2. In the top right corner, select from the drop-down menu under your login name 3.

README

Показан фрагмент оригинального README. Открыть оригинал.

Questrade MCP Server

An unofficial Model 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.

Features

  • 🔐 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

Installation

npm install -g questrade-mcp-server

Option 2: Clone and Build

  1. Clone this repository

  2. Install dependencies:

    npm install
    
  3. Copy the environment template:

    cp .env.example .env
    
  4. 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
    

Getting Questrade API Credentials

For detailed information about Questrade’s API authorization, see the official API documentation.

Step 1: Generate API Token

  1. Log in to your Questrade account or navigate directly to https://apphub.questrade.com/UI/UserApps.aspx

  2. In the top right corner, select “API centre” from the drop-down menu under your login name

  3. Click “Activate API” and agree to the API access agreement

  4. Click “Generate new token” for manual authorization

  5. Copy the refresh token provided

Step 2: Configure Environment

  1. Copy your refresh token to .env:

    QUESTRADE_REFRESH_TOKEN=your_refresh_token_here
    
  2. The MCP server will automatically:

    • 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)
Открыть полный README на GitHub

Установка

npx questrade-mcp-server
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "questrade": { "command": "npx", "args": ["questrade-mcp-server"], "env": { "QUESTRADE_REFRESH_TOKEN": "your_refresh_token_here" } } } }