idx-stock-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-stock-mcpbandingkan performa BBCA, BBRI, dan TLKM setahun terakhir"
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-stock-mcp
MCP server agar Claude bisa membaca harga saham Bursa Efek Indonesia (IDX/BEI), membandingkan performa saham, dan menghitung nilai portofolio pribadi Anda langsung dari percakapan.
β οΈ Server ini hanya membaca data. Tidak ada fitur beli/jual dan tidak terhubung ke akun sekuritas mana pun (Bibit, Stockbit, Ajaib, dll). Data untuk informasi, bukan rekomendasi investasi.
π§ͺ Status: parser data diuji dengan 53 test offline (data tiruan berformat respons Yahoo Finance) dan keempat tool sudah diverifikasi dengan data live BEI pada 19 Okt 2026 (harga, perubahan harian, dividen, dan total return cocok dengan respons mentah Yahoo). Jika menemukan angka yang berbeda dengan aplikasi sekuritas Anda, mohon laporkan.
Daftar isi
Related MCP server: Baguskto Saham
Fitur
Tool | Fungsi |
| Harga terakhir, perubahan harian, rentang 52 minggu, dan harga per lot (100 lembar), lengkap dengan status pasar (buka/tutup) dan waktu data dalam WIB. |
| Riwayat harga (OHLC + volume) dengan return harga saja dan total return termasuk dividen, daftar dividen & stock split, tertinggi, terendah, dan max drawdown. |
| Bandingkan 2β10 saham/indeks pada rentang waktu yang sama, diurutkan berdasarkan total return (atau return harga jika data dividen tidak lengkap). |
| Hitung nilai portofolio Anda: untung/rugi per saham dan total, estimasi hasil bersih setelah fee jual, serta peringatan jika data tidak lengkap, ada stock split, atau nilai reksa dana sudah lama tidak diperbarui. |
Prinsipnya: lebih baik memberi peringatan daripada angka yang terlihat valid padahal tidak.
Kode saham bisa ditulis BBCA, bbca, atau BBCA.JK. Untuk indeks gunakan IHSG.
Cara pakai (langkah demi langkah)
1. Persiapan
Node.js 20 atau lebih baru. Cek dengan
node -v. Download di https://nodejs.org.Git, hanya jika memilih instalasi dari source.
Claude Desktop atau Claude Code di komputer Anda.
2. Download & build
Opsi cepat (disarankan): tanpa download. Paket tersedia di npm, jadi Claude
bisa menjalankannya langsung lewat npx. Lewati langkah ini, lanjut ke langkah 3, dan di langkah 4 pakai konfigurasi npx.
Saat pertama dipanggil, npx mengunduh paket (butuh internet, beberapa detik); setelah itu memakai cache.
Opsi dari source, jika ingin mengubah kode atau menjalankan test:
git clone https://github.com/Zalfrie/idx-stock-mcp.git
cd idx-stock-mcp
npm install
npm run buildOpsional, pastikan semuanya berjalan:
npm test # menjalankan unit test (tanpa internet)
npm run inspect # membuka MCP Inspector di browser untuk mencoba tools dengan data liveDi MCP Inspector, klik Connect β tab Tools β pilih get_quote β isi ticker dengan BBCA β Run Tool. Kalau harga muncul, server siap dipakai.
3. Siapkan file portofolio (opsional)
Lewati langkah ini jika Anda hanya ingin melihat harga saham.
Buat file portfolio.json di folder mana saja (mis. folder home Anda) dengan isi seperti
portfolio.example.json, lalu sesuaikan dengan kepemilikan Anda (lihat format lengkapnya).
Jika memakai opsi dari source: cp portfolio.example.json portfolio.json di dalam folder repo; file ini sudah masuk .gitignore.
Dua field yang sering terlewat:
buyDate(YYYY-MM-DD) di setiap saham. Dipakai untuk mendeteksi stock split setelah Anda membeli. Tanpa field ini, Anda akan mendapat peringatan setiap kali melihat portofolio.updatedAt(YYYY-MM-DD) di setiap asetmanual(mis. reksa dana). Perbarui setiap kali Anda mengubahcurrentValue. Jika lebih dari 7 hari (atau kosong), nilai tersebut ditandai usang.
Catat path lengkap file portfolio.json, karena dibutuhkan di langkah berikutnya.
4. Hubungkan ke Claude
Opsi A β Claude Desktop
Buka Claude Desktop β Settings β Developer β Edit Config. Ini membuka file
claude_desktop_config.json:macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Tambahkan konfigurasi berikut (ganti path
portfolio.jsonsesuai lokasi file Anda; hapus bagianenvjika tidak memakai portofolio):Opsi cepat (npx) β macOS / Linux
{ "mcpServers": { "idx-stock": { "command": "npx", "args": ["-y", "idx-stock-mcp"], "env": { "IDX_PORTFOLIO_PATH": "/Users/nama/portfolio.json" } } } }Opsi cepat (npx) β Windows (Claude Desktop di Windows lebih andal memanggil
npxlewatcmd){ "mcpServers": { "idx-stock": { "command": "cmd", "args": ["/c", "npx", "-y", "idx-stock-mcp"], "env": { "IDX_PORTFOLIO_PATH": "C:\Users\nama\portfolio.json" } } } }Opsi dari source β macOS / Linux
{ "mcpServers": { "idx-stock": { "command": "node", "args": ["/Users/nama/idx-stock-mcp/dist/index.js"], "env": { "IDX_PORTFOLIO_PATH": "/Users/nama/idx-stock-mcp/portfolio.json" } } } }Opsi dari source β Windows (gunakan
\\pada path){ "mcpServers": { "idx-stock": { "command": "node", "args": ["C:\\Users\\nama\\idx-stock-mcp\\dist\\index.js"], "env": { "IDX_PORTFOLIO_PATH": "C:\\Users\\nama\\idx-stock-mcp\\portfolio.json" } } } }Jika file config sudah berisi server lain, tambahkan
"idx-stock": {...}di dalammcpServersyang sudah ada.Tutup Claude Desktop sepenuhnya (quit, bukan hanya menutup jendela), lalu buka lagi.
Di kotak chat, klik ikon tools/connector.
idx-stockdengan 4 tools harus muncul di sana.
Opsi B β Claude Code
Opsi cepat (npx):
claude mcp add idx-stock -e IDX_PORTFOLIO_PATH=/path/lengkap/portfolio.json -- npx -y idx-stock-mcpOpsi dari source:
claude mcp add idx-stock \
-e IDX_PORTFOLIO_PATH=/path/lengkap/idx-stock-mcp/portfolio.json \
-- node /path/lengkap/idx-stock-mcp/dist/index.jsCek dengan claude mcp list, atau ketik /mcp di dalam sesi Claude Code.
Pastikan sudah terhubung dengan benar
Buka chat baru dan tanyakan:
Berapa harga BBCA sekarang?
Jawaban yang benar menyebut harga, waktu data dalam WIB, dan status pasar (buka/tutup). Contohnya: "...per Sen, 19 Okt 2026 16:00 WIB, pasar sedang tutup". Jika Claude menjawab tanpa memanggil tool get_quote, atau tidak menyebut waktu data, kemungkinan server belum terhubung. Lihat Troubleshooting.
5. Mulai bertanya
Cukup bertanya dengan bahasa biasa, dan Claude akan memanggil tool yang sesuai.
Anda bertanya | Tool yang dipakai |
"Berapa harga BBCA sekarang? 1 lotnya berapa?" |
|
"Bagaimana kondisi IHSG hari ini?" |
|
"Pasar sudah buka belum? Harga BBRI ini data jam berapa?" |
|
"Tunjukkan pergerakan TLKM 1 tahun terakhir, turunnya paling dalam berapa persen?" |
|
"Berapa total return BBRI setahun terakhir termasuk dividen? Dividennya berapa per lembar?" |
|
"Bandingkan BBCA, BBRI, BMRI, dan IHSG selama 6 bulan." |
|
"Bank mana yang paling tahan banting tahun ini?" |
|
"Berapa nilai portofolio saya hari ini? Untung atau rugi?" |
|
"Kalau semua saham saya jual sekarang, dapat bersih berapa?" |
|
"Ada peringatan apa di portofolio saya?" |
|
"Berapa dividen yang sudah saya terima dari BBCA? Untung yang sudah terealisasi berapa?" |
|
Tips:
Sebutkan rentang waktu kalau perlu:
1mo,3mo,6mo,1y,2y,5y,ytd,max.Setelah membeli atau menjual saham, tambahkan satu baris di
transactions(atau updateholdings). Server membaca file ini setiap kali dipanggil, jadi tidak perlu restart.Dengan
transactions, Anda bisa bertanya "sudah dapat dividen berapa dari BBCA?" atau "total untung saya termasuk yang sudah dijual dan dividen berapa?" (totals.totalReturn).Untuk reksa dana Bibit, update nilai
currentValuedanupdatedAtdi bagianmanualsesekali, misalnya seminggu sekali, sesuai angka di aplikasi.Untuk membandingkan saham yang rutin membagi dividen (mis. saham bank), minta Claude memakai total return, bukan hanya perubahan harga.
Jika Claude menyebut "Total TIDAK LENGKAP", ada saham yang harganya gagal diambil dan tidak ikut dihitung. Coba lagi beberapa saat kemudian.
Format file portofolio
Ada dua cara mencatat saham, dan keduanya bisa dipakai bersamaan untuk ticker yang berbeda:
transactions(disarankan): catat setiap beli dan jual. Server menghitung sendiri posisi, harga rata-rata, untung/rugi yang sudah terealisasi, dan dividen yang Anda terima.holdings: cukup tulis posisi saat ini (lot + harga rata-rata). Cocok kalau tidak ingin mencatat riwayat, tetapi tanpa realized profit dan dividen.
Satu ticker tidak boleh ada di keduanya.
{
"buyFeePct": 0.15,
"sellFeePct": 0.25,
"transactions": [
{ "ticker": "BBCA", "type": "buy", "date": "2026-07-20", "lots": 1, "price": 6500, "note": "beli pertama" },
{ "ticker": "BBCA", "type": "buy", "date": "2026-08-20", "lots": 1, "price": 6100 },
{ "ticker": "BBCA", "type": "sell", "date": "2026-10-01", "lots": 1, "price": 6300, "fee": 1575 }
],
"holdings": [
{ "ticker": "BBRI", "lots": 2, "avgPrice": 3500, "buyDate": "2026-10-20" }
],
"manual": [
{ "name": "Reksa dana indeks IDX30 (Bibit)", "invested": 500000, "currentValue": 512000, "updatedAt": "2026-10-19" }
]
}Field | Keterangan |
| Fee beli dalam persen (default |
| Fee jual dalam persen, termasuk pajak penjualan (default |
| Setelah berapa hari nilai aset |
| Kode saham BEI, mis. |
|
|
| Tanggal transaksi |
| Jumlah lot (1 lot = 100 lembar). |
| Harga eksekusi per lembar, sebelum fee. |
| Fee absolut dalam rupiah (opsional). Jika diisi, menggantikan |
| Catatan bebas (opsional). |
| Kode saham BEI, mis. |
| Jumlah lot (1 lot = 100 lembar). |
| Harga rata-rata beli per lembar. Fee beli tidak dihitung terpisah; masukkan ke |
| Tanggal beli |
| Catatan bebas (opsional). |
| Aset yang tidak diperdagangkan di bursa, mis. reksa dana. |
Cara server menghitung transactions (metode harga rata-rata, sama seperti tampilan aplikasi sekuritas di Indonesia):
Beli: modal bertambah
lot Γ 100 Γ price + fee. Harga rata-rata = modal Γ· lembar.Jual:
realizedPnlbertambahlot Γ 100 Γ price β fee β (lot Γ 100 Γ harga rata-rata saat itu). Modal berkurang sebesar harga rata-rata Γ lembar yang dijual.Menjual lebih banyak dari yang dimiliki pada tanggal itu adalah error, bukan angka tebakan.
Posisi yang sudah habis dijual tetap dilaporkan di
closed[]dengan realized profit dan dividennya.Dividen diterima dihitung dari ex-date yang dilaporkan Yahoo: lembar yang Anda pegang berdasarkan transaksi sebelum ex-date Γ dividen per lembar. Beli tepat di ex-date tidak dapat dividen; jual tepat di ex-date masih dapat. Nilainya bruto, belum dipotong pajak dividen (umumnya 10% final untuk individu). Dividen yang jadwalnya belum masuk data Yahoo tidak terhitung.
Kalau saham Anda melakukan stock split, misalnya 1 lembar menjadi 5 (5:1), jumlah lot dan harga di file portofolio tidak berubah otomatis. Untuk holdings: sesuaikan lots Γ 5 dan avgPrice Γ· 5. Untuk transactions: sesuaikan lots Γ 5 dan price Γ· 5 pada transaksi sebelum tanggal split. Server akan memberi peringatan jika mendeteksi split setelah tanggal beli.
Menghitung avgPrice jika membeli beberapa kali (hanya perlu untuk holdings; dengan transactions server menghitungnya sendiri):
avgPrice = total uang yang dikeluarkan / total lembarContoh: beli 1 lot BBCA di Rp4.820 lalu 1 lot lagi di Rp5.200 β (482.000 + 520.000) / 200 = Rp5.010 dengan lots: 2.
Referensi tools
get_quote
Parameter | Tipe | Contoh |
| string |
|
Mengembalikan: price, previousClose (+ previousCloseSource), change, changePct, dayHigh, dayLow, fiftyTwoWeekHigh, fiftyTwoWeekLow, pricePerLot (null untuk indeks seperti IHSG, karena indeks tidak diperdagangkan per lot), serta info kesegaran data:
Field | Arti |
|
|
| Waktu harga terakhir dalam WIB, mis. |
| Umur data dalam menit. |
| Kalimat penjelasan yang disampaikan Claude ke pengguna. Saat jeda siang BEI (SenβKam 12:00β13:30, Jum 11:30β14:00 WIB, sesuai jam perdagangan resmi BEI) |
get_history
Parameter | Tipe | Default | Pilihan |
| string | β |
|
| string |
|
|
| string |
|
|
Mengembalikan summary dan candles (maks. 300 terakhir; untuk rentang panjang gunakan 1wk atau 1mo). Isi summary:
Field | Arti |
| Perubahan harga saja, tanpa dividen. |
| Perubahan harga + dividen, dari harga yang disesuaikan. |
| Dividen per lembar yang dibagikan dalam rentang. |
| Stock split dalam rentang. |
| Tertinggi, terendah, penurunan terdalam dari puncak (berbasis harga disesuaikan, sehingga split tidak terbaca sebagai anjlok). |
| Jumlah candle yang punya harga penutupan. Untuk |
| Catatan interpretasi. |
Untuk saham yang rutin membagi dividen (mis. saham bank), totalReturnPct lebih mencerminkan hasil riil pemegang saham.
compare_stocks
Parameter | Tipe | Default |
| string[] (2β10) | β |
| string |
|
Diurutkan berdasarkan totalReturnPct jika tersedia untuk semua saham; jika tidak, berdasarkan priceReturnPct. Dasar pengurutan tercantum di field rankedBy. Ticker yang gagal tetap muncul dengan field error.
get_portfolio
Tanpa parameter. Membaca file dari environment variable IDX_PORTFOLIO_PATH.
Bagian | Isi |
| Per saham: |
| Posisi dari |
| Aset manual + |
|
|
| Asumsi perhitungan: |
| Peringatan yang harus disampaikan ke pengguna. |
Aturan integritas:
Jual melebihi kepemilikan pada tanggal itu dianggap error file portofolio, bukan dihitung minus.
Dividen hanya dihitung untuk ticker yang punya
transactionsdan datanya berhasil diambil; jika gagal,dividendsReceivedbernilainulldan ada peringatan, sehinggatotals.dividendsReceivedbisa kurang dari kenyataan.Saham yang harganya gagal diambil tidak ikut dihitung dalam
totals(bukan dianggap impas). Saham tersebut tercantum diexcludedTickers, dan peringatan "Total TIDAK LENGKAP" muncul di urutan pertamawarnings.Stock split setelah
buyDatedideteksi dan diberi peringatan per saham.Aset manual yang
updatedAt-nya lebih lama darimanualStaleDays, atau tidak punyaupdatedAt, diberi peringatan.estimatedNetIfSold= nilai pasar βsellFeePct. Ini perkiraan; hasil jual sebenarnya tergantung harga eksekusi dan tarif sekuritas.
Troubleshooting
Masalah | Solusi |
| Pastikan JSON config valid (tanpa koma berlebih), path ke |
| Pastikan Node.js β₯20 ada di PATH ( |
| Node.js belum terpasang atau tidak ada di PATH. Ganti |
| Tambahkan bagian |
| Path di |
| Periksa nama field dan tipe datanya (angka tanpa tanda kutip, tanpa titik ribuan: |
| Kode saham salah atau sudah delisting. Cek kode di https://www.idx.co.id. |
| Yahoo membatasi akses dan 2 percobaan ulang otomatis masih gagal. Tunggu beberapa menit. |
| Komputer tidak bisa mencapai Yahoo. Periksa koneksi internet, VPN, atau firewall. |
| Jaringan lambat atau Yahoo sedang bermasalah. Coba lagi beberapa saat. |
| Yahoo membalas halaman HTML (mis. halaman persetujuan atau pembatasan akses). Coba lagi nanti; jika terus terjadi, laporkan karena endpoint mungkin berubah. |
Harga berbeda dengan aplikasi sekuritas | Data Yahoo bisa tertunda beberapa menit selama jam bursa. Cek |
Untung/rugi sebuah saham terlihat sangat besar/aneh | Kemungkinan saham tersebut melakukan stock split. Cek |
Peringatan | Tambahkan |
Sumber data & batasan
Harga diambil dari endpoint chart Yahoo Finance (simbol berakhiran
.JK, IHSG =^JKSE). Endpoint ini tidak resmi: bisa berubah atau dibatasi tanpa pemberitahuan, dan harga bisa tertunda dari bursa. Pastikan penggunaan sesuai ketentuan layanan Yahoo.Respons di-cache 60 detik untuk mengurangi jumlah request.
Jika Yahoo membalas HTTP 429/5xx atau koneksi gagal sementara, server mencoba ulang otomatis sampai 2 kali (jeda 0,5 detik lalu 1 detik, atau sesuai header
Retry-After, maksimum 15 detik). Error 404 dan respons bukan JSON tidak diulang.Reksa dana tidak tersedia di sumber data ini, jadi nilainya diisi manual di file portofolio.
Kode sumber data terisolasi di
src/yahoo.ts, sehingga mudah diganti dengan penyedia data berlisensi bila diperlukan.
Pengembangan
src/
index.ts # entry point (stdio transport)
server.ts # definisi tools MCP
yahoo.ts # klien & parser data harga, dividen, split, status pasar
summary.ts # ringkasan performa (price/total return, drawdown)
portfolio.ts # skema & perhitungan portofolio
test/ # unit + integration test (node:test, fetch tiruan)Perintah | Fungsi |
| Compile TypeScript ke |
| Jalankan test (offline, memakai data tiruan) |
| Coba tools secara interaktif di MCP Inspector |
| Jalankan server via stdio |
| Publish ke npm (otomatis build + test dulu lewat |
Kontribusi
Laporan bug, usulan fitur, dan PR sangat diterima. Baca CONTRIBUTING.md terlebih dahulu. Saat melapor bug, gunakan template issue dan sertakan output JSON dari MCP Inspector.
Lisensi
MIT Β© 2026 Zalfrie
Available Tools
4 toolscompare_stocksBandingkan sahamARead-only
Bandingkan performa 2β10 saham IDX (dan/atau IHSG) dalam rentang waktu yang sama. Diurutkan berdasarkan totalReturnPct (harga + dividen) jika tersedia untuk semua, selain itu priceReturnPct. Sebutkan dasar pengurutan (rankedBy) ke pengguna.
| Name | Required | Description | Default |
|---|---|---|---|
| range | No | 6mo | |
| tickers | Yes | Daftar kode saham, mis. ["BBCA","BBRI","IHSG"] |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description adds real behavior beyond that by disclosing the sort key (totalReturnPct incl. dividends when available for all, else priceReturnPct) and instructing the agent to surface rankedBy to the user. It stops short of covering failure modes such as invalid or non-IDX tickers.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences: what it does and its scope first, then the ranking rule, then the user-facing obligation. No filler, no repetition, and the most decision-relevant fact (ranked by total return when available) is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description usefully names the return fields (totalReturnPct, priceReturnPct, rankedBy) an agent will need to interpret results, and annotations cover safety. Remaining gaps are minor for a two-parameter read tool: error behavior for out-of-range ticker counts or unknown symbols.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 50%: tickers is documented in the schema, range is not (it carries only an enum and default). The description restates the 2β10 bound and clarifies that one range applies uniformly across all compared tickers, but adds no format or syntax detail for ticker codes beyond the schema example.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Bandingkan performa'), plus hard scope limits: 2β10 tickers, IDX stocks and/or IHSG, single shared time range. Those constraints (multi-ticker, bounded count) inherently separate it from the single-ticker siblings get_quote and get_history.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the scope statement (use this when comparing several stocks over one range) but never stated as guidance. No alternative is named β nothing tells the agent why to pick this over calling get_history repeatedly, nor what happens if only one ticker is supplied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_historyRiwayat harga sahamARead-only
Ambil riwayat harga (OHLC + volume) saham IDX untuk rentang waktu tertentu beserta ringkasan: priceReturnPct (harga saja), totalReturnPct (termasuk dividen), dividen & stock split dalam rentang, tertinggi, terendah, max drawdown. Maksimal 300 candle terakhir; gunakan interval 1wk/1mo untuk rentang panjang.
| Name | Required | Description | Default |
|---|---|---|---|
| range | No | Rentang waktu | 6mo |
| ticker | Yes | Kode saham IDX, mis. BBCA | |
| interval | No | Interval candle | 1d |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations cover read-only and open-world access, so the bar is lower, yet the description still adds meaningful behavior: a hard 300-candle cap and the interval/range coupling that triggers it. It also clarifies that totalReturnPct includes dividends while priceReturnPct does not, plus dividends/splits within the range β useful semantics beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero filler. The core action and return fields are front-loaded, and the constraints (max candles, interval choice) follow immediately after. Nothing repeats the schema or title verbatim.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description must carry the return values β and it does, naming priceReturnPct, totalReturnPct, dividends/splits, high, low and max drawdown. Combined with the candle cap and interval guidance, an agent has everything needed to call and interpret it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3, but the description adds value the schema lacks: the 300-candle ceiling and the rule that 1wk/1mo intervals suit long ranges, effectively explaining how range and interval interact. It does not document the range enum values themselves, which stay in the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb+resource: 'Ambil riwayat harga (OHLC + volume) saham IDX' with an explicit time-range scope, and it enumerates what the response summarizes. The distinction from get_quote (history vs. current quote) is implicit in the wording but no sibling is named outright.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives real operating guidance: 'Maksimal 300 candle terakhir; gunakan interval 1wk/1mo untuk rentang panjang' tells the agent how to combine range and interval. It stops short of stating when to prefer this over get_quote or compare_stocks, so no explicit exclusion is offered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_portfolioNilai portofolio sayaARead-only
Baca file portofolio lokal (IDX_PORTFOLIO_PATH) lalu hitung nilai pasar, untung/rugi belum terealisasi per saham dan total, serta ESTIMASI hasil bersih jika dijual. Jika file berisi riwayat transactions, posisi dihitung dengan metode harga rata-rata, lengkap dengan realizedPnl (untung/rugi penjualan), dividendsReceived (dividen bruto berdasarkan ex-date), posisi yang sudah habis (closed), dan totals.totalReturn. Juga mengecek stock split setelah tanggal beli. Hanya membaca β tidak bisa membeli atau menjual. WAJIB sampaikan isi 'warnings' ke pengguna bersama angka-angkanya, terutama bila totals.incomplete bernilai true.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds substantial context beyond annotations: it describes average-cost accounting, realizedPnl, dividendsReceived, closed positions, totalReturn, stock-split checks, and the mandatory handling of warnings and totals.incomplete. It does not explain failure modes or file-format requirements, keeping it short of the highest score.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core action and then adds necessary computational details in a single dense paragraph. Every sentence contributes unique information, though the lack of visual breaks makes it slightly harder to scan than an ideally structured definition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description carries the burden of explaining return values, and it does so by naming key output fields like realizedPnl, dividendsReceived, closed, and totals.totalReturn. It also covers the computation methodology, split handling, and warning requirements, making it complete for an agent to invoke and interpret the tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline is 4. The description adds the IDX_PORTFOLIO_PATH environment variable as an implicit input source, which is useful context, but there are no parameters whose semantics could be clarified further.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb+resource combination: reading a local portfolio file and computing market value, unrealized P&L, and estimated net proceeds. It is clearly distinct from sibling tools like get_quote and get_history, which focus on individual securities rather than portfolio-level valuation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the detailed functionality (portfolio valuation from a local file), but there is no explicit guidance on when to choose this tool versus get_quote, get_history, or compare_stocks. The note that it cannot buy or sell provides a boundary, but alternatives are not named.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_quoteHarga saham terkiniARead-only
Ambil harga terakhir saham Bursa Efek Indonesia (BEI/IDX), perubahan harian, rentang 52 minggu, dan harga per lot (100 lembar). Terima kode saham seperti BBCA, BBRI, TLKM, atau indeks IHSG. Selalu sampaikan freshnessNote ke pengguna (status pasar & waktu data). Data untuk informasi, bukan rekomendasi beli/jual. Harga bisa tertunda dari bursa.
| Name | Required | Description | Default |
|---|---|---|---|
| ticker | Yes | Kode saham IDX, mis. BBCA atau IHSG |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description goes further by warning that prices may be delayed from the exchange and that a freshnessNote (market status and data timestamp) must be surfaced to the user. It also clarifies this is informational, not a buy/sell recommendation. No error or rate-limit behavior is described.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads the purpose, then inputs, then required output behavior and the informational disclaimer. Every sentence carries actionable weight (returned fields, freshnessNote obligation, data caveat) with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter read tool with no output schema, the description adequately covers inputs, returned fields, and freshness semantics. Minor gaps remain on error behavior for invalid or delisted tickers and on whether index codes need any special format.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the single 'ticker' parameter is already documented as 'Kode saham IDX, mis. BBCA atau IHSG'. The description's examples (BBCA, BBRI, TLKM, IHSG) largely duplicate that, so the baseline of 3 applies with no meaningful value added.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource in Indonesian ('Ambil harga terakhir saham Bursa Efek Indonesia'), and enumerates what it returns: last price, daily change, 52-week range, and price per lot (100 shares). The word 'terakhir' (latest) implicitly separates it from the sibling get_history, and the explicit support for the IHSG index adds scope clarity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives example tickers (BBCA, BBRI, TLKM, IHSG) and instructs the agent to always relay freshnessNote, which implies usage context. However, it never states when to choose this tool over get_history, compare_stocks, or get_portfolio, so routing guidance is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.4.0- First observed
compare_stocks - First observed
get_history - First observed
get_portfolio - First observed
get_quote
TDQS
Scored across 4 tools
Each tool targets a clearly distinct operation: current quote (get_quote), historical candles (get_history), multi-stock comparison (compare_stocks), and local portfolio evaluation (get_portfolio). There is no meaningful overlap in purpose or output, so an agent can select correctly without guessing.
Three tools follow a clean verb_noun pattern (get_quote, get_history, get_portfolio) while compare_stocks deviates only in verb (compare vs get). The deviation is minor and still perfectly readable, so the set is nearly uniform.
Four tools is on the lean side but each earns its place by covering a distinct analytical need (quote, history, comparison, portfolio). A symbol-search or market-overview tool could round it out, but nothing is redundant.
The surface covers the core investor workflows: live pricing, historical returns, comparative performance, and portfolio P&L including dividends and splits. Gaps like symbol search or corporate-action lookup exist but are minor and don't block the primary use cases.
Maintenance
Related MCP Connectors
Your investing research inside Claude: watchlists, financial ratios, reverse-DCF valuations, investment theses, notes, portfolio, earnings calendar and news for the companies you follow. 70 read and write tools; ask what's on your morning desk, rank a watchlist by ROE, log a trade or save a thesis. OAuth sign-in. Free to start.
Live crypto + IDX stock market intelligence for AI agents β 19 tools, no API key.
Connect your portfolio to Claude, ChatGPT, or Codex to analyze it and make smarter investments.
Analyze stocks with summaries, price targets, and analyst recommendations. Track SEC filings, diviβ¦
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables 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.931 npm43MIT
- 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.931 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-
- AlicenseAqualityCmaintenanceEnables Claude to read Moscow Exchange market data and T-Invest brokerage account data, including quotes, candles, order books, dividends, portfolio, and operations. It is read-only and does not place orders.7MIT