Enables AI agents to query Singapore government open data including corporate registries, real estate, labor, and real-time environmental feeds.
Also known as sypherin/sgdata-mcp, @altronis/sgdata-mcp
- Stars
- 0
- Tools
- 87
- Downloads, 30 days
- 590
- Latest version
- 0.5.2
- Last commit
- Nov 9, 2026
- License
- MIT
What is sgdata MCP?
sgdata enables AI agents to query Singapore government open data including corporate registries, real estate, labor, and real-time environmental feeds. It exposes 87 tools, such as sg_search_datasets, sg_dataset_schema, sg_dataset_query.
Summary generated from the project's README
About sgdata MCP server
Accessing Singapore government open data through AI agents is what this server enables. It provides a direct connection to data.gov.sg, allowing users to query information regarding corporate registries, real estate, labor markets, and environmental metrics. The server operates as a local stdio process on your machine and requires no API keys to function. It is compatible with clients like Claude Desktop, Cursor, and Continue.
Developers can utilize 87 specialized tools to retrieve information from 24 curated datasets, 7 SingStat tables, and 6 live real-time feeds. While small datasets are cached locally in a SQLite database, larger datasets like ACRA or HDB resale prices are queried server-side to save disk space. The server includes unique capabilities such as the sg_visualize tool for generating ASCII sparklines and the sg_cross_dataset tool for comparing different data series. For users who prefer the terminal, a CLI mode allows for natural language queries without needing a full MCP client.
What you can do with it
- 1Analyze business formation trendsA developer can track monthly company creations and closures for specific industries using SingStat tools.
- 2Correlate economic indicatorsUsers can compare two different datasets side-by-side to perform correlation analysis.
- 3Visualize time series dataAn AI client can generate ASCII sparkline charts and summary statistics from numeric series.
Written from the project's README. Every use case is checked against a quote from it.
How to install sgdata MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall sgdata MCP in Claude Code
$ claude mcp add sgdata-mcp -- npx -y @altronis/sgdata-mcpInstall sgdata MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"sgdata-mcp": {
"command": "npx",
"args": [
"-y",
"@altronis/sgdata-mcp"
]
}
}
}Install sgdata MCP in VS Code
.vscode/mcp.json
{
"servers": {
"sgdata-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@altronis/sgdata-mcp"
]
}
}
}Install sgdata MCP in VS Code CLI
$ code --add-mcp '{"name":"sgdata-mcp","type":"stdio","command":"npx","args":["-y","@altronis/sgdata-mcp"]}'Install sgdata MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"sgdata-mcp": {
"command": "npx",
"args": [
"-y",
"@altronis/sgdata-mcp"
]
}
}
}Install sgdata MCP in Codex
$ codex mcp add sgdata-mcp -- npx -y @altronis/sgdata-mcpInstall sgdata MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.sgdata-mcp] command = "npx" args = ["-y", "@altronis/sgdata-mcp"]
Install sgdata MCP in Gemini CLI
$ gemini mcp add -s user sgdata-mcp npx -- -y @altronis/sgdata-mcpInstall sgdata MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"sgdata-mcp": {
"command": "npx",
"args": [
"-y",
"@altronis/sgdata-mcp"
]
}
}
}Started by HostedMCP on 16 Nov 2026
We ran this command for @altronis/sgdata-mcp 0.5.2 in an isolated container with no network and no keys. It answered and listed 87 tools.
sgdata MCP tools 87
Read from the server with tools/listsg_search_datasetsSearch data.gov.sg for datasets matching a free-text keyword query. Returns dataset IDs and high-level metadata (name, agency, format, row count, last updated). Use this to discover datasets when no curated sg_* tool exists, then pass the datasetId into sg_dataset_schema or sg_dataset_query. Supports optional agency and format filters.
sg_dataset_schemaFetch the column schema and metadata for any data.gov.sg dataset by ID. Returns the human column labels (use these as filter keys for sg_dataset_query), agency, format, size, and last updated timestamp. Cheap call — does not download the dataset itself.
sg_dataset_queryQuery any data.gov.sg dataset by ID with simple exact-match and substring (LIKE) filters, paginated. Automatically downloads and caches the dataset locally on first use, refreshing if the cache is older than 30 days. Filter keys must be the human column labels from sg_dataset_schema.
sg_acra_search_entitiesSearch the curated ACRA corporate registry resource server-side (via datastore_search; no local ingest). Filters: free-text substring on entity_name (`query`), SSIC prefix (`ssic_prefix`, e.g. '62' for IT), exact entity status (`status`, e.g. 'Live Company'), incorporation date window (`incorporated_after` / `incorporated_before`, YYYY-MM-DD), and postal code prefix (`postal_code_prefix`). query+status are pushed server-side; SSIC/postal/date predicates are refined client-side on the bounded fetched subset. Sorted by entity_name, paginated via limit/offset.
sg_acra_get_entityLook up a single ACRA corporate entity by exact UEN via a server-side datastore_search exact-match query (no local ingest). Returns the full row including entity name, type, status, SSIC, and address, or `found: false` if no match.
sg_acra_formations_by_ssicCount ACRA corporate entity formations for a given SSIC prefix and calendar year. Useful for macro questions like 'how many fintech (SSIC 64) companies were incorporated in 2025'. Returns the match count plus a 25-row sample sorted by incorporation date.
sg_hdb_resale_searchSearch HDB resale flat transactions (Jan 2017+). Filters: town, flat_type (e.g. '4 ROOM'), month range (YYYY-MM), price range. Returns paginated transaction rows.
sg_hdb_resale_statsAggregate HDB resale statistics (count, median, mean, min, max resale price) for a filtered slice. Filters: town, flat_type, month range.
sg_coe_latestGet the most recent COE bidding result per vehicle category. If vehicle_class is supplied (e.g. 'Category A'), returns just that one; otherwise returns the latest exercise across all categories.
sg_coe_historyCOE premium time series for a single vehicle category. Returns bidding exercises in chronological order (oldest first), optionally trimmed to the last N months.
sg_coe_demand_supplyCOE oversubscription ratio (bids_received / quota) for a single vehicle category over the last N months. Values > 1.0 indicate bids exceeded quota.
sg_moe_search_schoolsSearch MOE-registered schools by name substring, mainlevel (PRIMARY/SECONDARY/MIXED LEVELS/JUNIOR COLLEGE/CENTRALISED INSTITUTE), zone (NORTH/SOUTH/EAST/WEST), SAP status, and Gifted Education Programme status.
Show all 87 toolsShow fewer tools
sg_moe_school_by_nameExact-match lookup for a single MOE school by full school_name. Falls back to the closest substring match if no exact hit.
sg_moe_schools_nearFind schools whose postal_code shares a prefix with the supplied postal_code. Default prefix length is 2 (Singapore postal sector). Not a true geographic radius — use this as a cheap proximity proxy.
sg_hdb_carpark_lookupExact-match lookup for a single HDB carpark by car_park_no (e.g. 'BJ55', 'ACB'). Returns all reference columns for that carpark.
sg_hdb_carparks_by_addressSubstring search over HDB carpark addresses. Useful for 'find all carparks in Tampines' or 'carparks on Ang Mo Kio Ave 3'.
sg_hdb_carparks_by_typeFilter HDB carparks by type (e.g. 'MULTI-STOREY CAR PARK', 'SURFACE CAR PARK'), night_parking availability, or free_parking text (e.g. 'SUN & PH FR 7AM-10.30PM').
sg_gdp_latestGet the most recent YoY GDP growth rate for a matching industry (substring match on DataSeries, e.g. 'Manufacturing'). Omit industry to get the headline 'GDP At Constant 2015 Market Prices'.
sg_gdp_historyTime series of YoY GDP growth for a single industry (substring match on DataSeries). Returns oldest-to-newest, trimmed to the last N quarters if quarters_back is given.
sg_gdp_industry_compareRank all industries by YoY growth for a given quarter (e.g. '2025Q4', '20254Q'). Returns every industry row with its growth value, sorted descending.
sg_cpi_latestMost recent CPI index value and YoY change for a matching sub-index (substring match on DataSeries). Defaults to 'All Items'.
sg_cpi_historyMonthly CPI time series for a single sub-index (substring match on DataSeries). Returns oldest-to-newest, trimmed to last N months if months_back is given.
sg_cpi_yoyYear-on-year inflation rate for a single CPI sub-index in a given month. If month is omitted, uses the most recent month. Month format: '2026Feb' or '2026-Feb'.
sg_median_income_lookupLook up median monthly income by year and/or sex. If year is omitted, returns the most recent year. sex values: 'Males', 'Females', 'Total'.
sg_median_income_historyAnnual median income time series for a given sex ('Males', 'Females', or 'Total'). Returns oldest-to-newest, trimmed to last N years if years_back is given.
sg_employment_by_sectorEmployment counts by sector for a given year. If year is omitted, uses the most recent year. If sector is supplied, filters to rows whose DataSeries contains that substring.
sg_employment_sector_historyEmployment time series for a single sector (substring match on DataSeries), oldest-to-newest. Optionally trimmed to last N years.
sg_employment_growthPercent change in employment for a sector between two years (substring match on DataSeries).
sg_ura_private_txn_latestLatest quarter of URA private residential transactions, broken down by type_of_sale and sale_status.
sg_ura_private_txn_historyURA private residential transaction volumes over time, optionally filtered to a single type_of_sale ('New Sale', 'Sub-Sale', 'Resale'). Oldest-to-newest, optionally trimmed.
sg_ura_new_sale_pipelineNew sale volume only, quarter-by-quarter, for pipeline analysis. Returns summed units per quarter across all sale_status values.
sg_visitors_latestMost recent monthly visitor arrivals for a matching source country (substring match). Defaults to 'Total International Visitor Arrivals'.
sg_visitors_historyMonthly visitor arrivals time series for a source country. Defaults to 'Total International' if no country given. Returns oldest-to-newest, trimmed to last N months.
sg_visitors_top_sourcesTop N source countries by visitor arrivals for a given month. If month is omitted, uses the most recent month. Excludes the 'Total' row.
sg_retail_sales_latestMost recent retail sales index value for a matching sub-industry (substring match on DataSeries). Defaults to 'Total'.
sg_retail_sales_historyMonthly retail sales index time series for a sub-industry. Defaults to 'Total'. Returns oldest-to-newest, trimmed to last N months if given.
sg_retail_sales_yoyYear-on-year percent change in retail sales index for a sub-industry in a given month (defaults to most recent month).
sg_fx_rateMonthly SGD exchange rate for a given currency. Currency is matched as a substring against DataSeries (e.g. 'U S Dollar', 'Euro', 'Japanese Yen'). If month is omitted, returns the most recent month. Note the 'Per 100' note in the DataSeries label when present.
sg_fx_historyMonthly SGD rate time series for a single currency. Returns oldest-to-newest, trimmed to last N months.
sg_fx_basketAll major SGD currency pairs for a single month. If month is omitted, uses the most recent month.
sg_iras_collectionLook up IRAS tax collection by tax_type (substring match) and/or financial_year. If both omitted, returns the most recent year's full breakdown.
sg_iras_collection_historyAnnual tax collection time series for a single tax_type (substring match). Oldest-to-newest, trimmed to last N years.
sg_iras_tax_mixPercentage breakdown of IRAS total collection by tax type for a given financial_year.
sg_ecda_search_centresSearch ECDA childcare & kindergarten centres. Filters: name substring, postal_code prefix, service_model ('Childcare', 'Kindergarten', etc.), has_infant_vacancy (true = at least one infant slot), spark_certified.
sg_ecda_centres_nearFind childcare centres whose postal_code shares a prefix with the supplied postal_code (default prefix length 2 — postal sector).
sg_ecda_vacancy_summaryAggregate vacancy count for a given level (infant/pg/n1/n2/k1/k2), optionally restricted to a postal_code prefix. Returns total vacancies, centres with vacancy, and centres reviewed.
sg_unemployment_latestGet the most recent quarterly unemployment rates for Singapore. Returns seasonally adjusted and unadjusted rates by residential status (overall, residents, citizens).
sg_unemployment_historyUnemployment rate time series for a given residential status (e.g. 'Overall', 'Residents', 'Citizens'). Returns quarterly data oldest-to-newest, optionally trimmed to last N quarters.
sg_population_latestGet the most recent annual population figure for a matching indicator (substring match, e.g. 'Total Population', 'Median Age', 'Dependency Ratio'). Omit indicator to get all.
sg_population_historyAnnual time series for a single population indicator (e.g. 'Total Population'). Returns oldest-to-newest, optionally trimmed to last N years.
sg_disease_latestGet the most recent week's infectious disease case counts. Optionally filter by disease name (substring match, e.g. 'Dengue', 'HFMD', 'Tuberculosis'). KNOWN ISSUE: upstream MOH feed on data.gov.sg appears frozen since 2022-W52 — check the returned `data_freshness.level` field; `frozen` means cross-check moh.gov.sg.
sg_disease_trendWeekly case count trend for a specific disease (e.g. 'Dengue Fever', 'HFMD'). Returns oldest-to-newest, optionally trimmed to last N weeks.
sg_disease_listList all diseases tracked in the Weekly Infectious Disease Bulletin with their total case counts across all weeks.
sg_electricity_latestGet the most recent month's electricity generation figures by source. Optionally filter by source (e.g. 'Total', 'Gas').
sg_electricity_historyMonthly electricity generation time series for a given source (e.g. 'Total', 'Gas Turbine / Combined Cycle'). Returns oldest-to-newest, optionally trimmed to last N months.
sg_births_latestGet the most recent month's live-birth counts by sex and ethnic group. Optionally filter by category (e.g. 'Total', 'Males', 'Chinese').
sg_births_historyMonthly live-birth count time series for a category (e.g. 'Total Live-Births'). Returns oldest-to-newest.
sg_crime_latestGet the most recent year's crime case counts by type. Optionally filter by crime type (substring match, e.g. 'Robbery', 'Cheating', 'Scam').
sg_crime_historyAnnual crime case count time series for a specific crime type (e.g. 'Total Crimes', 'Cheating'). Returns oldest-to-newest.
sg_crime_compareRank all crime types by case count for a given year. Returns every crime type sorted descending by number of cases.
sg_tourism_latestGet the most recent year's tourism receipts breakdown by component (shopping, accommodation, F&B, transport, etc.).
sg_tourism_historyTourism receipts time series for a specific component (e.g. 'Shopping', 'Accommodation', 'Food & Beverage'). Returns annual data oldest-to-newest.
sg_hawker_searchSearch for hawker centres by name or location (substring match). Returns name, location, type, stall counts.
sg_hawker_statsSummary statistics of all hawker centres — total count, breakdown by type, total stalls nationwide.
sg_formations_latestGet the latest year's business formation counts by industry in Singapore. Shows how many new companies were registered in each SSIC sector. Data from ACRA via SingStat.
sg_formations_historyGet the historical time series of business formations for a specific industry/SSIC code. Returns annual counts from 1990 to present. Use SSIC code (e.g. '62' for IT) or 'Total' for all industries.
sg_formations_compareCompare business formation counts across multiple industries for a given year. Great for spotting which sectors are growing fastest. Optionally filter by SSIC codes.
sg_formations_monthlyGet monthly business formation counts for a specific industry or all industries (Total). Returns monthly time series from Jan 1990 to present. Data from ACRA via SingStat Table Builder.
sg_cessations_monthlyGet monthly business cessation (closure/deregistration) counts for a specific industry or all industries (Total). Returns monthly time series from Jan 1990 to present. Data from ACRA via SingStat Table Builder.
sg_net_formationsGet net business growth (formations minus cessations) by month for a specific industry or all industries. Positive = more companies created than closed. Data from ACRA via SingStat.
sg_household_incomeSingapore resident household income from work. Returns the median monthly household income (or, with `indicator`, a chosen series such as average income, a specific decile, or the Gini coefficient). Annual, from DOS via SingStat (M810871).
sg_wagesAverage monthly nominal earnings per employee in Singapore (overall economy). Annual time series, from MOM/DOS via SingStat (M182941).
sg_deathsSingapore mortality indicators: crude death rate and infant mortality rate. Annual, from DOS via SingStat (M810481). Use `indicator` to choose ('Crude Death Rate' or 'Infant Mortality Rate'); defaults to crude death rate.
sg_marriagesSingapore marriage statistics. Defaults to total marriages; use `indicator` for other series (e.g. 'First Marriages', 'Resident Marriages', 'Proportion Of Inter-Ethnic Marriages'). Annual, from DOS via SingStat (M830101).
sg_divorcesSingapore divorce statistics. Defaults to total divorces & annulments; use `indicator` for other series (e.g. 'Civil Divorces', 'Muslim Divorces', 'Median Duration Of Marriage For Divorces'). Annual, from DOS via SingStat (M830201).
sg_tradeSingapore total merchandise trade (imports + exports) by commodity section, monthly, in thousand dollars. Defaults to total trade; use `segment` to pick a sub-series: 'total' | 'oil' | 'non-oil' | 'petroleum' | 'oil-bunkers'. From EnterpriseSG/DOS via SingStat (M451001). Monthly series are fetched per-segment to avoid the API's cell limit.
sg_labour_forceSingapore resident labour force participation rate (LFPR), aged 15+. Defaults to the overall total rate; use `indicator` for an age band (e.g. '25 - 29 Years'). Annual (end-June), from MOM/DOS via SingStat (M182201).
sg_psiLive NEA Pollutant Standards Index (PSI) for Singapore. Returns the national headline 24-hour PSI (the highest regional reading, per NEA convention) plus a per-region breakdown (north/south/east/west/central) of 24-hour PSI and 24-hour PM2.5 concentration. Updated hourly.
sg_air_temperatureLive air temperature readings (deg C) from NEA weather stations across Singapore, with each station's name, coordinates and current value, plus an island-wide min/max/avg summary. Updated roughly every minute.
sg_rainfallLive 5-minute rainfall readings (mm) from NEA stations across Singapore. Returns every station's current reading plus the subset of stations that are actually reporting rain (value > 0). Updated every ~5 minutes.
sg_weather_forecastNEA weather forecast for Singapore. By default returns the 2-hour nowcast per area (47 named areas, e.g. 'Ang Mo Kio', 'Bedok'). Pass horizon='24h' for the 24-hour outlook (general day/night summary, temperature & humidity ranges, wind, and per-region time-block forecasts). Optional `area` substring filter applies to the 2-hour forecast.
sg_carpark_availabilityLive HDB/LTA carpark lot availability across Singapore (updated every minute). Returns each carpark's number, available vs total lots, lot type, and update time. Use `carpark_number` for a substring match on the carpark id (e.g. 'HE12', 'BM'), and `limit` to cap the number of carparks returned (default 50). Without filters the list is large (~1900 carparks).
sg_dengue_clustersActive NEA dengue clusters in Singapore (live). The legacy realtime endpoint is decommissioned (HTTP 403), so this pulls NEA's official 'Dengue Clusters (GEOJSON)' dataset and returns each cluster's locality, case count and centroid, sorted by case size, plus totals. Optional `min_cases` filters to larger clusters.
sg_visualizeGenerate an ASCII sparkline chart and summary statistics from a numeric time series. Pass labels (e.g. dates) and corresponding values. Returns sparkline, min/max/mean/latest, period-over-period change, and chart-ready JSON for frontend rendering.
sg_cross_datasetCompare two Singapore datasets side-by-side over time. Joins both datasets on their time dimension (year/quarter/month) and returns aligned rows for correlation analysis. Examples: compare GDP vs unemployment, CPI vs retail sales, births vs population. Use dataset short IDs like 'gdp_yoy', 'unemployment', 'cpi_monthly', 'crime', etc.
sg_list_datasetsList all available curated Singapore datasets with their IDs, names, and agencies. Use this to discover dataset IDs for sg_cross_dataset or other tools.
sg_askAsk a natural language question about Singapore government data. Automatically routes to the best matching tool. Examples: 'What is Singapore's GDP growth?', 'How many dengue cases?', 'Latest COE prices', 'Crime statistics'.
Automated checks
Ran Nov 16, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablesypherin/sgdata-mcp is public and reachablegithub.com/sypherin/sgdata-mcp ↗Pass
- Package names this repository as its source@altronis/sgdata-mcp names sypherin/sgdata-mcp as sourcenpmjs.com/package/@altronis/sgdata-mcp ↗Pass
- Build provenance (Sigstore attestation)No build attestation published for this releaseNot checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-09github.com/sypherin/sgdata-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from @altronis/sgdata-mcpPass
- No critical advisory in the package or its dependencies135 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model87 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHub@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
@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:
{
"datasetId": "d_ca168b2cb763640d72c4600a68f9909e",
"epi_week": "2022-W52",
"cases": [...],
"data_freshness": {
"last_period": "2022-W52",
"last_record_date": "2023-01-01",
"age_days": 1234,
"level": "frozen",
"warning": "Upstream dataset appears frozen — latest record is 2022-W52..."
}
}
Known frozen datasets (as of v0.4.1):
| Tool | Upstream dataset | Last update | Recommended action |
|---|---|---|---|
sg_disease_latest, sg_disease_trend, sg_disease_list |
MOH Weekly Infectious Disease Bulletin | 2022-W52 | Cross-check moh.gov.sg weekly bulletin PDFs. PRs welcome to swap in a live source. |
sg_tourism_latest, sg_tourism_history |
STB Annual Tourism Receipts | 2014 | Cross-check stb.gov.sg / SingStat for newer receipts. PRs welcome. |
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):
{
"mcpServers": {
"sg-data": {
"command": "npx",
"args": ["-y", "@altronis/sgdata-mcp"]
}
}
}
Restart Claude Desktop. The 74 sg_* tools appear in the MCP tools menu.
Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"sg-data": {
"command": "npx",
"args": ["-y", "@altronis/sgdata-mcp"]
}
}
}
Claude Code
claude mcp add sg-data -- npx -y @altronis/sgdata-mcp
CLI mode (new in v0.3.0)
Query Singapore data directly from the terminal — no MCP client needed:
# Natural language query
npx @altronis/sgdata-mcp query "What is Singapore's unemployment rate?"
npx @altronis/sgdata-mcp query "How many dengue cases this week?"
npx @altronis/sgdata-mcp query "Latest COE prices"
# Call a specific tool
npx @altronis/sgdata-mcp tool sg_crime_compare '{"year":"2024"}'
npx @altronis/sgdata-mcp tool sg_hawker_search '{"query":"bedok"}'
# List available tools and datasets
npx @altronis/sgdata-mcp list
npx @altronis/sgdata-mcp datasets
Standalone (kick the tyres)
# Run the MCP server directly
npx -y @altronis/sgdata-mcp
# Smoke-test via stdio
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| npx -y @altronis/sgdata-mcp
What's in the box
Datasets (24)
| # | Dataset | Agency | Tools |
|---|---|---|---|
| 1 | ACRA Corporate Entities (~2M+) | ACRA | 3 |
| 2 | HDB Resale Flat Prices (2017+) | HDB | 2 |
| 3 | COE Bidding Results | LTA | 3 |
| 4 | MOE Schools | MOE | 3 |
| 5 | HDB Carpark Information | HDB | 3 |
| 6 | GDP YoY Growth (quarterly) | SingStat | 3 |
| 7 | Consumer Price Index (monthly) | SingStat | 3 |
| 8 | MOM Median Gross Monthly Income | MOM | 2 |
| 9 | Employment by Sector (annual) | SingStat | 3 |
| 10 | URA Private Residential Transactions | URA | 3 |
| 11 | International Visitor Arrivals | STB | 3 |
| 12 | Retail Sales Index (monthly) | SingStat | 3 |
| 13 | MAS Exchange Rates (monthly avg) | MAS | 3 |
| 14 | IRAS Tax Collection (annual) | IRAS | 3 |
| 15 | ECDA Childcare & Kindergarten Centres | ECDA | 3 |
| 16 | Unemployment Rate (quarterly) | MOM | 2 |
| 17 | Population Indicators (annual) | SingStat | 2 |
| 18 | Infectious Disease Cases (weekly) | MOH | 3 |
| 19 | Electricity Generation (monthly) | EMA | 2 |
| 20 | Live-Births by Sex/Ethnicity (monthly) | SingStat | 2 |
| 21 | Crime Cases Recorded (annual) | SPF | 3 |
| 22 | Tourism Receipts (annual) | STB | 2 |
| 23 | Government Hawker Centres | NEA | 2 |
| 24 | Business Entity Formations & Cessations | ACRA/DOS | 6 |
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.
SG Unemployment Rate (SA): ▁█████▄▄████
Latest: 2 % | Change: +0 (+0%) | Range: 1.8–2 | Mean: 1.97
Cross-dataset queries — sg_cross_dataset
Compare any two datasets side-by-side over time. Automatically aligns different time granularities (monthly, quarterly, annual):
{
"dataset_a": "cpi_monthly",
"dataset_b": "retail_sales",
"limit": 5
}
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:
"What is Singapore's unemployment rate?" → sg_unemployment_latest
"How many dengue cases?" → sg_disease_latest
"COE prices" → sg_coe_latest
"Crime statistics" → sg_crime_latest
CLI mode — no MCP client needed
Query data directly from your terminal:
sgdata-cli query "Singapore population growth"
sgdata-cli tool sg_crime_compare '{"year":"2024"}'
sgdata-cli datasets
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
| Tool | Description |
|---|---|
sg_tool_catalog |
List the tools with descriptions; filter by keyword to get their input schemas |
sg_dispatch |
Call any tool by name with a JSON args object, checked against that tool's schema |
sg_ask |
Natural language query — ask any question about Singapore data in plain English |
sg_visualize |
ASCII sparkline + summary stats + chart-ready JSON from any numeric series |
sg_cross_dataset |
Compare two datasets over time with automatic period alignment |
sg_list_datasets |
List all 24 curated datasets with IDs, names, and agencies |
Generic tools — any data.gov.sg dataset
| Tool | Description |
|---|---|
sg_search_datasets |
Full-text discovery across all data.gov.sg datasets |
sg_dataset_schema |
Column labels, agency, format for any dataset ID |
sg_dataset_query |
Query any dataset with filters, auto-downloads and caches |
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
┌─────────────────┐ spawn ┌──────────────────────┐
│ Claude Desktop │ ──────────▶ │ sgdata-mcp (node) │
│ /Cursor/Code │ ◀── stdio ─▶│ runs on your machine │
└─────────────────┘ └──────┬───────────────┘
│ HTTPS (first fetch only)
▼
api.data.gov.sg/v2/...
│
▼
~/.sgdata-mcp/sgdata.sqlite
(shared local SQLite cache)
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
@altronis/sgdata-mcp |
sgdata-mcp (by vdineshk) |
|
|---|---|---|
| Tools | 74 | 5 |
| Coverage | Corporate registry, real estate, prices, labour, tourism, FX, tax, public services, crime, health, demographics, energy | Real-time weather, traffic, carpark availability |
| CLI mode | Yes | No |
| Data visualization | Yes (sparklines + chart-ready JSON) | No |
| Cross-dataset queries | Yes | No |
| NL query routing | Yes | No |
| Caching | Yes (SQLite) | No |
| API keys | None | None |
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.
sgdata MCP questions
How do I add sgdata MCP to Claude Code?
Run claude mcp add sgdata-mcp -- npx -y @altronis/sgdata-mcp in your terminal. Add --scope user to make it available in every project.
How do I add sgdata MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does sgdata MCP provide?
It exposes 87 tools, including sg_search_datasets, sg_dataset_schema, sg_dataset_query, sg_acra_search_entities, sg_acra_get_entity.
Does this server require API keys?
No, the server runs as a local stdio process and does not require any API keys.
How can I use this without an MCP client?
You can use the CLI mode to query Singapore data directly from your terminal using natural language or specific tool calls.
Can the server visualize data?
Yes, it includes a visualization tool that generates ASCII sparkline charts and summary statistics from time series data.
How does the server handle large datasets like ACRA or HDB resale?
It queries them server-side using datastore_search so that large datasets are not downloaded entirely to your local disk.