nusa-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BPS_API_KEY | No | BPS API key; enables the nusa_stats_* tools. Free registration at https://webapi.bps.go.id/developer/. | |
| NUSA_CONTACT | No | Email or URL appended to the User-Agent. | |
| NUSA_HTTP_HOST | No | Bind address for HTTP mode. | 127.0.0.1 |
| NUSA_HTTP_PORT | No | Bind port for HTTP mode. | 3000 |
| NUSA_LOG_LEVEL | No | Log level: silent, error, warn, info, or debug. Logs go to stderr. | info |
| NUSA_TRANSPORT | No | Transport mode: stdio or http. The --http flag is also supported. | stdio |
| NUSA_HTTP_API_KEY | No | Bearer token for HTTP mode; required if binding to a non-loopback address. | |
| NUSA_HTTP_TIMEOUT_MS | No | Upstream request timeout in milliseconds. | 10000 |
| NUSA_DISABLE_PROVIDERS | No | Comma-separated list of providers to disable: bmkg,bps. | |
| NUSA_HTTP_RATE_PER_MIN | No | HTTP mode request limit per client address per minute. | 120 |
| NUSA_HTTP_ALLOWED_HOSTS | No | Comma-separated list of allowed Host headers for HTTP mode. | |
| NUSA_MAX_RESPONSE_BYTES | No | Maximum upstream response size in bytes. | 5000000 |
| NUSA_HTTP_ALLOWED_ORIGINS | No | Comma-separated list of allowed Origin headers for HTTP mode. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Unofficial server for Indonesian public data (regions, BMKG, BPS). Not affiliated with any government body. Resolve place names with nusa_region_search before calling weather tools; if results are ambiguous, ask the user which one they mean. Always cite the source and attribution fields from each result. Do not alter official figures. If a result has cache "stale" or warnings, tell the user. If a source returns an error, report it; never invent data.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| nusa_region_searchA | 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. |
| nusa_region_getA | Returns one wilayah by its official Kemendagri code, with hierarchy path, centroid (province/regency only) and time zone (WIB/WITA/WIT). |
| nusa_region_childrenA | 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. |
| nusa_earthquake_latestA | 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. |
| nusa_earthquake_nearbyA | 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. |
| nusa_weather_forecastA | 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. |
| nusa_weather_warningsA | 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. |
| nusa_stats_searchA | 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. |
| nusa_stats_getA | 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. |
| nusa_sourcesA | 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. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| earthquake_situation_brief | Short, cited summary of recent earthquakes in Indonesia or near a place. |
| regional_weather_brief | Short, cited weather brief for a place with active warnings. |
| statistics_lookup | Find and cite an official BPS statistic. Needs a BPS API key configured by the user. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| glossary | Plain-language glossary of the terms and units used by nusa-mcp results. |
| sources | Static catalog of the data sources, their attribution wording and terms notes. For live status call nusa_sources. |
| regions-summary | Dataset version, legal basis, counts per level and the 38 provinces with codes. |
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.