projectx-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| HOST | No | Host for HTTP transport; default is 127.0.0.1. | 127.0.0.1 |
| PORT | No | Port for HTTP transport; default is 8787. | 8787 |
| MCP_TRANSPORT | No | Transport to use: 'stdio' (default) or 'http' for remote access. | stdio |
| PROJECTX_API_KEY | Yes | API key generated in TopstepX Settings → API. Required for authentication. | |
| PROJECTX_API_URL | No | Overrides the TopstepX ProjectX API URL for other ProjectX-powered firms. | |
| PROJECTX_ENV_FILE | No | Path to an alternative .env file to load. | |
| PROJECTX_USERNAME | Yes | Your platform login username for TopstepX (not email or account name). Required for authentication. | |
| MCP_HTTP_AUTH_TOKEN | No | Authentication token for HTTP transport, required when MCP_TRANSPORT=http. Must be 16+ characters. | |
| PROJECTX_MARKET_HUB_URL | No | Overrides the TopstepX ProjectX market hub URL for other ProjectX-powered firms. | |
| PROJECTX_MAX_DAILY_LOSS | No | Maximum daily realized P&L loss in dollars before only orders that reduce the position are allowed. Set to '0' to disable. | 500 |
| PROJECTX_MAX_ORDER_SIZE | No | Maximum contracts per order. | 1 |
| PROJECTX_ALLOWED_SYMBOLS | No | Comma-separated contract roots allowed, e.g. 'MNQ,MES'; default any. | |
| PROJECTX_TRADING_ENABLED | No | Guardrail: set to 'true' to enable order tools; default 'false'. Orders are refused when false. | false |
| PROJECTX_MAX_POSITION_SIZE | No | Maximum absolute net position per contract, counting resting same-side limit orders. | 2 |
| PROJECTX_ALLOWED_ACCOUNT_IDS | No | Comma-separated list of account IDs allowed to be traded; default any. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_server_configA | Show whether trading is enabled and the risk guardrails this server enforces (max order size, max position, daily loss limit, allowed accounts/symbols). Call this first in every session. |
| list_accountsC | List trading accounts on this login with balance and canTrade flag. |
| get_account_snapshotA | One-call view of an account: balance, open positions, working orders, and today's realized P&L (trading day starts 17:00 America/Chicago) versus the daily loss limit. Use this to monitor between decisions. |
| search_contractsA | Find tradable contracts by text, e.g. "MNQ", "ES", "CL". Returns up to 20 with id, tickSize, tickValue (USD per tick per contract) and activeContract. Trade the activeContract=true front month. |
| get_contractA | Look up one contract by ID (tick size, tick value, whether it is the active month). |
| list_available_contractsA | List every contract available to trade. Large output; prefer search_contracts when you know the symbol. |
| get_barsB | OHLCV bars for a contract, returned oldest→newest. t=bar open time (UTC), o/h/l/c=prices, v=volume. Defaults: endTime=now, startTime chosen to cover |
| get_quoteA | Latest real-time quote (lastPrice, bestBid, bestAsk, session open/high/low, volume) from the market hub. Returns null quote if none arrives within the timeout (e.g. market closed). |
| list_open_ordersA | Working orders on an account (includes bracket stop/target legs). |
| search_ordersB | Orders created in a time window (any status). For trailing stops, trailPrice here is the trail distance in price, not a level. |
| list_open_positionsB | Open positions on an account. direction is long/short; averagePrice is the entry. |
| search_tradesC | Fills in a time window. profitAndLoss is null on the opening half of a round turn (halfTurn=true) and set on the closing fill. Defaults to the current trading day. |
| get_performanceA | Win rate, net P&L after fees, average win/loss, profit factor, expectancy, overall and per contract, for a time window (default: current trading day). Use it to grade your own trading. |
| place_orderA | Submit an order. side: buy|sell. type: market | limit (needs limitPrice) | stop (needs stopPrice) | trailing_stop (needs trailPrice = absolute price level, NOT a distance) | join_bid | join_ask. Brackets (stopLossBracket/takeProfitBracket, in ticks) only work if the account uses Auto OCO Brackets; otherwise place a separate stop order after the fill. Server guardrails may block the order. |
| modify_orderA | Change size or price of a working order (e.g. move a stop to breakeven). trailPrice is an absolute price level; unlike place_order there is no max-distance check, so double-check it. |
| cancel_orderA | Cancel a working order. Simulated (non-follower) accounts only. |
| close_positionA | Flatten the whole position in a contract at market. Does NOT cancel resting stop/target orders; check list_open_orders and cancel leftovers. |
| partial_close_positionA | Close part of a position at market (scale out). |
| journal_addA | Persist your reasoning so future sessions can learn from it. kinds: plan (pre-session thesis), entry, exit, review (post-trade grading: what happened vs. plan), lesson (a durable rule you want future-you to follow), note. |
| journal_readA | Read past journal entries (newest last). Start each session with journal_read({kind:"lesson"}) and recent reviews so you do not repeat mistakes. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| trading_session | Kick off a disciplined trading session: review lessons, plan, trade within guardrails, review. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| guide | How to use these tools to trade and learn. |
TDQS
Scored across 20 tools
Each tool maps to a distinct resource-action pair: contracts, orders, positions, accounts, market data, journal, and performance. The only close pair (list_available_contracts vs search_contracts) is explicitly disambiguated in the descriptions, and get_account_snapshot is clearly positioned as the one-call superset of list_accounts.
All 20 tools follow a consistent verb_noun snake_case pattern: get_, list_, search_, place_, cancel_, modify_, close_, journal_add/journal_read. There are no mixed conventions or vague single-word names.
20 tools is above the typical 3-15 range, but the trading domain has several distinct resource types (contracts, market data, accounts, orders, positions, performance, journal) that justify the breadth. Each tool maps to a concrete workflow step, so it feels slightly heavy rather than bloated.
The server covers the full trading lifecycle: contract discovery, market data, account monitoring, order placement/modification/cancellation, position management, trade/performance review, and persistent journaling. No obvious dead ends or missing core operations are apparent for the stated purpose.