Indodax MCP Server

Indodax MCP Server

Exposes Indodax's Private and Public REST APIs as MCP tools, enabling AI agents to manage cryptocurrency trading and account information. It supports tasks like checking market prices, viewing account balances, and executing or canceling buy and sell orders.

Category
Visit Server

README

Indodax MCP Server πŸš€

Expose semua Private REST API Indodax sebagai MCP tools (bisa dipakai Claude Code atau agen AI lain). Fokus: cepat dipakai, mudah dipahami.


1. Persiapan Cepat

# clone & masuk repo
git clone https://github.com/adhinugroho1711/mcp-indodax.git
cd mcp-indodax

# (opsional) buat virtual-env
python -m venv .venv && source .venv/bin/activate

# install paket
pip install -r requirements.txt

2. Isi Kredensial

Buat .env (file ini tidak akan ke-push):

INDODAX_API_KEY=YOUR_API_KEY
INDODAX_API_SECRET=YOUR_SECRET

3. Jalankan

python server.py              # mode stdio (default MCP)
# atau HTTP:
uvicorn server:mcp.app --reload

4. Contoh Pakai Tool

from server import get_info, trade
import asyncio, json

async def demo():
    print(json.dumps(await get_info(), indent=2))
    # order beli BTC 50k IDR
    # await trade("btc_idr", "buy", price=500000000, idr=50000)
asyncio.run(demo())

5. Integrasi Editor (Claude Code)

  • VS Code: letakkan mcp_servers.json di root ➜ Command Palette ➜ Claude: Start MCP Server.
  • JetBrains: taruh mcp_servers.json di root atau .claude/ ➜ Tools ➜ Claude ➜ Start MCP Server.
  • Neovim: simpan mcp_servers.json di ~/.config/claude/ ➜ :ClaudeStartServer indodax.

Contoh mcp_servers.json:

{
  "mcpServers": {
    "indodax": {
      "command": "uv",
      "args": ["--directory", "/ABSOLUTE/PATH/TO/mcp-indodax", "run", "server.py"]
    }
  }
}

Struktur Singkat

server.py          # semua MCP tools
requirements.txt   # dependensi
mcp_servers.json   # config runner (contoh)

Integrasi Editor / Claude Code

Berikut cara mendaftarkan MCP server di beberapa editor / plugin umum. Pastikan mcp_servers.json Anda sudah berisi path absolut proyek.

VS Code (Claude Code Extension)

  1. Install extension "Claude Code".
  2. Letakkan mcp_servers.json di root proyek, contoh:
    {
      "mcpServers": {
        "indodax": {
          "command": "uv",
          "args": [
            "--directory",
            "/ABSOLUTE/PATH/TO/mcp-indodax",
            "run",
            "server.py"
          ]
        }
      }
    }
    
  3. Buka Command Palette β†’ Claude: Start MCP Server… β†’ pilih indodax.

JetBrains IDE (IntelliJ / PyCharm) + Plugin Claude Code

  1. Taruh mcp_servers.json di direktori .claude/ atau root proyek.
  2. Tools β†’ Claude β†’ Start MCP Server β†’ pilih indodax.

Neovim (claude.nvim)

  1. Simpan mcp_servers.json di $HOME/.config/claude/.
  2. Jalankan :ClaudeStartServer indodax.

CLI Langsung

uv --directory /ABSOLUTE/PATH/TO/mcp-indodax run server.py   # atau python server.py

Contoh Pemanggilan Alat

1. Mengecek Harga Kripto

import asyncio
from server import ticker, ticker_all

async def check_prices():
    # Dapatkan semua ticker yang tersedia
    all_tickers = await ticker_all()
    
    # Dapatkan harga BTC/IDR
    btc_price = await ticker("btcidr")
    print(f"Harga BTC/IDR: {int(btc_price['last']):,}")
    
    # Dapatkan harga XRP/IDR
    xrp_price = await ticker("xrpidr")
    print(f"Harga XRP/IDR: {int(xrp_price['last']):,}")

asyncio.run(check_prices())

2. Mengecek Saldo dan Membuat Order

import asyncio, json
from server import get_info, trade

async def main():
    # Dapatkan info akun
    info = await get_info()
    print("Saldo IDR:", info['return']['balance']['idr'])
    
    # Contoh order beli BTC senilai 50.000 IDR
    # res = await trade("btc_idr", "buy", price=500000000, idr=50000)
    # print(json.dumps(res, indent=2))

asyncio.run(main())

Cara Melakukan Trading

Daftar Perintah Trading

Perintah Deskripsi Contoh Penggunaan
ticker("btcidr") Melihat harga BTC/IDR terkini python\nfrom server import ticker\nimport asyncio\n\nasync def main():\n price = await ticker("btcidr")\n print(f"Harga BTC: {int(price['last']):,} IDR")\n\nasyncio.run(main())\n
trade("btcidr", "buy", idr=50000, price=500000000) Membeli kripto dengan IDR python\nfrom server import trade\n\nasync def beli_btc():\n await trade("btcidr", "buy", idr=50000, price=500000000)\n
trade("xrpidr", "sell", xrp=100, price=40000) Menjual kripto python\nfrom server import trade\n\nasync def jual_xrp():\n await trade("xrpidr", "sell", xrp=100, price=40000)\n
open_orders() Melihat daftar order aktif python\nfrom server import open_orders\n\nasync def cek_order():\n orders = await open_orders()\n print(orders)\n
cancel_order(order_id=12345) Membatalkan order python\nfrom server import cancel_order\n\nasync def batal_order():\n await cancel_order(order_id=12345)\n

1. Membuat Order Beli/Jual

import asyncio
from server import trade, get_info

async def place_order():
    # Dapatkan info akun terlebih dahulu
    info = await get_info()
    print("Saldo IDR:", info['return']['balance']['idr'])
    
    # Contoh order beli BTC senilai 50.000 IDR
    buy_order = await trade(
        pair="btcidr",       # pair yang akan ditradingkan
        type="buy",          # 'buy' atau 'sell'
        price=500000000,     # harga per unit (dalam satuan terkecil)
        idr=50000,          # jumlah IDR yang akan dibelanjakan
        # atau gunakan parameter crypto untuk menentukan jumlah koin
        # btc=0.001         # jumlah koin yang akan dibeli/dijual
    )
    print("Order Response:", buy_order)

asyncio.run(place_order())

2. Membatalkan Order

import asyncio
from server import cancel_order, open_orders

async def cancel_existing_order():
    # Dapatkan daftar order terbuka
    orders = await open_orders()
    
    if 'btc_idr' in orders and orders['btc_idr']:
        # Batalkan order pertama yang ditemukan
        order_id = orders['btc_idr'][0]['order_id']
        result = await cancel_order(order_id=order_id)
        print(f"Order {order_id} dibatalkan:", result)

asyncio.run(cancel_existing_order())

2. Contoh Lengkap Trading

import asyncio
from server import ticker, trade, open_orders, cancel_order

async def trading_bot():
    # 1. Cek harga BTC/IDR
    btc = await ticker("btcidr")
    print(f"Harga BTC: {int(btc['last']):,} IDR")
    
    # 2. Buat order beli jika harga di bawah 500 juta
    if btc['last'] < 500000000:
        print("Harga menarik, membeli...")
        order = await trade(
            pair="btcidr",
            type="buy",
            price=btc['last'],
            idr=100000  # Beli senilai 100 ribu IDR
        )
        print("Order berhasil:", order)
    
    # 3. Cek order aktif
    print("\nOrder aktif:")
    orders = await open_orders()
    for pair, order_list in orders.items():
        for order in order_list:
            print(f"- {pair}: {order['type']} {order['order_btc']} BTC @ {int(order['price']):,}")

# Jalankan bot
try:
    asyncio.run(trading_bot())
except Exception as e:
    print("Error:", e)

3. Memeriksa Order yang Aktif

import asyncio
from server import open_orders

async def check_orders():
    orders = await open_orders()
    for pair, order_list in orders.items():
        if order_list:
            print(f"\nOrder aktif untuk {pair}:")
            for order in order_list:
                print(f"- ID: {order['order_id']}")
                print(f"  Tipe: {order['type']}")
                print(f"  Harga: {int(order['price']):,} IDR")
                print(f"  Jumlah: {order.get('order_btc', order.get('order_eth', 'N/A'))}")

asyncio.run(check_orders())

Daftar Lengkap MCP Tools

Gunakan nama fungsi berikut saat memanggil dari kode atau editor (Claude Code, dsb).

Public (tanpa autentikasi)

  • server_time() – waktu server bursa
  • pairs() – daftar pair tersedia
  • price_increments() – kelipatan harga tiap pair
  • summaries() – ringkasan market seluruh pair
  • ticker(pair_id="btcidr") – harga terkini satu pair
  • ticker_all() – harga seluruh pair
  • trades(pair_id="btcidr") – transaksi terakhir

Private (butuh API key)

  • get_info() – info akun & saldo
  • trans_history(start=None, end=None) – histori transaksi
  • trade(pair, type, price, idr=None, crypto=None) – buat order beli/jual
  • withdraw_coin(currency, amount, address, network=None, memo=None) – tarik kripto
  • withdraw_fee(currency, amount, address, network=None) – estimasi fee tarik
  • open_orders(pair=None) – lihat order aktif
  • cancel_order(order_id) – batalkan order (ID numerik)
  • cancel_by_client_order_id(client_order_id) – batalkan order (client ID)
  • order_history(pair=None, count=100, from_id=None, end_id=None, order="desc") – histori order
  • get_order(order_id) – detail order berdasarkan ID
  • get_order_by_client_order_id(client_order_id) – detail order berdasarkan client ID
  • price_increments() – kelipatan harga (public tapi juga berguna)
  • list_downline() – daftar referral (partner)
  • check_downline(username) – cek apakah user downline
  • create_voucher(amount, description=None) – buat voucher (partner)

Daftar Pair ID yang Tersedia

Berikut adalah beberapa contoh pair ID yang bisa digunakan:

  • btcidr - Bitcoin (BTC) ke Rupiah
  • ethidr - Ethereum (ETH) ke Rupiah
  • xrpidr - XRP ke Rupiah
  • adaidr - Cardano (ADA) ke Rupiah
  • bnbidr - Binance Coin (BNB) ke Rupiah
  • dogeidr - Dogecoin (DOGE) ke Rupiah

Struktur Proyek

β”œβ”€β”€ server.py          # Implementasi MCP tools
β”œβ”€β”€ requirements.txt   # Dependensi Python
β”œβ”€β”€ mcp_servers.json   # Contoh konfigurasi runner MCP
β”œβ”€β”€ .gitignore         # Mengabaikan file sensitif & artefak
└── README.md          # Dokumentasi ini

Lisensi

MIT Β© 2025 Prihanantho Adhi Nugroho

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured