TradeStaq MCP Server
Website · Docs · MCP / AI Tools · Pricing
46 AI-powered trading tools for Claude, Cursor, and any MCP client.
Create strategies, backtest them, deploy trading bots, copy top traders, monitor positions, and manage your crypto portfolio, all from conversation. Supports Binance, Bybit, OKX, Bitget, Hyperliquid, dYdX, and more.
"Show me my portfolio" → get_portfolio
"Backtest GhostRider on BTC/USDT for 3 months" → what_if_backtest
"Deploy it on my Binance account" → deploy_bot
"Who are the top traders this month?" → list_top_traders
"Generate a momentum strategy for ETH" → generate_strategy
Quick Start
Option A: Remote server (no install needed)
For MCP clients that support HTTP transport:
{
"mcpServers": {
"tradestaq": {
"url": "https://mcp.tradestaq.com/mcp"
}
}
}
Option B: npx (recommended for local)
No clone, no build. Just add to your MCP config:
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"tradestaq": {
"command": "npx",
"args": ["-y", "@the-staq/tradestaq-mcp"]
}
}
}
Cursor (.cursor/mcp.json):
{
"mcpServers": {
"tradestaq": {
"command": "npx",
"args": ["-y", "@the-staq/tradestaq-mcp"]
}
}
}
Claude Code:
claude mcp add tradestaq -- npx -y @the-staq/tradestaq-mcp
Option C: Clone and build
git clone https://github.com/the-staq/tradestaq-mcp.git
cd tradestaq-mcp
npm install
npm run build
Then point your MCP client to dist/index.js.
Authenticate
After adding the server, ask your AI assistant to log in:
- "Log me in to TradeStaq" — uses email/password directly
- "Authenticate with TradeStaq" — opens a browser window for secure OAuth login
Credentials never enter the chat when using the browser flow. Token is stored locally at ~/.tradestaq/mcp-config.json with restricted permissions (0600).
Tools
Auth
Market Data
Portfolio
Strategies
Backtesting
Bot Management
deploy_bot defaults to paper trading. Pass live: true for real money. The bot trades on the strategy's own timeframe; pass timeframe (e.g. 4h) only to override it. Leave out name and the server names the bot.
update_bot sends everything you pass in one update, after merging it onto the bot's current settings (position sizing, spin settings and parameter overrides are never wiped by a partial change). Size and leverage change only when you pass them. strategyId and presetId take an ID or a slug (trade-wind, trade-wind-long-short). A strategy or timeframe change needs the bot to be flat: pause it with stopAfterClose: true first, wait until get_bot_status shows no open position, then switch, then start_bot. A live bot needs the mcp:live scope for any change; a paper bot mcp:paper. The reply is the resulting config (strategy, version, timeframe, mode, overrides, size, leverage, status) plus server warnings.
For example, switching a paused 15m GhostRider bot to Trade Wind on 4h with its Long & Short preset, and renaming it:
{ "id": "6ab7c2d60014ba19b0c54258", "presetId": "trade-wind-long-short", "timeframe": "4h", "name": "Trade Wind · SUI · 4h" }
Trade History
Copy Trading
Advisor
Prompt Templates
Trading Assistant — Start a conversation about your portfolio and positions. The AI calls get_portfolio and get_positions to ground its responses in your actual data.
Strategy Builder — Walk through creating, backtesting, and deploying a strategy. Pass an optional goal like "momentum strategy for ETH" to get focused suggestions.
Portfolio Reviewer — Deep analysis of your portfolio, positions, trade history, and performance. Identifies what's working, what isn't, and suggests improvements.
Resources
MCP resources provide browsable data that AI clients can read directly:
Architecture
stdio HTTPS
┌──────────────┐◄──────────►┐ ┌────────────────►┌──────────────┐
│Claude Desktop│ │ │ │ │
│Cursor / CLI │ │ tradestaq-mcp │ Bearer JWT │ TradeStaq │
└──────────────┘ │ 46 tools │◄────────────────│ API │
│ 3 prompts │ │ │
┌──────────────┐ HTTP+SSE │ 3 resources │ └──────────────┘
│ Any MCP │◄──────────►│ │
│ client (web) │ └──────────────────┘
└──────────────┘
- Two transports: stdio (local, default) and HTTP+SSE (remote,
--httpflag) - Hosted at
https://mcp.tradestaq.com/mcpfor remote clients - JWT auth via OAuth PKCE or email/password login
- All tools return structured JSON with error contract
- Token auto-refresh when expiring within 1 hour
Development
npm run dev # watch mode with tsx
npm run build # compile TypeScript
npm run lint # type check without emitting
npm test # run tests
npm start # run server (stdio)
npm run start:http # run server (HTTP+SSE on port 3100)
Releasing
npm run release:patch # or release:minor / release:major
This bumps the version (and the server.json versions), files the CHANGELOG's
[Unreleased] notes under it, commits, tags vX.Y.Z and pushes. The tag triggers
.github/workflows/publish.yml:
- Approve the run. The publish job waits in the
npmenvironment for a maintainer's approval (Actions, then the run, then Review deployments). - It type-checks, tests and publishes to npm through trusted publishing (no npm token anywhere), with provenance.
- It updates the listing on the official MCP Registry.
Then run the Deploy MCP workflow to update the hosted server at mcp.tradestaq.com.
Error Handling
All tool errors return structured responses:
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Human-readable description",
"retryable": true,
"retryAfterMs": 5000
}
}
Error codes: AUTH_EXPIRED, TIMEOUT, RATE_LIMITED, NETWORK_ERROR, HTTP_4xx, HTTP_5xx.
Security
- Credentials never enter AI conversation history
- OAuth PKCE flow with browser-based authentication
- Token stored with 0600 file permissions
- Localhost-only OAuth callbacks
deploy_bot,stop_bot,close_position, andfollow_traderare destructive operations (AI confirms with user)
Links
- Website: tradestaq.com
- Documentation: tradestaq.com/docs
- MCP & AI trading tools: tradestaq.com/mcp
- Pricing: tradestaq.com/pricing
- npm package: @the-staq/tradestaq-mcp
License
MIT