idx-market-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@idx-market-mcp Check the orderbook and bandarmology for TLKM"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
IDX Market MCP (idx-market-mcp)
Institutional-grade Model Context Protocol (MCP) server for Indonesian Stock Exchange (IDX) equities.
idx-market-mcp bridges AI agents (Claude Desktop, Cursor, Hermes Agent) to the Indonesian capital markets. It combines public market telemetry, real-time Level 2 orderbook depth, institutional bandarmology (broker accumulation/distribution), automated chart pattern recognition, and quantitative risk budgeting into a single, token-efficient Python server.
š Key Capabilities
Unified Multi-Action Gateway (
idx_stockbit):Access orderbook depth, broker summaries, audited financials, corporate action dividends, and insider disclosures through a single tool schema (~150 input tokens), eliminating tool-definition bloat across conversation turns.
Institutional Bandarmology:
Real-time foreign net flows and broker summary breakdown (Top-1, Top-3, Top-5 broker accumulation/distribution status).
Full Level 2 Orderbook Depth:
10 Bid & 10 Ask depth ladder with lot volume and institutional support/resistance wall detection.
Algorithmic Chart Pattern Recognition:
Mathematical detection of local extrema (
scipy.signal.argrelextrema) and trendline regression to identify triangles, channels, and coils, complete with Bulkowski breakout probabilities and auto-generated candlestick charts (mplfinance).
Defensive Financial Sanitization:
Automatic currency mismatch normalization for USD-reporting issuers (
KRAS,AMMN,MEDC,ADRO), thin-equity ROE clamping, and solvency violation locks ($\text{DER} > 1.5\times$).
Quantitative Risk Budgeting & Two-Tranche Orders:
Anti-cluster sector concentration ceilings (max 50% per sector) and mathematical 2-tranche limit order calculators ready for retail broker execution (e.g. Ajaib, Stockbit).
Related MCP server: Baguskto Saham
šļø Architecture
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā AI Agent / Client ā
ā (Claude Desktop, Cursor, Hermes Agent, LLM) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Model Context Protocol (JSON-RPC / stdio)
āāāāāāāāāāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā idx-market-mcp ā
ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā Unified Gateway ā ā Quantitative Guards ā ā
ā ā (idx_stockbit) ā ā (Sanitize/Sector/Lot) ā ā
ā āāāāāāāāāāāāā¬āāāāāāāāāāāā āāāāāāāāāāāāā¬āāāāāāāāāāāā ā
ā ā ā ā
ā āāāāāāāāāāāāā¼āāāāāāāāāāāā āāāāāāāāāāāāā¼āāāāāāāāāāāā ā
ā ā Pattern Recognition ā ā Free Quote Fallback ā ā
ā ā (scipy + mplfinance) ā ā (Yahoo Finance .JK) ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāā
ā Session Bearer Token ā Public OHLCV
āāāāāāāāāāāāāāāā¼āāāāāāāāāāāā āāāāāāāāāāāāā¼āāāāāāāāāāāāāā
ā Stockbit Exodus API ā ā Yahoo Finance Charts ā
ā (Orderbook L2 / Bandar) ā ā (.JK Tickers) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāš ļø Tool Catalog (11 Active Tools)
Tool Name | Type | Description |
| Gateway | Single unified action tool: |
| Market L2 | 10-level Bid & Ask ladder, total queue lots, ARA/ARB thresholds. |
| Flow | Broker summary, institutional flow in IDR, Top 1/3/5 broker actions. |
| Fundamental | Audited IDR balance sheet, Piotroski F-Score (1-9), DER, ROE, CFO, DPR. |
| Corp Action | Historical and upcoming dividend calendar (cum, ex, payment dates, IDR value). |
| Corporate | Major shareholder and director/commissioner transaction disclosures. |
| Technical | Algorithmic pattern detection, regression slopes, and annotated PNG chart rendering. |
| Price Feed | Real-time quote, intraday range, volume in shares and lots. |
| Risk Guard | Normalizes USD reporting mismatches, thin-equity ROE distortions, and leverage traps. |
| Risk Guard | Enforces 50% single-sector portfolio ceiling (e.g. anti-cluster bank guard). |
| Execution | Computes disciplined 2-tranche limit orders (Tranche 1 immediate + Tranche 2 reserve). |
š Quickstart
1. Installation
Clone and install dependencies via pip or uv:
git clone https://github.com/mpandudc/idx-market-mcp.git
cd idx-market-mcp
# Using uv (recommended)
uv venv
source .venv/bin/activate
uv pip install -e .
# Or using standard pip
pip install -e .2. Authentication (Optional for Deep Data)
Basic market quotes, sector concentration checks, and chart pattern recognition work without credentials (using public feeds).
To unlock Level 2 Orderbook depth, Bandarmology, and audited Keystats, provide a Stockbit Bearer token via environment variable:
export STOCKBIT_BEARER_TOKEN="eyJhbGciOiJSUzI1NiIs..."(Token can be obtained once from your browser DevTools Authorization: Bearer header on stockbit.com).
š Client Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"idx-market": {
"command": "python",
"args": ["-m", "idx_market_data_mcp.server"],
"env": {
"STOCKBIT_BEARER_TOKEN": "YOUR_BEARER_TOKEN_HERE"
}
}
}
}Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"idx-market": {
"command": "python",
"args": ["-m", "idx_market_data_mcp.server"],
"env": {
"STOCKBIT_BEARER_TOKEN": "YOUR_BEARER_TOKEN_HERE"
}
}
}
}Hermes Agent (~/.hermes/config.yaml)
mcp_servers:
idx_market:
command: /path/to/idx-market-mcp/.venv/bin/python
args:
- -m
- idx_market_data_mcp.server
enabled: true
env:
STOCKBIT_BEARER_TOKEN: "YOUR_BEARER_TOKEN_HERE"š Example Prompts
"Cek orderbook dan bandarmology saham MYOR hari ini"
"Analisis chart pattern SMSM pada timeframe 1d dan render gambarnya"
"Hitung tiket limit order 2-tranche untuk alokasi Rp 12.000.000 di saham BBCA"
"Audit portofolio saya: apakah boleh menambah BBNI jika sudah memegang BBCA, BMRI, dan BBRI?"
āļø Disclaimer
This software is developed strictly for educational, academic, and quantitative research purposes. It is not affiliated with, endorsed by, or sponsored by PT Bursa Efek Indonesia (IDX) or PT Stockbit Sekuritas Digital. Automated data access may be subject to the terms of service of upstream providers. Use responsibly on your own personal accounts.
š License
MIT License ā Copyright (c) 2026 Muhammad Pandu Dwi Cahyo.
Available Tools
11 toolsidx_analyze_chart_patternIdx Analyze Chart PatternA
Algorithmically analyze chart patterns (triangles, channels, support/resistance) and generate an annotated candlestick chart image.
Inputs: ticker (required), period, timeframe. Returns: object
idx_calc_tranche_ordersIdx Calc Tranche OrdersA
Calculate mathematically disciplined 2-tranche limit orders and lot allocations for an IDX stock.
Inputs: ticker (required), budget_idr (required), current_price (required), support_level, +1 more. Returns: object
idx_check_sector_concentrationIdx Check Sector ConcentrationA
Audit portfolio sector weights against the 50% single-sector concentration ceiling before adding new stock.
Inputs: holdings (required), candidate_sector (required), candidate_ticker (required). Returns: object
idx_get_bandarmologyIdx Get BandarmologyA
Fetch broker summary, institutional accumulation/distribution status, and big player flows from Stockbit API.
Inputs: ticker (required). Returns: object
idx_get_dividendsIdx Get DividendsA
Fetch official corporate action dividend calendar and payment history from Stockbit.
Inputs: ticker (required). Returns: object
idx_get_insider_activityIdx Get Insider ActivityA
Fetch official insider disclosures (major shareholders, directors, commissioners trading) from Stockbit.
Inputs: ticker (required), limit. Returns: object
idx_get_keystatsIdx Get KeystatsA
Fetch official audited financial ratios, balance sheet, valuation, and Piotroski F-score from Stockbit.
Inputs: ticker (required). Returns: object
idx_get_market_quoteIdx Get Market QuoteA
Fetch live market quote, price, volume, and intraday range for an Indonesian stock (.JK).
Inputs: ticker (required). Returns: object
idx_get_orderbookIdx Get OrderbookA
Fetch live 10-level Level 2 Orderbook depth, bid/ask queues, and order imbalance from Stockbit API.
Inputs: ticker (required). Returns: object
idx_sanitize_financialsIdx Sanitize FinancialsA
Sanitize financial metrics against USD denomination mismatches, thin-equity ROE distortions, and solvency traps.
Inputs: der (required), pbv (required), ticker (required), roe_pct (required), +2 more. Returns: object
idx_stockbitIdx StockbitB
Unified single-entry gateway for all Stockbit intelligence endpoints.
Inputs: action (required), ticker (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 11 tools
Most tools target distinct resources, but idx_stockbit is a unified gateway for 'all Stockbit intelligence endpoints,' making it unclear when to call it versus the individual idx_get_orderbook, idx_get_keystats, idx_get_dividends, and idx_get_insider_activity tools. This overlap creates real selection ambiguity for agents.
The naming pattern is largely consistent: idx_ + verb + noun, with clear get_, analyze_, sanitize_, check_, and calc_ prefixes. The main deviation is idx_stockbit, which uses a noun-only name and breaks the verb_noun convention.
11 tools is a reasonable size for an IDX market intelligence server and covers the core analysis workflow without being bloated. However, idx_stockbit makes the set slightly redundant since it duplicates the coverage of several getters, so a leaner set could have achieved the same scope.
The server covers a broad IDX workflow: market data, chart patterns, financials validation, sector concentration, order calculation, broker flows, dividends, and insider activity. Minor gaps exist around stock screening, company profiles, and news, but they don't create dead ends for the apparent purpose.
Related MCP Connectors
Live crypto + IDX stock market intelligence for AI agents ā 19 tools, no API key.
Indonesian data for agents: news, jobs, IDX stocks and World Bank macro.
Data saham Indonesia (IDX) untuk AI: harga, teknikal, screener, deteksi bandar, sektor, earnings.
Indonesia Stock Exchange data: listed companies, shareholders, boards and daily trading.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time Indonesian stock market (IDX) data including prices, technical indicators, fundamental analysis, and trading signals optimized for the Indonesian market through the Model Context Protocol.7MIT
- AlicenseAqualityDmaintenanceEnables access to Indonesian Stock Exchange (IDX) data with comprehensive historical data from 2019-2025 for 958 stocks, including real-time market overview, technical analysis, sector performance, and stock comparison capabilities.943MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to access Indonesian stock market data, including real-time quotes, historical data from 2019, and technical analysis for 958 IDX-listed stocks.950 npmMIT
- FlicenseNot gradedqualityDmaintenanceProvides Indonesian stock (IDX) analysis tools for Claude Code, enabling real-time stock data, technical and fundamental analysis, and buy/sell recommendations.4-