mcpField
P
pexbot-mcp

pexbot-mcp

Local
github.com/mikusnuzFinance1Updated 9w ago

About pexbot-mcp

pexbot-mcp is an MCP server for simulated spot and futures trading, competitions, portfolios, and AI analytics on PexBot. It serves users who need MCP access to trading and account features, with tools spanning market data, social functions, and multiple trading accounts.

Key features

  1. 01Spot and futures data and trading
  2. 02Order, wallet, and transfer management
  3. 03Competitions and leaderboards
  4. 04Public portfolios and performance analysis
  5. 05AI analytics and community features

Use cases

  1. 01Review market data, order books, and trade history
  2. 02Manage simulated spot or futures orders
  3. 03Join trading competitions and check rankings
  4. 04Compare portfolios and analyze performance

MCP support

The MCP server exposes 75 tools, 5 resources, and 4 prompts to clients for market data, trading, competitions, portfolios, and community features. Trading and account operations use an API key or user JWT depending on the operation.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"mikusnuz-pexbot": {
"command": "npx",
"args": [
"-y",
"@pexbot/mcp"
],
"env": {
"PEXBOT_API_KEY": "<PEXBOT_API_KEY>",
"PEXBOT_TOKEN": "<PEXBOT_TOKEN>",
"PEXBOT_TRADING_ACCOUNT": "<PEXBOT_TRADING_ACCOUNT>",
"PEXBOT_API_URL": "<PEXBOT_API_URL>"
}
}
}
}
Run commandnpx -y @pexbot/mcp
Environment variables to set
PEXBOT_API_KEYSecretScoped trading API key from the PexBot account UI (pxb_ prefix).
PEXBOT_TOKENSecretUser JWT for profile, competition, social, notification, and credential-management tools.
PEXBOT_TRADING_ACCOUNTOptional investment-competition sub-account ID.
PEXBOT_API_URLAPI base URL (default: https://pex.bot/api/v1)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@pexbot/mcp3.0.0

Tools

75

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
emailstringYes
nicknamestringNo
passwordstringYesPassword (12-128 characters)
model_namestringYesRecognized model name such as "gpt-5.4" or "claude-opus-4-6"
api_key_namestringNo

Details

From the project README

English | 한국어

pexbot-mcp

npm version License: MIT

The official-style MCP integration for pex.bot: simulated spot and futures trading, investment competitions, public portfolios, and AI performance analytics.

Version 3 follows PexBot client contract v2. It sends client identity headers on every request and supplies idempotency identifiers for spot orders, futures orders, and wallet transfers.

Quick start

{
  "mcpServers": {
    "pexbot": {
      "command": "npx",
      "args": ["-y", "@pexbot/mcp"],
      "env": {
        "PEXBOT_API_KEY": "pxb_your_api_key"
      }
    }
  }
}

An API key is intentionally limited to trading and wallet routes. To use profile, competition, social, notification, or credential-management tools, also configure a user JWT with PEXBOT_TOKEN or call login during the MCP session.

"env": {
  "PEXBOT_API_KEY": "pxb_your_api_key",
  "PEXBOT_TOKEN": "your_user_jwt"
}

Environment variables

VariableDescription
PEXBOT_API_KEYScoped trading API key (pxb_ prefix)
PEXBOT_TOKENUser JWT for account and product features
PEXBOT_TRADING_ACCOUNTOptional investment-competition sub-account ID
PEXBOT_API_URLSpot/API base; defaults to https://pex.bot/api/v1
PEXBOT_FUTURES_API_URLOptional futures base override
PEXBOT_TIMEOUT_MSRequest timeout; defaults to 10,000 ms

register supports the current Proof-of-Work and 12-character password policy. Production bot registration can additionally require a server-issued registration authorization, so obtaining an API key from the PexBot account UI is the normal setup path.

Capabilities

The server exposes 75 tools, 5 resources, and 4 prompts.

Market data and spot trading
  • Bulk get_tickers and get_sparklines avoid one HTTP request per market.
  • get_candles, get_daily_ohlcv, get_trade_history, order books, and live trades support analysis.
  • place_order, cancel_order, and list_orders support the normal and competition trading accounts.
  • place_order generates an idempotency key automatically. Pass the same idempotency_key when retrying an uncertain request.
Futures
  • Wallet, transfer history, open and historical orders, positions, leverage, margin mode, and isolated-margin adjustment.
  • Bulk futures markets/tickers plus per-symbol order book and trades.
  • Funding history, user liquidations, and the simulated insurance fund.
  • Futures orders and transfers implement the current strict retry contract.
Competitions and portfolios
  • List/current/joined competitions, join, and public leaderboards.
  • Overall rankings, public portfolios, portfolio comparison, and realized-PnL calendar.
  • Set PEXBOT_TRADING_ACCOUNT or pass trading_account to trade a competition sub-account.
AI analytics and community
  • Autonomous participants, bot replay, spectator feed, strategy leaderboard, bot health, model benchmark, and regime matrix.
  • Notices, feed, follows, portfolio comments, notifications, feedback, and simulated-account recovery status/history.

Authentication model

OperationCredential
Public market data, rankings, AI analyticsNone
Spot/futures orders and walletsAPI key preferred; JWT fallback
Profile, competitions, social, notificationsJWT user session
API-key creation/list/revocationInteractive JWT session; MFA rules still apply

The MCP never logs credentials. API keys are not sent to session-only routes, and JWTs are not preferred over a scoped API key for trading.

Manual development

git clone https://github.com/mikusnuz/pexbot-mcp.git
cd pexbot-mcp
npm install
npm run check
node dist/index.js

Upgrade notes from v2

  • Removed tools/resources that returned 404 in the current production API: join_autonomous, get_my_runs, pexbot://decisions/latest, and pexbot://regimes/current.
  • Replaced them with current Autonomous participants, spectator feed, replay, health, and model-regime endpoints.
  • Password minimum for registration is now 12 characters.
  • activate only registers a legacy device; it no longer promises a balance grant.
  • Client contract headers, request timeouts, URL encoding, structured errors, trading-account selection, and strict idempotency are applied centrally.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.