# tradestaq-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/the-staq/tradestaq-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 6563  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/tradestaq-mcp

## Description
AI-powered crypto trading tools. Strategies, backtests, bots, and portfolio management.

## Tools
Capabilities this server exposes over MCP:

- **login** — Log in to TradeStaq with email and password and store the returned access token locally. Simple credential login for automation and headless use; for interactive users prefer authenticate (browser OAuth, where credentials never enter the chat). Credentials are sent directly to the TradeStaq API over HTTPS and are not persisted — only the returned token is saved.
- **authenticate** — Log in to TradeStaq via browser. Opens a login page in your browser — you authenticate there and the token is saved automatically. No credentials enter the chat.

Scope controls what the agent can do: "mcp:read" (view-only research agents), "mcp:paper" (paper-trade bots, safe default — cannot touch live money), "mcp:live" (full access including live-money deploys, live exchange connections, and wallet charges). Scopes are hierarchical: live implies paper implies read. When in doubt, pick paper first — the server returns 403 insufficient_scope if the agent tries a live action, and the user can always re-authorize with a broader scope.
- **check_auth** — Preflight check before invoking other tools. Returns the authenticated user, OAuth scope on the current token (mcp:read / mcp:paper / mcp:live), tier capabilities (allowLiveTrading, allowAIBuilder, allowNewsTrading, allowMcpServer), Strategy Lab wallet balance (for cost-charging tools like generate_strategy), and the OAuth client name/expiry. Agents should call this at the start of a workflow to pick the narrowest scope needed and to surface cost/balance to the user before committing to a charge. Response is cached server-side for 30s per token.
- **set_token** — Manually store a TradeStaq JWT access token instead of logging in through the browser. Advanced / automation use only — most users should call authenticate (browser OAuth) or login (email + password) instead. The token is saved locally to ~/.tradestaq/mcp-config.json with an assumed 7-day expiry. Use this when you already hold a valid token, e.g. in CI or a headless environment.
- **connect_exchange** — Connect a new exchange account via browser. Opens a page where you securely enter your exchange API keys. Keys never enter the chat.
- **logout** — Remove the stored TradeStaq credentials from local config (~/.tradestaq/mcp-config.json), signing the user out. Also clears the cached OAuth client so the next authenticate registers cleanly — call this before re-authenticating with a different scope.
- **get_price** — Get the current price of a trading pair, along with its 24h change and volume, from a connected exchange. Use it for a quick spot-price check or to confirm the market before sizing or placing a trade. Read-only — never places orders. For historical OHLCV data use get_candles.
- **get_candles** — Fetch OHLCV (open/high/low/close/volume) candlestick data for a trading pair from a connected exchange. Use it to analyze price action, compute indicators, or ground a trading decision in real market data before backtesting or deploying a strategy. Returns the candles plus the latest candle and the high/low range over the window. Read-only — never places orders. Get exchange IDs from list_exchanges.
- **list_exchanges** — List your connected exchange accounts with their IDs, platform names, and status.
- **create_paper_exchange** — Create a paper-trading exchange with a simulated balance. No API keys required. Paper exchanges let agents test strategies, deploy bots, and place trades without risking real money. Recommended starting point for first-time users and any scope=mcp:paper workflow.

Requires OAuth scope mcp:paper or mcp:live. Session-cookie users (dashboard) can always call this.
- **search_markets** — Search for trading pairs on a specific exchange. Use list_exchanges to find your exchange IDs.
- **get_portfolio** — Get portfolio overview: total balance, exchanges, and active bots.
- **get_positions** — Get all open trading positions with current PnL.
- **list_strategies** — List available trading strategies — either the public marketplace or the user's own library. Use it to discover strategies to backtest or deploy, or to find strategy IDs for get_strategy, compare_strategies, and deploy_bot. Read-only.
- **get_strategy** — Get full details for a specific strategy by ID: description, market/timeframe, performance stats, rating, and code metadata. Use it to inspect a strategy before backtesting, deploying, or comparing. Read-only. Get IDs from list_strategies; use compare_strategies for side-by-side comparison and explain_strategy for a plain-English breakdown.
- **explain_strategy** — Get a plain-English explanation of a strategy: what it does, risk profile, best market conditions.
- **compare_strategies** — Compare 2-5 strategies side by side on their key performance metrics: ROI, max drawdown, win rate, Sharpe ratio, rating, and active bot count. Use this to help a user choose between strategies from the marketplace or their own library before backtesting or deploying one. Read-only. Get strategy IDs from list_strategies.
- **create_strategy** — Save a new trading strategy from existing TradeDroid strategy code to the user's library, so it can be backtested or deployed. Use this when you already have the code (hand-written or produced by generate_strategy). To create a strategy from a natural-language description instead of code, use generate_strategy. Returns the new strategy ID; validate it with what_if_backtest before deploying via deploy_bot.
- **generate_strategy** — Generate a complete trading strategy from a natural-language description using AI (FORGE). Describe the idea and it writes runnable TradeDroid strategy code — no coding required — then saves it so you can validate with what_if_backtest and deploy with deploy_bot. The fastest path from idea to a deployable strategy. Note: AI generation is a paid, cost-bearing operation and can take up to ~2 minutes.
- **what_if_backtest** — Run a backtest on a strategy. Async, may take 30-120 seconds. Returns full performance metrics.
- **get_backtest_results** — Check status/results of a previously started backtest.
- **export_backtest** — Get export links for a completed backtest. Returns CSV and PDF download URLs.
- **list_bots** — List all your trading bots with status and performance.
- **get_bot_status** — Get detailed status, configuration, and live performance for a specific trading bot by ID. Returns its run status, the strategy/symbol/exchange it trades, whether it is paper or live, P&L, win rate, total trades, and risk config (leverage, stop-loss, take-profit). Use it to check how a deployed bot is doing. Read-only — to stop a bot use stop_bot. Get bot IDs from list_bots.
- **deploy_bot** — Deploy a strategy as a trading bot. Defaults to paper trading for safety.
- **stop_bot** — Stop a running trading bot so it stops opening new positions. Any positions it currently holds stay open — close those separately with close_position. The bot and its config are kept and can be restarted later, so this is a reversible state change, not a delete. Check state first with get_bot_status; find bot IDs with list_bots.
- **export_bot_trades** — Export a bot's trade history as structured data — every closed trade with entry/exit prices and P&L, plus a performance summary. Use it to review or report on how a specific bot has performed. Read-only. Get bot IDs from list_bots.
- **close_position** — Close an open trading position by placing a market order — fully or partially. This moves real money when the position is live, so confirm intent with the user before calling. Find the tradeId, exchangeId, and symbol with get_positions. Set percentage below 100 for a partial close.
- **get_trade_history** — Get the user's closed trade history across exchanges — entry/exit prices, P&L, and holding duration per trade, with pagination. Use it to review past trades or answer questions about specific fills. Read-only. For aggregate metrics (ROI, win rate, Sortino) use get_performance_metrics instead.
- **get_performance_metrics** — Get aggregate trading performance metrics over a time range: ROI, win rate, total P&L, and Sortino ratio. Use it to summarize how the user (or a subset of their trading) is performing. Read-only. For a list of individual trades use get_trade_history.
- **list_top_traders** — Browse the leaderboard of top-performing traders you can copy.
- **follow_trader** — Subscribe to copy a top trader's trades. WARNING: This commits capital to copy trading.
- **suggest_strategies** — Suggest trading strategies matching your risk profile. Filters by risk tolerance, max drawdown, preferred assets, and minimum Sharpe ratio.
- **get_market_context** — Get a market read for a symbol: trend direction, volatility level, and key support/resistance levels. Use it to inform a strategy or trade decision, or to ground market commentary in current conditions. Read-only — never places orders. Get exchange IDs from list_exchanges.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "tradestaq-mcp": {
    "command": "npx",
    "args": ["-y","@the-staq/tradestaq-mcp"]
  }
}
```

## Documentation

## What tradestaq-mcp does

tradestaq-mcp exposes TradeStaq's crypto trading workflows to MCP-compatible AI clients. It covers authentication, exchange connections, market data, portfolio and position queries, strategy discovery, AI-assisted strategy generation, historical backtesting, bot deployment, and trade reporting.

The server can work with connected exchange accounts or a paper-trading exchange. Paper exchanges use simulated balances and do not require exchange API keys, making them suitable for testing strategies and bots without risking live funds. Supported exchange access is managed through TradeStaq rather than by sending exchange credentials through the chat.

## How it works

The server supports a remote MCP endpoint at `https://mcp.tradestaq.com/mcp`, a local package launched with `npx`, and a cloned project built with npm. After installation, authenticate with a browser-based OAuth flow or use email and password login. Browser authentication keeps credentials out of the conversation; the resulting token is stored locally in `~/.tradestaq/mcp-config.json`.

Scopes control access hierarchically:

- `mcp:read` allows view-only research.
- `mcp:paper` adds paper-trading operations.
- `mcp:live` includes live exchange connections, live-money deployments, and wallet-charging operations.

Agents should call `check_auth` before a workflow to inspect the current scope, account capabilities, wallet balance, and token details. A narrower scope is appropriate when live trading is not needed. An insufficient scope produces a 403 response rather than granting additional access.

## Setup and configuration

For an HTTP-capable MCP client, add the remote URL as an MCP server. For local use, configure the client to run:

```json
{
  "command": "npx",
  "args": ["-y", "@the-staq/tradestaq-mcp"]
}
```

The repository can also be installed and built with `npm install` followed by `npm run build`, then referenced through `dist/index.js`. Claude Desktop, Cursor, and Claude Code examples are available through their respective MCP configuration or command-line setup.

Use `authenticate` for browser OAuth, `login` for direct email/password automation, or `set_token` when a valid JWT is already available in an automated environment. `connect_exchange` opens a browser flow for entering exchange API keys. `logout` removes the locally stored TradeStaq credentials.

## Tools and capabilities

- Query prices, 24-hour changes, volume, OHLCV candles, markets, connected exchanges, portfolios, positions, trade history, and aggregate performance.
- Create simulated exchanges and inspect open positions without using live funds.
- Browse marketplace or personal strategies, inspect their metadata and metrics, explain their risk profile, and compare two to five strategies.
- Save existing TradeDroid code as a strategy or generate runnable strategy code from a natural-language description.
- Run asynchronous historical backtests, retrieve results, and export completed reports as CSV or PDF links.
- List bots, inspect status and performance, deploy strategies, stop bots, export bot trades, and close positions fully or partially.

## Limitations and notes

Backtests are asynchronous and may take roughly 30 to 120 seconds. AI strategy generation is a paid operation and can take up to about two minutes; cost and wallet balance should be checked before use.

`deploy_bot` defaults to paper trading, while `live: true` enables real-money execution subject to `mcp:live`. Closing a live position places a market order and can move real funds, so intent should be confirmed before calling it. Stopping a bot prevents new positions but leaves existing positions open; those positions must be closed separately.

Tokens are stored locally with restricted file permissions. Direct login sends credentials to the TradeStaq API over HTTPS and does not persist the credentials themselves. Browser authentication avoids putting those credentials into the chat.

_Full upstream README: https://allmcps.com/mcp/tradestaq-mcp/readme_

