TopStepX MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
TopStepX MCP
AI-assisted TopStepX futures trading — connect Claude Code to your TopStepX account for demo and live order management, real-time streaming, and strategy automation.
Personal use only. Read the disclaimer and TopStepX's Terms of Use before using this tool with a live account.
What It Does
Gives your AI assistant full access to your TopStepX account:
Order management — place market/limit/stop/trailing orders with optional bracket SL/TP in one call
Position management — view, close, and partially close positions
Market data — fetch historical OHLCV bars (up to 20,000 per request)
Contract search — find futures contracts by symbol (NQ, ES, CL, GC, RTY, etc.)
Real-time streaming — live quotes, order fills, position changes, and DOM via SignalR
Trade history — P&L analysis and execution review
Demo + Live — works on both simulated (combine) and funded accounts
Related MCP server: NexusTrader MCP
Quick Start
1. Get API Access
Subscribe to the TopStepX API at dashboard.projectx.com. You'll need:
Your TopStepX username (email)
An API key from the dashboard
2. Install
git clone https://github.com/tradesdontlie/topstepx-mcp.git
cd topstepx-mcp
npm install
npm run build3. Add to Claude Code
Add to your ~/.claude/.mcp.json or project .mcp.json:
{
"mcpServers": {
"topstepx": {
"command": "node",
"args": ["/path/to/topstepx-mcp/dist/server.js"],
"env": {
"TSX_USERNAME": "your@email.com",
"TSX_API_KEY": "your-api-key"
}
}
}
}Replace /path/to/topstepx-mcp with your actual path.
4. Verify
Ask Claude: "Use tsx_health_check to verify TopStepX is connected"
How Claude Knows Which Tool to Use
Claude reads CLAUDE.md automatically when working in this project. It contains a decision tree:
You say... | Claude uses... |
"What accounts do I have?" |
|
"Buy 1 MNQ at market" |
|
"Buy limit 21500 with 10-tick SL" |
|
"What orders are working?" |
|
"Flatten my NQ" |
|
"Get 5-min NQ bars for last week" |
|
"Stream live quotes for ES" | connect → subscribe → read events |
"Show my P&L today" |
|
Tool Reference (35 tools)
Auth
Tool | Description |
| Login with username + API key, get JWT token |
| Check if current token is valid |
Accounts
Tool | Description |
| List all accounts (demo + live) |
| Balance, open positions, open orders summary |
Contracts & Market Data
Tool | Description |
| Search by symbol (NQ, ES, CL...) |
| Lookup by contract ID |
| List all available contracts |
| Historical OHLCV bars (max 20,000) |
Orders
Tool | Description |
| Place market/limit/stop + optional bracket SL/TP |
| Cancel an open order |
| Change price, size, or stop |
| All currently working orders |
| Historical orders by date range |
Positions
Tool | Description |
| All open positions |
| Flatten entire position (market) |
| Reduce position by N contracts |
Trades
Tool | Description |
| Execution history with P&L and fees |
Real-Time Streaming
Tool | Description |
| Connect SignalR user + market hubs |
| Subscribe to orders/positions/trades |
| Subscribe to live quotes |
| Subscribe to Level 2 book |
| Unsubscribe contract or account |
| Drain buffered events (with filter) |
| Hub connection status |
| Close all connections |
Info
Tool | Description |
| API + stream connectivity check |
| Enum reference for order types, sides, etc. |
Architecture
Claude Code ←→ MCP Server (stdio) ←→ REST (port 443) ←→ api.topstepx.com
←→ SignalR/WS ←→ rtc.topstepx.comTransport: MCP over stdio
Auth: JWT via POST /api/Auth/loginKey (24h tokens, auto-refresh)
REST: All POST with JSON bodies
Streaming:
@microsoft/signalrwith WebSocket-only transport, skipNegotiation, auto-reconnect
Requirements
Node.js 18+
TopStepX API subscription (from dashboard.projectx.com)
Claude Code with MCP support
Environment Variables
TSX_USERNAME=your@email.com # Required
TSX_API_KEY=your-api-key # Required
# Optional (defaults to TopStepX endpoints)
TSX_API_URL=https://api.topstepx.com/api
TSX_USER_HUB_URL=https://rtc.topstepx.com/hubs/user
TSX_MARKET_HUB_URL=https://rtc.topstepx.com/hubs/marketDisclaimer
This project is provided for personal, educational, and research purposes only.
This tool is not affiliated with, endorsed by, or associated with Topstep LLC, ProjectX Trading LLC, or any affiliated entities.
By using this software, you acknowledge and agree that:
You are solely responsible for ensuring your use of this tool complies with TopStepX's Terms of Use and all applicable laws.
Running on VPS, cloud servers, or remote access tools is strictly prohibited by TopStepX ToS. This MCP server must run on your local machine only.
You assume all risk associated with using this tool. The authors are not responsible for order errors, account violations, trade losses, or any other consequences.
Orders placed via API cannot be reversed by TopStepX support.
Always test on demo/simulated accounts before using with a funded account.
This tool accesses the official TopStepX/ProjectX Gateway API — but your use must comply with their ToS.
Use at your own risk.
License
MIT — see LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Unified financial infrastructure connecting AI agents directly to trade live/demo brokerage accounts, Web3 non-custodial wallets, real-time market data across equities, ETFs, crypto, forex, options, DeFi swaps, and prediction markets, institutional research feeds, and algorithmic strategy backtesters.
Connect brokerage accounts to AI assistants: holdings, orders, asset lookup, and approved trading.
Send trade alerts from AI agents to your broker: stocks, options, futures, crypto and perps.
Connect your AI to a funded trading account. Read & trade a simulated funded challenge.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to trade on MetaTrader 5 using natural language, supporting account management, order placement, and real-time market data.1MIT

NexusTrader MCPofficial
FlicenseAqualityDmaintenanceExposes NexusTrader's account, positions, market data, and trading capabilities to AI assistants via natural language.191-- AlicenseNot gradedqualityDmaintenanceConnects a brokerage account to AI assistants, enabling portfolio queries, order management, and market data access through natural language.MIT

AlgoVesta MCP Serverofficial
AlicenseNot gradedqualityBmaintenanceConnects AI assistants to 16 crypto exchanges and MetaTrader 5 over a single MCP endpoint, enabling trading and account management with server-side risk controls, paper trading by default, and auditable signed receipts.4CC BY-4.0