nusa-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., "@nusa-mcp Cari kode wilayah Kecamatan Coblong dan gempa terbaru di Jawa Barat"
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.
nusa-mcp
MCP server tidak resmi untuk data publik Indonesia: kode wilayah, gempa dan cuaca BMKG, statistik BPS. Dengan atribusi sumber di setiap hasil.
Proyek komunitas, tidak berafiliasi dengan BMKG, BPS, Bank Indonesia, Kemendagri, atau lembaga pemerintah mana pun. Akurasi data adalah tanggung jawab sumbernya. Status:
0.1.0-rc.1(release candidate), belum ada di npm.
Daftar isi
Related MCP server: bps-webapi-mcp
Fitur
10 alat berbasis niat, bukan satu alat per endpoint. Nama konsisten
nusa_*, semua read-only, punyaoutputSchemadanstructuredContent.Atribusi dan jejak sumber di setiap hasil:
source,sourceUrl,attribution,retrievedAt,dataAsOf,cache(hit|miss|stale),warnings. Data resmi hanya dibentuk ulang, tidak diubah atau diisi.Lapisan wilayah offline: 91.599 baris Kepmendagri 2025 (provinsi sampai desa/kelurahan), alias ("Jogja", "jateng", "Solo"), nama ganda ditandai
ambiguous.Gagal dengan jujur:
not_found,upstream_unavailable,rate_limited,requires_api_key,upstream_schema_changed, data usang diberi tandastale.Aman secara bawaan: daftar host tetap (tanpa SSRF), teks dari upstream dibersihkan, HTTP hanya
127.0.0.1dengan validasi Host/Origin, tanpa data pribadi, tanpa scraping.Tangguh: cache per sumber, single-flight, stale-if-error, retry dengan jitter, rate limiter, circuit breaker.
Teruji: 117 tes offline, tes konformansi MCP lewat klien resmi, 25 kasus evaluasi, tes kontrak langsung (tidak memblokir).
Server sejenis sudah ada. Perbandingan jujur ada di docs/COMPETITIVE-ANALYSIS.md. Fokus proyek ini: kepatuhan, atribusi, dan satu lapisan wilayah yang dipakai semua alat.
Mulai cepat
Butuh Node.js 20 atau lebih baru. Paket belum dipublikasikan ke npm, jalankan dari sumber:
git clone https://github.com/JackBerck/nusa-mcp.git
cd nusa-mcp
npm ci && npm run build
node dist/index.js # transport stdioTanpa konfigurasi apa pun, alat wilayah dan BMKG langsung bisa dipakai. Alat BPS butuh kunci gratis (lihat BPS).
Konfigurasi klien MCP
Ganti path dengan lokasi dist/index.js Anda.
claude mcp add nusa -- node /path/ke/nusa-mcp/dist/index.jsWindows:
{
"mcpServers": {
"nusa": { "command": "node", "args": ["D:\\Code\\nusa-mcp\\dist\\index.js"] }
}
}macOS / Linux:
{
"mcpServers": {
"nusa": { "command": "node", "args": ["/home/saya/nusa-mcp/dist/index.js"] }
}
}{ "mcpServers": { "nusa": { "command": "node", "args": ["/path/ke/nusa-mcp/dist/index.js"] } } }{
"servers": {
"nusa": { "type": "stdio", "command": "node", "args": ["/path/ke/nusa-mcp/dist/index.js"] }
}
}Kunci BPS
Daftar gratis di https://webapi.bps.go.id/developer/, lalu isi sebagai variabel lingkungan server (jangan ditempel ke chat):
{
"mcpServers": {
"nusa": { "command": "node", "args": ["..."], "env": { "BPS_API_KEY": "kunci-anda" } }
}
}Tanpa kunci, nusa_stats_* mengembalikan requires_api_key beserta petunjuk pendaftaran, tidak error.
Alat (10)
Alat | Fungsi |
| Cari wilayah berdasarkan nama (fuzzy, alias, singkatan |
| Satu wilayah menurut kode (path, titik pusat provinsi/kabupaten, zona WIB/WITA/WIT) |
| Anak wilayah, bisa langsung ke level lebih dalam, dengan |
| Gempa terbaru, M5.0+, atau dirasakan (BMKG) |
| Gempa dalam radius dari koordinat (turunan lokal, ditandai |
| Prakiraan 3 hari per desa/kelurahan dari nama tempat atau kode wilayah |
| Peringatan dini cuaca (nowcast CAP), filter provinsi atau kode |
| Cari indikator, variabel, tabel, publikasi, rilis BPS |
| Ambil nilai variabel BPS dengan label, satuan, periode |
| Status sumber, kata atribusi, catatan ketentuan, status kunci |
Skema, contoh panggilan, dan satuan: docs/TOOLS.md.
Contoh percakapan
Ada gempa hari ini dekat Cilacap?
Agen memanggil nusa_region_search("Cilacap") lalu nusa_earthquake_nearby(lat, lon, 300). Jawaban menyebut "Sumber: BMKG" dan bahwa hasil berasal dari daftar terbaru BMKG, bukan katalog penuh.
Cuaca Purwokerto Timur 3 hari?
nusa_weather_forecast(place="Purwokerto Timur"). BMKG hanya punya prakiraan per desa, jadi alat memakai satu desa perwakilan kecamatan dan menjelaskannya di warnings.
Kecamatan apa saja di Kabupaten Purbalingga?
nusa_region_search lalu nusa_region_children(code="33.03") menghasilkan 18 kecamatan.
Berapa inflasi terakhir?
nusa_stats_search(query="inflasi") (butuh kunci BPS), jawaban menyertakan periode dan satuan.
Resource dan prompt
Resource: nusa://glossary (istilah dan satuan), nusa://sources (katalog sumber), nusa://regions/summary (versi dataset, 38 provinsi). Prompt: earthquake_situation_brief, regional_weather_brief, statistics_lookup.
Variabel lingkungan
Semua opsional. Contoh lengkap: .env.example.
Variabel | Default | Keterangan |
| kosong | Kunci BPS, mengaktifkan |
| kosong | Daftar dipisah koma: |
| kosong | Email atau URL yang ditambahkan ke User-Agent |
|
| Batas waktu permintaan upstream |
|
| Batas ukuran respons upstream |
|
|
|
|
|
|
|
| Alamat bind mode HTTP |
| kosong | Bearer token, wajib jika bind bukan loopback |
| kosong | Daftar Host/Origin yang diizinkan |
|
| Batas permintaan per alamat klien |
Mode HTTP
NUSA_TRANSPORT=http node dist/index.js
# POST http://127.0.0.1:3000/mcp (stateless Streamable HTTP, tanpa SSE)
# GET /healthz /readyzBind selain loopback ditolak kecuali NUSA_HTTP_API_KEY (min. 16 karakter) dan NUSA_HTTP_ALLOWED_HOSTS diisi. Server berbicara HTTP biasa: pasang TLS lewat reverse proxy. Model keamanan lengkap: docs/SECURITY-MODEL.md.
Batasan dan kepatuhan
Izin BMKG. Ketentuan BMKG (diperbarui 8 Juli 2026) mewajibkan izin tertulis untuk pengemasan ulang, integrasi ke aplikasi pihak ketiga, dan penggunaan komersial. Proyek ini dirancang untuk dijalankan lokal oleh pengguna sendiri dan tidak menyediakan layanan terhosting. Detail: docs/DATA-SOURCES.md.
Prakiraan BMKG hanya per desa/kelurahan. Masukan koordinat tidak didukung karena dataset terbuka tidak punya titik desa.
Daftar gempa BMKG hanya jendela terbaru, bukan katalog sejarah.
Alat BPS baru diuji dengan fixture sintetis dari contoh OpenAPI resmi BPS. Verifikasi dengan kunci asli belum dilakukan.
Kode wilayah berasal dari dump SQL MIT pihak ketiga (cahyadsn/wilayah); lisensi redistribusi datanya dan kesesuaiannya dengan lampiran resmi belum diverifikasi (docs/REGION-DATA.md).
Tidak ada data pribadi, tidak ada scraping, tidak ada akses di balik login atau CAPTCHA.
Pengembangan
npm ci
npm run check # typecheck, lint, format, tes offline
npm run test:live # kontrak langsung ke BMKG (BPS jika BPS_API_KEY ada), tidak memblokir
npm run bench # benchmark offlineDokumen: ARCHITECTURE, RELIABILITY, REGION-DATA, ADDING-A-PROVIDER, EVALUATION, BENCHMARK, CONTRIBUTING, CHANGELOG, SECURITY.
Atribusi dan lisensi
Wilayah: Kepmendagri No. 300.2.2-2430 Tahun 2025 (dibangun dari
cahyadsn/wilayah, MIT).Cuaca dan gempa: Sumber: BMKG.
Statistik: This service uses the Badan Pusat Statistik (BPS) API.
Kode: MIT. Lisensi ini tidak berlaku untuk data sumber, yang tunduk pada ketentuan penerbitnya.
Available Tools
10 toolsnusa_earthquake_latestLatest earthquakes from BMKGARead-onlyIdempotent
Gempa bumi from BMKG: the single latest event, the recent M5.0+ list, or the recent felt (dirasakan) list. Lists are short recent windows, not a historical catalog.
Inputs: kind, lang, limit. Returns: data, cache, source, derived, +7 more
nusa_earthquake_nearbyEarthquakes near a point (derived)ARead-onlyIdempotent
Gempa within a radius of a coordinate, computed locally (haversine) from the BMKG latest, M5+ and felt lists. Derived result: those lists are short recent windows, so an empty result does not prove no earthquake occurred.
Inputs: lat (required), lon (required), lang, limit, +2 more. Returns: data, cache, source, derived, +7 more
nusa_region_childrenList sub-regions of a regionARead-onlyIdempotent
Lists child wilayah of a region code (e.g. kecamatan of a kabupaten). Use level to jump several levels down (e.g. all desa of a kabupaten). Paginated with limit and cursor.
Inputs: code (required), lang, level, limit, +1 more. Returns: data, cache, source, derived, +7 more
nusa_region_getGet one administrative region by codeARead-onlyIdempotent
Returns one wilayah by its official Kemendagri code, with hierarchy path, centroid (province/regency only) and time zone (WIB/WITA/WIT).
Inputs: code (required), lang. Returns: data, cache, source, derived, +7 more
nusa_region_searchSearch Indonesian administrative regionsARead-onlyIdempotent
Fuzzy, alias-aware search for Indonesian wilayah (provinsi, kabupaten/kota, kecamatan, desa/kelurahan) by name, e.g. "Jogja", "Kab. Purbalingga", "Purwokerto". Returns official Kemendagri codes, the hierarchy path and a confidence score. Use it first to turn a place name into a code.
Inputs: query (required), lang, level, limit, +1 more. Returns: data, cache, source, derived, +7 more
nusa_sourcesList data sources and statusARead-onlyIdempotent
Lists the data sources behind this server (BMKG, BPS, region codes) with health status, required attribution wording and terms notes. Use it to cite sources correctly or to check whether a source is up.
Inputs: lang. Returns: data, cache, source, derived, +7 more
nusa_stats_getGet a BPS dynamic-table variableARead-onlyIdempotent
Fetch values of one BPS dynamic-table variable (var id from nusa_stats_search type=variable) for a domain, with units, labels and periods. Without period it uses the most recent period BPS lists. Requires a free BPS API key.
Inputs: variable_id (required), lang, limit, domain, +2 more. Returns: data, cache, source, derived, +7 more
nusa_stats_searchSearch BPS statisticsARead-onlyIdempotent
Find official BPS (Badan Pusat Statistik) statistics: strategic indicators (inflasi, kemiskinan...), dynamic-table variables, static tables, publications and press releases. Requires a free BPS API key configured by the user. Use the returned variable id with nusa_stats_get.
Inputs: query (required), lang, page, type, +3 more. Returns: data, cache, source, derived, +7 more
nusa_weather_forecastWeather forecast for a placeARead-onlyIdempotent
Prakiraan cuaca (3-day, 3-hourly) from BMKG for a place name or a Kemendagri region code. BMKG forecasts exist per desa/kelurahan; a kecamatan name is approximated by one of its villages and flagged. Coordinates are not supported because the open dataset has no village centroids.
Inputs: days, lang, place, region_code. Returns: data, cache, source, derived, +7 more
nusa_weather_warningsActive weather warnings (nowcast)ARead-onlyIdempotent
Peringatan dini cuaca (nowcast, CAP) from BMKG, optionally filtered by province or a Kemendagri region code. Matching below province level is by kecamatan name found in the alert text.
Inputs: lang, limit, province, region_code. Returns: data, cache, source, derived, +7 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a clearly distinct purpose: region_search (name→code), region_get (code→detail), and region_children (hierarchy traversal) form an unambiguous trio, and the BMKG/BPS pairs (latest vs nearby, forecast vs warnings, stats_search vs stats_get) are each separated by an explicit qualifier in the description. nusa_sources is a server-level utility that cannot be confused with any data tool.
All tools follow a predictable nusa_<domain>_<action/noun> pattern (region_search, weather_forecast, stats_get), which makes the domain groupings obvious. The only deviation is nusa_sources, which drops the domain segment, and earthquake_latest/nearby use adjectives rather than verbs—minor and still readable.
Ten tools is well-scoped for a three-source data server: three for regions, two for earthquakes, two for weather, two for BPS stats, and one for source metadata. No tool appears redundant or padded, and each maps to a concrete lookup the agent needs.
Region hierarchy (search/get/children), weather forecast plus warnings, and BPS search/get cover the core lifecycle for each source, with nusa_sources closing the attribution loop. The main gap is the absence of a reverse geocode (coordinates→region code) or historical earthquake catalog, which leaves earthquake_nearby as a dead-end derived result that cannot be followed up on.
Maintenance
Related MCP Connectors
Indonesian public data, QRIS, rupiah and AI model status tools. No API key needed.
Indonesian public data from official sources: regions, postal codes, holidays, prayer times, BMKG, schools, hospitals, exchange rates, minimum wage, halal, BPOM, trademarks, OJK lists and more.
Indonesia reference data: holidays, wages, regions, postal codes, tax, food prices, KBLI, BPS stats
Official Indonesian region codes and KBLI 2025 business codes, pay-per-call via x402 (USDC on Base).
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI clients to access official Indonesian statistical data from Badan Pusat Statistik (BPS) through natural language queries. It provides over 20 tools for retrieving demographic, economic, and trade data with support for bilingual responses and fuzzy domain matching.34412 npm7MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to access official Indonesian statistical data (BPS) through MCP, providing tools for dynamic data queries, foreign trade, publications, and more.2-
- AlicenseNot gradedqualityBmaintenanceProvides access to Indonesian government data sources (BPOM, BPJPH, AHU, etc.) via a unified API and MCP tools.73 PyPI13MIT
- AlicenseNot gradedqualityDmaintenanceEnables access to a wide range of Indonesian public data and services without requiring accounts or API keys, including weather, earthquakes, addresses, postal codes, news, prayer schedules, Quran, gold prices, and more.MIT