MCP Troubleshooting

Common errors and fixes for the TradeStaq MCP server.

AUTH_EXPIRED

Error: AUTH_EXPIRED: Your session has expired. Please authenticate again.

Cause: Your access token expired (they're short-lived — 60 min). A refresh-capable client renews silently via its 30-day rotating refresh token; you only see this if the refresh token itself expired (30 days idle), was revoked, or reuse was detected.

Fix:

  1. Re-authenticate: say "Log me in to TradeStaq" or "Authenticate me with TradeStaq"
  2. If using set_token, obtain a fresh token from the TradeStaq dashboard

TIMEOUT

Error: TIMEOUT: Request timed out after 30000ms

Cause: The TradeStaq API or your network took too long to respond. Common during backtests or when exchanges are slow.

Fix:

  1. Check your internet connection
  2. Try again — transient network issues resolve on retry
  3. For backtests, use get_backtest_status to poll instead of waiting for immediate results

"Already authenticated"

Error: Already authenticated as user@example.com. Use check_auth to verify or login again to switch accounts.

Cause: You called login or authenticate when a valid session already exists.

Fix:

  • This is informational, not a real error. You are already logged in.
  • To switch accounts, call login with different credentials — this replaces the current session.
  • To verify your session, ask "Am I logged in?" which calls check_auth.

Token Not Saved

Symptom: You authenticate successfully but the next tool call says you are not authenticated.

Cause: The MCP server process restarted between calls. Tokens are stored in memory and lost on restart.

Fix:

  1. Make sure your AI client is not restarting the MCP server between each request
  2. In Claude Desktop, verify the server stays running (check the MCP status indicator)
  3. If using the remote URL (mcp.tradestaq.com), the server is stateless — there are no server-side sessions to lose across restarts; your client just re-sends its bearer per request
  4. As a workaround, call login or set_token at the start of each session

Connection Refused

Error: Connection refused or ECONNREFUSED

Cause: The MCP server is not running or is on a different port.

Fix (npx / local):

  1. Verify the server is running: npx @the-staq/tradestaq-mcp should start without errors
  2. Check that Node.js is installed (v18+ required)
  3. Try clearing the npx cache: npx --yes @the-staq/tradestaq-mcp

Fix (remote URL):

  1. Check that you are using https://mcp.tradestaq.com/mcp (not http://)
  2. Test the health endpoint: curl https://mcp.tradestaq.com/health
  3. Check if your network blocks outbound HTTPS traffic

"Tool not found"

Error: The AI says a TradeStaq tool is not available.

Cause: The MCP server did not connect to your AI client, or the client has not discovered the tools yet.

Fix:

  1. Restart your AI client (Claude Desktop, Cursor, etc.)
  2. Verify your configuration file has the correct server entry
  3. In Claude Desktop, check the MCP icon for connection status
  4. Try removing and re-adding the server configuration

Exchange Errors

Error: EXCHANGE_ERROR: Failed to fetch data from binance

Cause: Your exchange API keys are invalid, expired, or missing required permissions.

Fix:

  1. Verify your exchange is connected in the TradeStaq dashboard
  2. Check that API keys have the required permissions (read + trade)
  3. If the exchange is under maintenance, wait and retry
  4. Re-connect the exchange in the dashboard if keys were rotated

Bot Deployment Fails

Error: BOT_DEPLOY_ERROR: Cannot deploy bot

Cause: Missing requirements for bot deployment — no exchange connected, no strategy selected, or subscription limits reached.

Fix:

  1. Confirm an exchange is connected and active
  2. Verify you own or have purchased the strategy
  3. Check your subscription tier for bot limits
  4. Try deploying in paper mode first: specify mode: "paper" in the deploy request

Getting Help

If none of the above fixes resolve your issue:

  1. Check the health endpointcurl https://mcp.tradestaq.com/health
  2. Update the packagenpx @the-staq/tradestaq-mcp@latest
  3. Contact supporthello@tradestaq.com
  4. Report a bugGitHub Issues

Next Steps