Aster Finance MCP Server
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.
Install Dependencies & Build:
You can use either
npm
orpnpm
to install the project dependencies and build the server.Using npm:
npm install npm run buildOr using pnpm:
pnpm install pnpm run buildConfigure 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 actualASTER_API_KEY
andASTER_API_SECRET
.
Available Tools
The server exposes the following tools, categorized by function:
Market Data Endpoints
Tool Name | Description |
| Test connectivity to the Rest API. |
| Get the current server time. |
| Get current exchange trading rules and symbol info. |
| Get the order book for a symbol. |
| Get recent market trades. |
| Get older market historical trades. |
| Get compressed, aggregate market trades. |
| Get Kline/candlestick bars for a symbol. |
| Get Kline/candlestick bars for the index price. |
| Get Kline/candlestick bars for the mark price. |
| Get Mark Price and Funding Rate. |
| Get funding rate history. |
| Get funding rate configuration. |
| 24-hour rolling window price change statistics. |
| Get the latest price for a symbol or symbols. |
| Get the best price/qty on the order book. |
Account & Trade Endpoints
Tool Name | Description |
| Change user's position mode (Hedge vs. One-way). |
| Get user's current position mode. |
| Change user's Multi-Assets mode. |
| Get user's current Multi-Assets mode. |
| Send in a new order. |
| Place multiple orders at once. |
| Transfer assets between futures and spot accounts. |
| Check an order's status. |
| Cancel an active order. |
| Cancel all open orders on a symbol. |
| Cancel multiple orders. |
| Auto-cancel all open orders after a countdown. |
| Query a specific open order. |
| Get all open orders on a symbol. |
| Get all account orders (active, canceled, or filled). |
| Get futures account balance. |
| Get current account information. |
| Change initial leverage for a symbol. |
| Change margin type (ISOLATED/CROSSED). |
| Modify isolated position margin. |
| Get position margin change history. |
| Get current position information. |
| Get trades for a specific account and symbol. |
| Get income history. |
| Get notional and leverage brackets. |
| Get Position ADL Quantile Estimation. |
| Get user's force orders (liquidations/ADL). |
| Get 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:
To get the order book for BTCUSDT:
This MCP Server was proudly developed with the assistance of Questflow.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
Enables AI agents to interact with the Aster Finance Futures API for cryptocurrency trading. Provides comprehensive access to market data, order management, account information, and position management on the Aster exchange.