Skip to content

clawsteragent/aster-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aster-mcp

npm License: MIT

MCP server for Aster DEX perpetual futures trading.

Exposes Aster's Binance-compatible futures API as MCP tools — plug it into any MCP-compatible AI agent and trade perps through natural language.

Works with OpenClaw, Claude Desktop, Cursor, or any MCP client.


Quick Start

npx @clawster/aster-mcp

That's it. The server starts on stdio and exposes all tools. Market data works immediately — trading requires API credentials.

Installation

# Run directly (no install)
npx @clawster/aster-mcp

# Or install globally
npm install -g @clawster/aster-mcp

# Or as a project dependency
npm install @clawster/aster-mcp

Configuration

Environment Variables

Variable Required Description
ASTER_API_KEY For trading Your Aster DEX API key
ASTER_API_SECRET For trading Your Aster DEX API secret

Market data tools (prices, candles, order book, etc.) work without credentials. Trading tools (place orders, manage positions) require both ASTER_API_KEY and ASTER_API_SECRET.

Getting Your API Key

  1. Go to asterdex.com and connect your BSC wallet
  2. Navigate to API Management
  3. Click "ENABLE FUTURES"Save
  4. Copy your API Key and Secret immediately — the secret is shown only once

OpenClaw

Add to your OpenClaw config (openclaw config):

{
  "mcpServers": {
    "aster": {
      "command": "npx",
      "args": ["@clawster/aster-mcp"],
      "env": {
        "ASTER_API_KEY": "your-api-key",
        "ASTER_API_SECRET": "your-api-secret"
      }
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "aster": {
      "command": "npx",
      "args": ["@clawster/aster-mcp"],
      "env": {
        "ASTER_API_KEY": "your-api-key",
        "ASTER_API_SECRET": "your-api-secret"
      }
    }
  }
}

Cursor / Windsurf / Other MCP Clients

Same pattern — point the MCP client at npx @clawster/aster-mcp with the env vars above.


Tools

📊 Market Data (no auth required)

Tool Description Parameters
aster_ping Health check — verify API connectivity
aster_exchange_info All trading symbols, filters, rate limits symbol?
aster_price Current price for one or all symbols symbol?
aster_24hr_stats 24-hour rolling statistics symbol?
aster_klines Candlestick/kline data symbol, interval, limit?
aster_orderbook Order book depth symbol, limit?
aster_trades Recent trades symbol, limit?
aster_funding_rate Current and historical funding rates symbol, limit?
aster_open_interest Open interest for a symbol symbol

💹 Trading (auth required)

Tool Description Parameters
aster_account Account balances, positions, margin info
aster_open_orders List all open orders symbol?
aster_place_order Place an order (market, limit, stop, TP) symbol, side, type, quantity, price?, stopPrice?, ...
aster_cancel_order Cancel an open order symbol, orderId
aster_position_risk Detailed position info and PnL symbol?
aster_set_leverage Set leverage for a symbol (1-125x) symbol, leverage
aster_set_margin_type Set margin type symbol, marginType (CROSSED/ISOLATED)

Kline Intervals

1m 3m 5m 15m 30m 1h 2h 4h 6h 8h 12h 1d 3d 1w 1M


Examples

Once connected, your AI agent can do things like:

"What's the current BTC price on Aster?"
→ aster_price({ symbol: "BTCUSDT" })

"Show me 15-minute candles for ETH"
→ aster_klines({ symbol: "ETHUSDT", interval: "15m", limit: 100 })

"Open a long on BTC with 10x leverage"
→ aster_set_leverage({ symbol: "BTCUSDT", leverage: 10 })
→ aster_place_order({ symbol: "BTCUSDT", side: "BUY", type: "MARKET", quantity: 0.01 })

"How are my positions doing?"
→ aster_account()
→ aster_position_risk({ symbol: "BTCUSDT" })

API Details

Aster DEX uses a Binance Futures-compatible API.

  • Base URL: https://fapi.asterdex.com/fapi/v1
  • Auth: HMAC-SHA256 signed requests with X-MBX-APIKEY header
  • Rate limits: 2400 request weight/min, 1200 orders/min

All authentication is handled internally by the MCP server — your agent just calls the tools.


Part of CLAWSTER

This MCP server is part of the CLAWSTER ecosystem — autonomous perpetual futures trading for AI agents on Aster DEX.

  • CLAWSTER Skill — OpenClaw skill that turns your agent into an autonomous trader
  • aster-mcp (this repo) — MCP server for direct Aster DEX tool access

License

MIT

About

MCP server for Aster DEX perpetual futures trading. Use with OpenClaw, Claude Desktop, or any MCP-compatible AI agent.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors