loading…
Search for a command to run...
loading…
Enables AI clients to access official Indonesian statistical data from Badan Pusat Statistik (BPS) through natural language queries. It provides over 20 tools f
Enables 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.
MCP (Model Context Protocol) server untuk data statistik BPS (Badan Pusat Statistik) Indonesia. Memungkinkan AI clients seperti Claude Desktop, Claude Code, Cursor, dan lainnya untuk mengakses data statistik resmi Indonesia melalui natural language.
BPS_API_KEY=your_key npx bps-mcp-server
git clone https://github.com/murphi/bps-mcp-server
cd bps-mcp-server
npm install
npm run build
BPS_API_KEY=your_key npm start
Server ini tersedia secara publik di:
https://bps-mcp-server.murphi.my.id/mcp
Tambahkan ke MCP client manapun (Claude Desktop, Cursor, dll.) via remote transport:
{
"mcpServers": {
"bps-statistics": {
"type": "http",
"url": "https://bps-mcp-server.murphi.my.id/mcp",
"headers": {
"X-BPS-API-Key": "your_api_key_here"
}
}
}
}
Ingin deploy sendiri? Deploy sebagai serverless worker di akun Cloudflare kamu:
Lihat panduan lengkap di docs/DEPLOY-WORKERS.md.
File: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
{
"mcpServers": {
"bps-statistics": {
"command": "npx",
"args": ["-y", "bps-mcp-server"],
"env": {
"BPS_API_KEY": "your_api_key_here"
}
}
}
}
claude mcp add bps -- npx -y bps-mcp-server
Atau file .mcp.json di project root:
{
"mcpServers": {
"bps": {
"command": "npx",
"args": ["-y", "bps-mcp-server"],
"env": {
"BPS_API_KEY": "${BPS_API_KEY}"
}
}
}
}
File ~/.cursor/mcp.json atau .vscode/mcp.json:
{
"mcpServers": {
"bps-statistics": {
"command": "npx",
"args": ["-y", "bps-mcp-server"],
"env": {
"BPS_API_KEY": "your_api_key_here"
}
}
}
}
| Tool | Deskripsi |
|---|---|
list_domains |
Daftar wilayah (provinsi, kab/kota) |
resolve_domain |
Konversi nama wilayah → kode domain (fuzzy matching) |
list_subjects |
Daftar subjek data statistik |
list_subject_categories |
Kategori subjek |
list_variables |
Daftar variabel tabel dinamis |
list_vertical_variables |
Variabel vertikal (disagregasi) |
list_derived_variables |
Turunan variabel |
list_periods |
Periode data tersedia |
list_derived_periods |
Turunan periode |
list_units |
Satuan data |
get_dynamic_data |
Core — Ambil data tabel dinamis |
list_static_tables |
Daftar tabel statis |
get_static_table |
Detail tabel statis (HTML) |
list_press_releases |
Daftar Berita Resmi Statistik (BRS) |
get_press_release |
Detail BRS |
list_publications |
Daftar publikasi |
get_publication |
Detail publikasi |
list_strategic_indicators |
Indikator strategis |
get_trade_data |
Data ekspor/impor berdasarkan kode HS |
list_infographics |
Daftar infografis BPS |
get_infographic |
Detail infografis |
list_news |
Daftar berita BPS |
get_news |
Detail berita |
list_census_events |
Daftar kegiatan sensus |
list_census_topics |
Topik data per kegiatan sensus |
list_csa_categories |
Kategori CSA |
list_csa_subjects |
Subjek CSA per domain |
list_csa_tables |
Tabel CSA per subjek |
get_csa_table |
Detail tabel CSA (HTML) |
list_glossary |
Glosarium istilah statistik |
search |
Pencarian lintas tipe (WebAPI + AllStats fallback) |
cache_clear |
Bersihkan cache |
| Tool | Deskripsi |
|---|---|
allstats_search |
Pencarian unified semua konten BPS (publikasi, tabel, BRS, infografis, data mikro, glosarium, klasifikasi) |
allstats_deep_search |
Full-text search di dalam isi PDF publikasi BPS — fitur unik, tidak tersedia di WebAPI |
Server ini mengintegrasikan dua sumber data yang saling melengkapi:
┌─────────────────────────────────────────────────────────┐
│ BPS MCP Server │
│ │
│ ┌──────────────────┐ ┌────────────────────────┐ │
│ │ WebAPI BPS │ │ AllStats Search │ │
│ │ (Primary) │ │ (Supplementary) │ │
│ │ │ │ │ │
│ │ + Structured │ │ + Full-text PDF search │ │
│ │ data (JSON) │ │ + Unified search │ │
│ │ + Dynamic tables │ │ semua tipe konten │ │
│ │ + Ekspor/Impor │ │ + Tanpa API key │ │
│ │ + Sensus data │ │ + Filter wilayah 550+ │ │
│ │ - No PDF search │ │ - HTML scraping │ │
│ └──────────────────┘ └────────────────────────┘ │
│ │
│ Strategi interaksi: │
│ 1. search → WebAPI dulu, fallback AllStats jika kosong │
│ 2. allstats_search → langsung ke AllStats Search │
│ 3. allstats_deep_search → cari teks di dalam PDF │
└─────────────────────────────────────────────────────────┘
search (smart fallback)
allstats_search (unified discovery)
searchengine.web.bps.go.idallstats_deep_search (PDF full-text)
publication_id (24 karakter hex) dari hasil allstats_search1. Discovery → Deep Search:
allstats_search("akses internet", content="publication")
→ dapat publication_id
→ allstats_deep_search("akses internet", publication_id="131385d0253c6aae7c7a59fa")
→ halaman PDF yang membahas "akses internet"
2. Smart fallback:
search(keyword="kemiskinan Papua")
→ WebAPI kosong → otomatis cari via AllStats
→ hasil dari AllStats ditampilkan dengan catatan fallback
3. Parallel enrichment (oleh AI):
- get_dynamic_data → data angka terstruktur
- allstats_search("inflasi", content="pressrelease") → BRS terbaru
→ AI menggabungkan data angka + konteks dari BRS
| URI | Deskripsi |
|---|---|
bps://domains/provinces |
Daftar seluruh provinsi Indonesia (cached) |
bps://domains/regencies/{prov_id} |
Kabupaten/kota per provinsi |
bps://subjects/{domain} |
Subjek statistik per domain |
| Prompt | Deskripsi |
|---|---|
compare_regions |
Bandingkan data antara dua wilayah |
trend_analysis |
Analisis tren data multi-tahun |
poverty_profile |
Profil kemiskinan suatu wilayah |
economic_overview |
Ringkasan ekonomi wilayah |
population_stats |
Statistik kependudukan |
"Berapa jumlah penduduk Indonesia tahun 2023?"
"Bandingkan angka kemiskinan Jawa Timur vs Jawa Barat 2020-2023"
"Cari BRS terbaru tentang inflasi"
"Data ekspor kopi Indonesia tahun 2024"
"Cari publikasi tentang statistik telekomunikasi"
"Cari teks tentang akses internet di dalam publikasi BPS"
| Variable | Default | Deskripsi |
|---|---|---|
BPS_API_KEY |
(required) | API key dari webapi.bps.go.id |
BPS_API_BASE_URL |
https://webapi.bps.go.id/v1 |
Base URL API |
BPS_DEFAULT_LANG |
ind |
Bahasa default: ind / eng |
BPS_DEFAULT_DOMAIN |
0000 |
Domain default (0000 = Nasional) |
BPS_CACHE_ENABLED |
true |
Aktifkan cache |
BPS_CACHE_MAX_ENTRIES |
500 |
Maks entri cache |
BPS_LOG_LEVEL |
info |
Level log: debug/info/warn/error |
git clone https://github.com/murphi/bps-mcp-server
cd bps-mcp-server
npm install
npm run build
npm run test:unit
Sumber: Badan Pusat Statistik (BPS) — https://www.bps.go.id Layanan ini menggunakan API Badan Pusat Statistik (BPS).
MIT
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"bps-mcp-server": {
"command": "npx",
"args": []
}
}
}