Skip to content

Model Context Protocol (MCP) Server ​

Connect your AI agents (Cursor, Claude Desktop, AutoGPT) directly to live exchange order flow via the official BitCLI MCP Server.

🛑 Stop burning millions of LLM tokens on raw OHLCV data.
Traditional REST APIs send bloated JSON arrays. BitCLI computes complex micro-structural metrics in RAM and delivers token-optimized BCT matrices directly into your agent's context window.


1. Agent Architecture: Stateless vs Autonomous ​

BitCLI supports two paradigms for AI integration:

A. Stateless Assistants (Cursor, ChatGPT) ​

  • Transport: Streamable HTTP POST (https://mcp.bitcli.io/mcp)
  • How it works: The agent analyzes the market upon your prompt and uses the alert_manager tool to set an HFT trigger in the BitCLI C++ Engine. The agent then goes to sleep. When the market condition is met, BitCLI pushes the alert directly to the human user's Telegram or Discord.
  • Pro-Tip: Agents can also use the send_notification tool to push immediate text insights to the user's chat.

B. Autonomous Agents (Python SDK) ​

  • Transport: Stateful WebSockets (wss://mcp.bitcli.io/stream)
  • How it works: Your Python script stays running 24/7. It sets a trigger, and when the C++ engine catches the anomaly, it pushes an event down the WebSocket. Your agent wakes up, pulls the latest data, and executes a trade via exchange APIs.

2. API Keys & Waterfall Billing ​

BitCLI operates a unified billing system for human Telegram accounts and autonomous AI agents. We use a Waterfall approach:

  1. Daily Quota: When your agent executes a tool, it first deducts from your tariff's daily AI allowance (e.g., Pro plan gets 100 free requests/day).
  2. Pay-As-You-Go ($0.001/req): Once the daily quota is exhausted, tools are billed at ~$0.001 USD from your global wallet balance.

You can generate an API Key directly in the Telegram Bot (/list ➔ Delegate to AI Agent) or in the Web Dashboard.

🔧 How to add your API Key to Cursor IDE ​

Cursor's MCP UI does not currently support custom HTTP Headers. You must pass your API key directly in the URL via the token query parameter:

  1. Open Cursor Settings -> Features -> MCP.
  2. Add a new SSE Server.
  3. Name it BitCLI.
  4. URL: https://mcp.bitcli.io/mcp/sse?token=bcli_YOUR_KEY_HERE(If you use Claude Desktop, you can inject it via env variables).

3. Core Tools Exposed ​

market_data ​

Fetches token-optimized historical OHLCV, CVD delta, and server-side calculated indicators formatted as BCT. Also runs the dynamic screener across 1,650+ perpetuals.

calc_engine ​

Executes mathematical models: position sizing based on $ risk, true MMR liquidation prices, DCA break-even, and multi-target R:R.

alert_manager ​

Registers a high-frequency trigger in the C++ engine. Uses the exact same syntax as the Telegram bot (e.g., btc 95k, sol +3% 5m, * vol 15m x4).

send_notification [NEW] ​

Allows the agent to send a direct message (Telegram HTML supported) to any of the user's verified destinations (Private Telegram, Channels, or Discord Webhooks). Perfect for keeping the human in the loop.

user_account ​

Read-only tool for the agent to check its remaining daily USD limit and list available notification destinations.