BTSE MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install btse-mcp
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add btse-mcp -- node "<FULL_PATH_TO_BTSE_MCP>/dist/index.js"

Replace <FULL_PATH_TO_BTSE_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

MCP server for the BTSE Futures API to query market data and manage trades.

btse-mcp

MCP server for the BTSE Futures API. Enables AI agents (Claude Desktop, Cursor, LangChain) to query market data, manage positions, and place orders on BTSE via natural language.


Prerequisites

  • Python 3.11 or higher — check with python --version
  • pip — check with pip --version
  • A BTSE account (testnet or live)

Step 1 — Get API keys from BTSE

Testnet (recommended first)

  1. Register at https://testnet.btse.io
  2. Go to Account → API tab → New API
  3. Save the API Key and Passphrase — the passphrase is shown only once and is your api_secret
  4. Set permissions: Read + Trading (add Transfer if needed)

Live

Same steps at https://btse.com


Step 2 — Install

pip install btse-mcp

# Verify
btse-mcp --help

Multiple Python versions (Anaconda etc): use the full path explicitly:

/usr/local/bin/python3.14 -m pip install btse-mcp

Step 3 — Configure accounts

Testnet

btse-mcp config --account-id testnet
# Prompts:
#   API Key    → paste your API key
#   API Secret → paste your passphrase (input is hidden)
#   Use testnet? [y/N] → y

# Verify the connection — should print BTC-PERP last price
btse-mcp test testnet

Live (when ready)

btse-mcp config --account-id main
# Same prompts — answer 'n' to testnet

# See all configured accounts
btse-mcp list

Credentials are stored encrypted at ~/.config/btse-mcp/accounts.enc.

Unified Futures Wallet: If your BTSE account has been upgraded to the Unified Futures Wallet (all accounts from late 2024 onwards), account endpoints automatically use the v2.2 API. No action needed.


Step 4 — Connect to Claude Desktop

btse-mcp install-claude

This auto-writes the correct config for your OS and creates the file if it doesn't exist. Then restart Claude Desktop.

Manual alternative: if the command fails, add this to your config file directly:

OS Path
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "btse": {
      "command": "/full/path/to/btse-mcp",
      "args": ["start"]
    }
  }
}

Find the full path with:

which btse-mcp

Open a new chat in Claude Desktop — you should see a tools icon (🔧) in the input bar.

Test it:

"What is the BTC-PERP mark price on BTSE using account testnet?"


Step 5 — Connect to Cursor

Open Cursor → Settings → MCP → Add Server and enter:

{
  "name": "btse",
  "command": "btse-mcp",
  "args": ["start"]
}

Then use natural language in Cursor chat:

"Show my open BTSE positions" "Place a limit buy on BTC-PERP at 60000 size 1 using account testnet"


Alternative: run from source

# Clone the repo
git clone https://github.com/xbotlive/btse-mcp.git
cd btse-mcp

# Install in editable mode
pip install -e .

# Start
python -m btse_mcp start

Tool list

Tool Description
btse_get_market_summary Market summary for one or all symbols
btse_get_price Mark / index / last price
btse_get_orderbook L2 orderbook snapshot
btse_get_trades Recent public trade fills
btse_get_ohlcv OHLCV candlestick data
btse_get_funding_history Historical funding rates
btse_get_wallet_balance Futures wallet balance
btse_get_positions Open positions
btse_get_account_fees Maker / taker fee rates
btse_get_leverage Current leverage for a market
btse_create_order Place LIMIT / MARKET / OCO order (supports TP/SL)
btse_cancel_order Cancel by order ID, or cancel all for a symbol
btse_get_open_orders List open orders
btse_get_order Single order detail
btse_get_trade_history User trade history
btse_amend_order Amend price / size / trigger price
btse_close_position Close position at market or limit
btse_set_leverage Set leverage (isolated or cross)
btse_get_risk_limit Get risk limit tier

All tools accept an optional account_id parameter (defaults to "default"). Pass "account_id": "testnet" to route to your testnet account.


Multi-account usage

btse-mcp list           # list all configured accounts
btse-mcp test main      # test a specific account

In prompts, specify the account explicitly:

"Using account testnet, show my BTC-PERP position"


Symbol naming

Use new-style perpetual names: BTC-PERP, ETH-PERP, SOL-PERP, etc.


Auth

BTSE uses HMAC-SHA384. The signature is:

HMAC-SHA384(api_secret, url_path + nonce + request_body)

Sent via headers: request-api, request-nonce, request-sign. See docs/integration.md for full details

Tools (19)

btse_get_market_summaryMarket summary for one or all symbols
btse_get_priceMark / index / last price
btse_get_orderbookL2 orderbook snapshot
btse_get_tradesRecent public trade fills
btse_get_ohlcvOHLCV candlestick data
btse_get_funding_historyHistorical funding rates
btse_get_wallet_balanceFutures wallet balance
btse_get_positionsOpen positions
btse_get_account_feesMaker / taker fee rates
btse_get_leverageCurrent leverage for a market
btse_create_orderPlace LIMIT / MARKET / OCO order (supports TP/SL)
btse_cancel_orderCancel by order ID, or cancel all for a symbol
btse_get_open_ordersList open orders
btse_get_orderSingle order detail
btse_get_trade_historyUser trade history
btse_amend_orderAmend price / size / trigger price
btse_close_positionClose position at market or limit
btse_set_leverageSet leverage (isolated or cross)
btse_get_risk_limitGet risk limit tier

Configuration

claude_desktop_config.json
{"mcpServers": {"btse": {"command": "btse-mcp", "args": ["start"]}}}

Try it

What is the current BTC-PERP mark price on BTSE using account testnet?
Show my open BTSE positions for my main account.
Place a limit buy on BTC-PERP at 60000 with size 1 using account testnet.
What is my current wallet balance on the testnet account?
Cancel all open orders for ETH-PERP on my main account.

Frequently Asked Questions

What are the key features of BTSE MCP?

Query real-time market data including orderbooks, trades, and OHLCV data.. Manage futures positions with tools to open, close, and adjust leverage.. Execute complex order types including LIMIT, MARKET, and OCO orders.. Support for multiple accounts including live and testnet environments.. Secure credential management with encrypted local storage..

What can I use BTSE MCP for?

Automating trading strategies by allowing AI to monitor market conditions and execute trades.. Quickly checking portfolio performance and wallet balances via natural language queries.. Testing trading logic in a safe environment using the BTSE testnet integration.. Managing multiple trading accounts simultaneously through a unified interface..

How do I install BTSE MCP?

Install BTSE MCP by running: pip install btse-mcp

What MCP clients work with BTSE MCP?

BTSE MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep BTSE MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare