bps-webapi-mcp
Enables AI assistants to access official Indonesian statistical data (BPS) through MCP, providing tools for dynamic data queries, foreign trade, publications, and more.
README
BPS WebAPI MCP Server 🇮🇩
<a href="https://webapi.bps.go.id/developer/"><img src="https://webapi.bps.go.id/developer/assets/img/pst-ads.svg" width="400" style="border-radius:8px" /></a>
Menghubungkan Claude langsung ke data statistik resmi BPS Indonesia via Model Context Protocol (MCP).
Dengan server ini, Claude bisa menjawab pertanyaan seperti:
- "Berapa nilai ekspor kopi Indonesia ke Amerika Serikat pada Agustus 2025?"
- "Tunjukkan data inflasi Indonesia tahun 2024 per bulan"
- "Apa indikator kemiskinan terbaru nasional?"
- "Cari publikasi BPS tentang ketenagakerjaan 2024"
...semua langsung dari sumber resmi, tanpa halusinasi!
Prasyarat
- Node.js ≥ 18
- Token API BPS — daftar di webapi.bps.go.id
- Claude Desktop (untuk integrasi langsung)
Instalasi
# Clone / copy folder ini
cd bps-webapi-mcp
# Install dependencies
npm install
Konfigurasi Claude Desktop
Tambahkan ke file konfigurasi Claude Desktop:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"bps-webapi": {
"command": "node",
"args": ["/GANTI/DENGAN/PATH/ABSOLUT/bps-mcp/index.js"],
"env": {
"BPS_API_KEY": "TOKEN_API_BPS_ANDA_DISINI"
}
}
}
}
⚠️ Ganti path dan token sesuai kondisi lokal. Restart Claude Desktop setelah edit.
Tools yang Tersedia (14 tools)
🔢 Data Statistik Utama
| Tool | Deskripsi |
|---|---|
bps_get_dynamic_data |
Utama — ambil angka statistik dari tabel dinamis (PDB, inflasi, kemiskinan, dll) |
bps_foreign_trade |
Utama — data ekspor/impor berdasarkan kode HS, negara, periode |
bps_strategic_indicators |
Indikator strategis nasional/provinsi (IPM, Gini, dll) |
bps_list_variable |
Cari var_id dataset dengan kata kunci |
bps_list_period |
Daftar ID tahun/periode yang valid |
bps_list_vertical_var |
Dimensi baris (wilayah, kategori, dll) |
📄 Dokumen & Publikasi
| Tool | Deskripsi |
|---|---|
bps_list_press_release |
Daftar Berita Resmi Statistik (BRS) terbaru |
bps_get_press_release |
Detail + abstrak satu BRS |
bps_list_publication |
Daftar buku/publikasi statistik |
bps_list_infographic |
Daftar infografis statistik |
bps_list_news |
Berita dari website BPS |
🗂️ Referensi
| Tool | Deskripsi |
|---|---|
bps_domain_list |
Kode domain semua wilayah BPS |
bps_list_subjects |
Kelompok topik statistik |
bps_glosarium |
Definisi resmi istilah statistik |
📚 SIMDASI (Statistik Dalam Angka)
| Tool | Deskripsi |
|---|---|
bps_simdasi_regions |
Kode wilayah 7 digit MFD |
bps_simdasi_subjects |
Daftar bab/subjek publikasi |
bps_simdasi_tables |
Daftar tabel dan tahun tersedia |
bps_simdasi_get_table |
Isi tabel berdasarkan wilayah + tahun |
Alur Kerja Contoh
Mendapatkan Data Dinamis
1. bps_list_variable(keyword="kemiskinan") → temukan var_id
2. bps_list_period(var=104) → temukan th_id tahun yang tersedia
3. bps_get_dynamic_data(var=104, th="125") → data aktual!
Mendapatkan Data Ekspor/Impor
bps_foreign_trade(
sumber = "1", // Ekspor
periode = "1", // Bulanan
kodehs = "09", // HS 09 = Kopi, teh, rempah
jenishs = "1",
tahun = 2025,
bulan = 8,
ctry = "US" // ke Amerika Serikat
)
Kode HS Umum untuk ekspor/impor
| Kode | Komoditas |
|---|---|
09 |
Kopi, teh, rempah-rempah |
10 |
Serealia (gandum, beras, jagung) |
15 |
Lemak & minyak nabati/hewani (CPO) |
26 |
Bijih logam, terak |
27 |
Bahan bakar mineral (batu bara, minyak) |
40 |
Karet |
44 |
Kayu & produk kayu |
47 |
Pulp kayu |
61 |
Pakaian jadi rajut |
85 |
Mesin & peralatan listrik |
Troubleshooting
"BPS_API_KEY belum di-set" → Pastikan env var sudah diset di konfigurasi
HTTP 401 → Token tidak valid, cek di profil webapi.bps.go.id
Data kosong → Coba kurangi filter, atau cek var_id dengan bps_list_variable
Referensi
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.