aster-mcp-server

questflowai/aster-mcp-server

3.2

If you are the rightful owner of aster-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

Aster Finance MCP Server provides tools to interact with the Aster Finance Futures API, enabling AI agents and MCP-compatible clients to access market data and manage trades.

Tools
5
Resources
0
Prompts
0

Aster Finance MCP Server

Powered by Questflow

This project is an MCP (Model Context Protocol) Server that provides a comprehensive set of tools to interact with the Aster Finance Futures API. It allows AI agents and other MCP-compatible clients to access market data, manage trades, and query account information on the Aster exchange.

Features

  • Full REST API Coverage: Implements all RESTful endpoints from the Aster Futures API documentation (excluding WebSocket streams).
  • Market Data: Access real-time and historical market data, including order books, trades, klines, and ticker information.
  • Account & Trading: Full trading capabilities, including placing/canceling orders, managing positions, and checking account balances.
  • Secure: Uses API keys stored securely as environment variables, never hardcoded.
  • Stdio Transport: Runs as a standard I/O process, making it easy to integrate with MCP hosts.

Installation & Configuration

This server is designed to be run by an MCP host environment.

  1. Install Dependencies & Build:

    You can use either npm or pnpm to install the project dependencies and build the server.

    Using npm:

    npm install
    npm run build
    

    Or using pnpm:

    pnpm install
    pnpm run build
    
  2. Configure the MCP Host: Add the following configuration to your MCP settings file (e.g., cline_mcp_settings.json). This tells the host how to launch the server and provides the necessary API credentials.

    {
      "mcpServers": {
        "aster": {
          "command": "node",
          "args": [
            "/path/to/your/aster-mcp-server/build/index.js"
          ],
          "env": {
            "ASTER_API_KEY": "YOUR_ASTER_API_KEY",
            "ASTER_API_SECRET": "YOUR_ASTER_SECRET_KEY"
          },
          "disabled": false,
          "autoApprove": []
        }
      }
    }
    

    Replace /path/to/your/aster-mcp-server with the absolute path to this project directory, and fill in your actual ASTER_API_KEY and ASTER_API_SECRET.

Available Tools

The server exposes the following tools, categorized by function:

Market Data Endpoints

Tool NameDescription
pingTest connectivity to the Rest API.
timeGet the current server time.
exchangeInfoGet current exchange trading rules and symbol info.
depthGet the order book for a symbol.
tradesGet recent market trades.
historicalTradesGet older market historical trades.
aggTradesGet compressed, aggregate market trades.
klinesGet Kline/candlestick bars for a symbol.
indexPriceKlinesGet Kline/candlestick bars for the index price.
markPriceKlinesGet Kline/candlestick bars for the mark price.
premiumIndexGet Mark Price and Funding Rate.
fundingRateGet funding rate history.
fundingInfoGet funding rate configuration.
ticker_24hr24-hour rolling window price change statistics.
ticker_priceGet the latest price for a symbol or symbols.
ticker_bookTickerGet the best price/qty on the order book.

Account & Trade Endpoints

Tool NameDescription
setPositionModeChange user's position mode (Hedge vs. One-way).
getPositionModeGet user's current position mode.
setMultiAssetsModeChange user's Multi-Assets mode.
getMultiAssetsModeGet user's current Multi-Assets mode.
placeOrderSend in a new order.
placeBatchOrdersPlace multiple orders at once.
transferAssetTransfer assets between futures and spot accounts.
queryOrderCheck an order's status.
cancelOrderCancel an active order.
cancelAllOpenOrdersCancel all open orders on a symbol.
cancelBatchOrdersCancel multiple orders.
countdownCancelAllAuto-cancel all open orders after a countdown.
queryOpenOrderQuery a specific open order.
getAllOpenOrdersGet all open orders on a symbol.
getAllOrdersGet all account orders (active, canceled, or filled).
getBalanceGet futures account balance.
getAccountInfoGet current account information.
setLeverageChange initial leverage for a symbol.
setMarginTypeChange margin type (ISOLATED/CROSSED).
modifyPositionMarginModify isolated position margin.
getPositionMarginHistoryGet position margin change history.
getPositionInfoGet current position information.
getTradeListGet trades for a specific account and symbol.
getIncomeHistoryGet income history.
getLeverageBracketsGet notional and leverage brackets.
getAdlQuantileGet Position ADL Quantile Estimation.
getForceOrdersGet user's force orders (liquidations/ADL).
getCommissionRateGet user's commission rate for a symbol.

Usage Example

Once the server is running, you can invoke its tools through your MCP client. For example, to get the current server time, you would make a callTool request like this:

{
  "server_name": "aster",
  "tool_name": "time",
  "arguments": {}
}

To get the order book for BTCUSDT:

{
  "server_name": "aster",
  "tool_name": "depth",
  "arguments": {
    "symbol": "BTCUSDT",
    "limit": 10
  }
}

This MCP Server was proudly developed with the assistance of Questflow.