Skip to content
AI

Remote Model Context Protocol

Connecting external AI applications to VarianTrade via the Model Context Protocol.

Full documentation context

Overview

The Model Context Protocol (MCP) is an open standard that enables AI models to safely call local or remote tools. VarianTrade provides a remote MCP server listed in the official Model Context Protocol registry. This lets external AI editors, chat applications, and custom agents fetch real-time portfolio data and propose trades.

The remote MCP server URL is:

https://api.variantrades.com/mcp/rpc

Plan requirement. The MCP server is part of the Full Plan. An account on the free plan, or on a signals-only plan (Day Pass, Week Pass, Signals Lite), can complete the OAuth sign-in but every call is refused with a message saying so, and nothing is read from your account. Upgrading with /subscribe lifts it immediately; if a plan ends, access ends with it.

Tool Catalogue

The MCP server exposes ten tools, each restricted by specific OAuth scopes:

Tool Name OAuth Scope Description / Return Values
get_account_status account.read Returns non-secret account metadata, including subscription details and verification status.
get_portfolio_summary portfolio.read Returns aggregated metrics: open and closed position counts, long/short counts, realized P&L, and open symbols.
get_open_positions portfolio.read Returns a list of active positions, including entry price, current price, stop loss, take profit, and individual P&L.
get_risk_limits risk.read Returns configured risk limits, including maximum position size, daily drawdown limit, and default stop-loss percentages.
list_recent_signals signals.read Returns recent AI-generated trading signals, including confidence scores, entry targets, and reasoning.
get_market_snapshot market.read Returns live price snapshots, volume, and percentage change for up to five symbols.
create_trade_proposal trade.propose Creates an expiring, non-executable trade proposal (using symbol, action, and notional).
get_trade_proposal trade.propose Fetches a previously created proposal.
request_telegram_approval trade.propose Sends an interactive Telegram approval card directly to the user’s linked bot chat.

Authorization and Approval Flow

When you add the remote MCP server to an external AI application, the application initiates an OAuth 2.1 authorization flow:

  1. The AI application opens a VarianTrade web page displaying the requested permission scopes.
  2. The page provides a link to open the VarianTrade Telegram bot.
  3. In Telegram, you receive a prompt showing the application name and the exact scopes requested.
  4. You select Approve or Deny in the bot chat.
  5. The authorization web page refreshes and redirects the AI application to complete the connection.

Safety Boundary

The trade proposal tools (create_trade_proposal and get_trade_proposal) operate under a strict safety boundary. They only record trade proposals; they never execute trades or place orders directly on a broker.

Every proposal must be confirmed manually by the user within the Telegram bot. When request_telegram_approval is invoked, an interactive approval card with trade details and action buttons is sent directly to the user’s Telegram chat. If a proposal is not approved within 15 minutes, it expires and is automatically deleted.

Worked Example: Tool Sequence

A well-behaved AI assistant should verify market conditions and risk limits before proposing a trade. The following sequence illustrates a sensible workflow:

  1. Verify Market Conditions: get_market_snapshot (symbols: ["BTCUSD"]) Returns the current market price of the asset.
  2. Retrieve Risk Profile: get_risk_limits Checks the maximum position size and default stop-loss settings allowed on the account.
  3. Check Portfolio Constraints: get_open_positions Ensures the new trade does not exceed the maximum allowed number of open positions or overall allocation limits.
  4. Create the Trade Proposal: create_trade_proposal (symbol: "BTCUSD", action: "BUY", notional: 1000.0, stop_loss: 95000, take_profit: 105000) Creates the expiring proposal and returns the generated proposal_id.
  5. Request Telegram Approval: request_telegram_approval (proposal_id: "<proposal_id>") Sends an interactive confirmation card to the user’s Telegram chat so the user can review and approve or reject the trade proposal out-of-band.