
Sgdata Mcp
io.github.sypherin由 GitHub 帳號 sypherin 發布v0.5.2更新於 Oct 27, 2026
Singapore government data for AI agents: ACRA, HDB, COE, URA, SingStat, MAS, IRAS. 87 tools.
概覽
本機 MCP 伺服器,為助理提供 87 個工具,用來查詢新加坡政府開放資料,涵蓋企業登記、住宅、價格、就業、健康等。
- 可以做什麼
- 檢索與查詢 ACRA 企業實體及企業設立與歇業資料
- 查詢 HDB 轉售價格、停車場、URA 私宅交易與 COE 投標結果
- 取得經濟指標:GDP、CPI、失業率、收入、就業、零售銷售、MAS 匯率、IRAS 稅收與電力
- 取得人口、出生、犯罪、觀光、疾病、熟食中心、學校與托育資料,以及空氣品質、天氣、降雨、停車場空位與登革熱群聚的即時資料流
- 以通用方式探索並查詢 data.gov.sg 上的任一資料集,支援欄位結構檢視與搜尋
- 執行自然語言提問、跨資料集比較與 ASCII 迷你圖視覺化;另有一組目錄與調度工具,讓上下文較小的用戶端只暴露兩個工具
- 適用情境
- 適合在助理工作階段中需要新加坡本地公共統計或登記資訊時使用,例如依 UEN 或產業查找公司、查看房產與 COE 價格走勢,或取得經濟與人口指標,而不必自行撰寫 API 呼叫。
- 執行需求
- 以本機 stdio 程序執行,通常透過 npx 從 npm 套件啟動,因此需要 Node.js。不需要 API 金鑰或帳號。需要連線至 data.gov.sg 的網路;結果會快取在使用者家目錄下的本機 SQLite 檔案,可用 SGDATA_MCP_CACHE_DIR 變更位置。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Sgdata Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
@altronis/sgdata-mcp
A Singapore government data MCP server. 87 tools — 24 curated datasets + 7 SingStat tables + 6 live real-time feeds, CLI mode, data visualization, cross-dataset queries, natural language queries. Covering ACRA + HDB + URA + COE + CPI + GDP + employment + IRAS + MAS FX + MOE + ECDA + tourism + retail + population + crime + health + energy + hawkers + air quality + weather + carparks + live dengue. No API keys. Runs anywhere MCP runs. Full write-up: https://altronis.sg/blog/sgdata-mcp
[npm version] [license: MIT] [node] [MCP]
@altronis/sgdata-mcp is an MCP server that
lets Claude, Cursor, Continue, or any other MCP-compatible client query
Singapore government open data directly from data.gov.sg — corporate registry,
real estate, labour, prices, public services, capital flows, crime, health,
demographics, energy, and more.
It runs as a local stdio process on your machine. No hosted backend, no API
keys. Small curated datasets cache locally at ~/.sgdata-mcp/sgdata.sqlite;
large datasets (ACRA, HDB resale) and real-time feeds query data.gov.sg
server-side so they never download a whole dataset onto your disk.
v0.5.5: two helper tools for small-context clients. sg_tool_catalog
lists the tools (filter by keyword to get their input schemas) and
sg_dispatch calls any of them by name, so a client can expose just these two
instead of all 87 schemas. Dispatched calls are checked against the target
tool's schema, the same as a direct call.
v0.5.0: 13 new tools + a smaller footprint. Real-time feeds — sg_psi
(air quality), sg_weather_forecast, sg_air_temperature, sg_rainfall,
sg_carpark_availability, and sg_dengue_clusters (live NEA clusters — current
dengue, vs the frozen weekly-bulletin feed). SingStat tables —
sg_household_income, sg_wages, sg_deaths, sg_marriages, sg_divorces,
sg_trade, sg_labour_force. sg_search_datasets now actually searches
(data.gov.sg's q param is a no-op upstream, so it filters a cached catalog
locally). ACRA + HDB-resale tools query server-side (datastore_search)
instead of ingesting the full 56 MB / 23 MB datasets — no more multi-GB local
cache. FX tools fixed (upstream metadata endpoint 404s; they now read live data
via datastore_search).
⚠️
sg_acra_formations_by_ssicis a heavy tool. ACRA's SSIC+year filter can't be pushed server-side, so it crawls 27 shards with rate-limit backoff — expect ~1–3 minutes, and for older years the count is a lower bound (bounded: true). For fast formation counts by SSIC use the SingStatsg_formations_history/sg_formations_compare/sg_formations_monthlytools instead.
v0.4.1: sg_dataset_query no longer hangs on very large datasets
(size-gated server-side paging via datastore_search + a 60s ingest guard);
sg_fx_rate / sg_fx_history now accept ISO currency codes (USD, GBP,
JPY, EUR, …); sg_tourism_latest now emits data_freshness (its upstream
stops at 2014); and the _history tools return an available label list on a
no-match so callers can self-correct.
v0.4.0 highlights: data_freshness metadata block emitted on every
_latest tool — last_period, last_record_date, age_days, and a
categorical level of fresh / ok / stale / frozen so agents can
detect when an upstream data.gov.sg feed has gone silent. Fixes silent
stale-data on sg_disease_latest (MOH stopped publishing the Weekly
Infectious Disease Bulletin via data.gov.sg around epi week 2022-W52).
v0.3.2: Monthly business formations + cessations + net growth tools via SingStat Table Builder. Track month-by-month company creation vs closure for any SSIC industry. 74 tools total.
v0.3.1: Annual formation counts by industry via SingStat Table Builder.
v0.3.0: 8 new datasets, CLI mode, ASCII sparkline visualization, cross-dataset correlation queries, natural language query routing.
Data freshness
@altronis/sgdata-mcp is only as fresh as data.gov.sg. Some datasets are
updated weekly (COE bidding, CPI), some monthly (unemployment, CPI sub-items),
some quarterly (URA private property), and some have effectively stopped
updating. Starting in v0.4.0 every _latest tool returns a data_freshness
block so you can detect drift programmatically:
Known frozen datasets (as of v0.4.1):
If you find another upstream feed has gone silent, please open an issue — we'll add it to this table and surface the warning in the tool description.
What you can ask Claude
Drop this server into Claude Desktop and you immediately unlock questions like:
- "Find all AI/ML companies (SSIC 62019) incorporated in Singapore in 2025."
- "What's the median resale price of 4-room HDB flats in Punggol over the last 6 months?"
- "What is the latest COE Category A premium, and how has it trended over 12 months?"
- "How many dengue cases were reported this week?"
- "What's Singapore's unemployment rate? Show me the trend."
- "Compare GDP growth vs crime rates over the last 5 years."
- "How many scam cases were recorded in 2024?"
- "What is Singapore's population and how fast is it growing?"
- "How much electricity did Singapore generate last month?"
- "Are birth rates declining? Show me the last 12 months."
- "What were Singapore's tourism receipts by component?"
- "Find hawker centres near Tampines."
- "Which CPI categories are running hottest vs headline inflation?"
- "Look up DBS Bank by UEN 196800306E."
Your model picks the right tool, fills in the filters, and returns structured rows. You never write a URL.
Quick start
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
(macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Restart Claude Desktop. The 74 sg_* tools appear in the MCP tools menu.
Cursor
Add to ~/.cursor/mcp.json:
Claude Code
CLI mode (new in v0.3.0)
Query Singapore data directly from the terminal — no MCP client needed:
Standalone (kick the tyres)
What's in the box
Datasets (24)
Plus 3 generic fallback tools, 1 visualization tool, 2 cross-dataset tools, and 1 natural language query tool: 74 tools. The 6 real-time feeds and 7 SingStat tables from v0.5.0 bring it to 87 data tools, plus the 2 helpers from v0.5.5.
New in v0.3.0
Data visualization — sg_visualize
Generate ASCII sparkline charts and summary statistics from any time series. Returns sparklines, min/max/mean/latest, period-over-period change, and chart-ready JSON for frontend rendering.
Cross-dataset queries — sg_cross_dataset
Compare any two datasets side-by-side over time. Automatically aligns different time granularities (monthly, quarterly, annual):
Returns aligned rows with both values for correlation analysis.
Natural language queries — sg_ask
Ask questions in plain English — the tool routes to the right dataset automatically:
CLI mode — no MCP client needed
Query data directly from your terminal:
Tools (87 + 2 helpers)
The tables below list 74 of them; the 13 added in v0.5.0 are listed at the top.
Meta tools
Generic tools — any data.gov.sg dataset
Curated dataset tools (67)
ACRA (3): sg_acra_search_entities, sg_acra_get_entity, sg_acra_formations_by_ssic
HDB Resale (2): sg_hdb_resale_search, sg_hdb_resale_stats
COE (3): sg_coe_latest, sg_coe_history, sg_coe_demand_supply
MOE Schools (3): sg_moe_search_schools, sg_moe_school_by_name, sg_moe_schools_near
HDB Carparks (3): sg_hdb_carpark_lookup, sg_hdb_carparks_by_address, sg_hdb_carparks_by_type
GDP (3): sg_gdp_latest, sg_gdp_history, sg_gdp_industry_compare
CPI (3): sg_cpi_latest, sg_cpi_history, sg_cpi_yoy
Income (2): sg_median_income_lookup, sg_median_income_history
Employment (3): sg_employment_by_sector, sg_employment_sector_history, sg_employment_growth
URA Property (3): sg_ura_private_txn_latest, sg_ura_private_txn_history, sg_ura_new_sale_pipeline
Visitor Arrivals (3): sg_visitors_latest, sg_visitors_history, sg_visitors_top_sources
Retail Sales (3): sg_retail_sales_latest, sg_retail_sales_history, sg_retail_sales_yoy
MAS FX (3): sg_fx_rate, sg_fx_history, sg_fx_basket
IRAS Tax (3): sg_iras_collection, sg_iras_collection_history, sg_iras_tax_mix
ECDA Childcare (3): sg_ecda_search_centres, sg_ecda_centres_near, sg_ecda_vacancy_summary
Unemployment (2): sg_unemployment_latest, sg_unemployment_history
Population (2): sg_population_latest, sg_population_history
Disease/Health (3): sg_disease_latest, sg_disease_trend, sg_disease_list
Electricity (2): sg_electricity_latest, sg_electricity_history
Births (2): sg_births_latest, sg_births_history
Crime (3): sg_crime_latest, sg_crime_history, sg_crime_compare
Tourism (2): sg_tourism_latest, sg_tourism_history
Hawker Centres (2): sg_hawker_search, sg_hawker_stats
Business Formations & Cessations (6): sg_formations_latest, sg_formations_history, sg_formations_compare, sg_formations_monthly, sg_cessations_monthly, sg_net_formations
Architecture
Caching policy
- Location.
~/.sgdata-mcp/sgdata.sqliteby default. - Override. Set
SGDATA_MCP_CACHE_DIR=/custom/path. - Refresh cadence. Per-dataset — daily for ECDA, weekly for HDB/COE/disease, monthly for ACRA/CPI/GDP/FX/retail/visitors/births/electricity, quarterly for MOE/URA/employment/unemployment, annually for IRAS/income/crime/population/tourism.
- Wipe.
rm ~/.sgdata-mcp/sgdata.sqlite— next query rebuilds. - Disk. ~480 MB with ACRA, under 20 MB without.
Comparison
Both packages complement each other — install both for the full picture.
Disclaimer
This tool fetches and caches data from data.gov.sg. While we take care to preserve data integrity during ingestion, you should independently verify any data before making decisions based on it.
- Data accuracy. All data originates from Singapore government agencies via data.gov.sg. We do not alter source values, but column mappings, wide-to-long transformations, and caching may introduce discrepancies. Always cross-check critical figures against the official source.
- Not professional advice. This tool is not a substitute for professional financial, legal, medical, or policy advice. GDP figures, crime statistics, disease counts, property prices, and other data are provided for informational purposes only.
- Staleness. Cached data may be hours to weeks behind the source depending
on the dataset's refresh window. Check
ingestedAttimestamps if freshness matters. - No warranty. This software is provided "as is" under the MIT licence, without warranty of any kind.
FAQ
Do I need an API key? No. data.gov.sg open datasets are public.
Where is the data stored? On your machine, in ~/.sgdata-mcp/sgdata.sqlite.
How often is data refreshed? Per-dataset, from daily to annually.
Is this production-ready? Yes. 87 tools, all tested against live data. File issues on GitHub if you hit anything sharp.
Can I add my own dataset? Yes — either use the generic tools for ad-hoc
queries, or open a PR adding a handler under src/datasets/.
License
MIT
Attribution
Contains information from data.gov.sg under the Singapore Open Data Licence v1.0.
Contributing
Found a bug? Want a dataset added? Open an issue or PR on GitHub.
來源:README.md,提交 5703b72
工具
0版本歷史
1- v0.5.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分