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.
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.jsondi root β Command Palette βClaude: Start MCP Server. - JetBrains: taruh
mcp_servers.jsondi root atau.claude/β Tools β Claude β Start MCP Server. - Neovim: simpan
mcp_servers.jsondi~/.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)
- Install extension "Claude Code".
- Letakkan
mcp_servers.jsondi root proyek, contoh:{ "mcpServers": { "indodax": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/mcp-indodax", "run", "server.py" ] } } } - Buka Command Palette β
Claude: Start MCP Serverβ¦β pilihindodax.
JetBrains IDE (IntelliJ / PyCharm) + Plugin Claude Code
- Taruh
mcp_servers.jsondi direktori.claude/atau root proyek. - Tools β Claude β Start MCP Server β pilih
indodax.
Neovim (claude.nvim)
- Simpan
mcp_servers.jsondi$HOME/.config/claude/. - 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 bursapairs()β daftar pair tersediaprice_increments()β kelipatan harga tiap pairsummaries()β ringkasan market seluruh pairticker(pair_id="btcidr")β harga terkini satu pairticker_all()β harga seluruh pairtrades(pair_id="btcidr")β transaksi terakhir
Private (butuh API key)
get_info()β info akun & saldotrans_history(start=None, end=None)β histori transaksitrade(pair, type, price, idr=None, crypto=None)β buat order beli/jualwithdraw_coin(currency, amount, address, network=None, memo=None)β tarik kriptowithdraw_fee(currency, amount, address, network=None)β estimasi fee tarikopen_orders(pair=None)β lihat order aktifcancel_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 orderget_order(order_id)β detail order berdasarkan IDget_order_by_client_order_id(client_order_id)β detail order berdasarkan client IDprice_increments()β kelipatan harga (public tapi juga berguna)list_downline()β daftar referral (partner)check_downline(username)β cek apakah user downlinecreate_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 Rupiahethidr- Ethereum (ETH) ke Rupiahxrpidr- XRP ke Rupiahadaidr- Cardano (ADA) ke Rupiahbnbidr- Binance Coin (BNB) ke Rupiahdogeidr- 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
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.