sgdata-mcp

v0.5.2
io.github.sypherin/sgdata-mcp Checked 2 days ago Published 4 months ago

Singapore government data for AI agents: ACRA, HDB, COE, URA, SingStat, MAS, IRAS.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

sg_search_datasets

Search 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.

ParameterTypeDescription
query *string
agencystring
formatstring
limitinteger

sg_dataset_schema

Fetch 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.

ParameterTypeDescription
datasetId *string

sg_dataset_query

Query 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.

ParameterTypeDescription
datasetId *string
filtersobject
likeobject
limitinteger
offsetinteger

sg_acra_search_entities

Search 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.

ParameterTypeDescription
incorporated_afterstring
incorporated_beforestring
limitinteger
offsetinteger
postal_code_prefixstring
querystring
ssic_prefixstring
statusstring

sg_acra_get_entity

Look 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.

ParameterTypeDescription
uen *string

sg_acra_formations_by_ssic

Count 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.

ParameterTypeDescription
ssic_prefix *string
year *

sg_hdb_resale_stats

Aggregate HDB resale statistics (count, median, mean, min, max resale price) for a filtered slice. Filters: town, flat_type, month range.

ParameterTypeDescription
flat_typestring
month_fromstring
month_tostring
townstring

sg_coe_latest

Get 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.

ParameterTypeDescription
vehicle_classstring

sg_coe_history

COE premium time series for a single vehicle category. Returns bidding exercises in chronological order (oldest first), optionally trimmed to the last N months.

ParameterTypeDescription
vehicle_class *string
months_backinteger

sg_coe_demand_supply

COE oversubscription ratio (bids_received / quota) for a single vehicle category over the last N months. Values > 1.0 indicate bids exceeded quota.

ParameterTypeDescription
vehicle_class *string
months_backinteger

sg_moe_search_schools

Search 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.

ParameterTypeDescription
giftedboolean
levelstring
limitinteger
offsetinteger
querystring
sapboolean
zonestring

sg_moe_school_by_name

Exact-match lookup for a single MOE school by full school_name. Falls back to the closest substring match if no exact hit.

ParameterTypeDescription
name *string

sg_moe_schools_near

Find 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.

ParameterTypeDescription
postal_code *string
prefix_lengthinteger

sg_hdb_carpark_lookup

Exact-match lookup for a single HDB carpark by car_park_no (e.g. 'BJ55', 'ACB'). Returns all reference columns for that carpark.

ParameterTypeDescription
car_park_no *string

sg_hdb_carparks_by_address

Substring search over HDB carpark addresses. Useful for 'find all carparks in Tampines' or 'carparks on Ang Mo Kio Ave 3'.

ParameterTypeDescription
query *string
limitinteger

sg_hdb_carparks_by_type

Filter 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').

ParameterTypeDescription
car_park_typestring
free_parkingstring
has_night_parkingboolean
limitinteger
offsetinteger

sg_gdp_latest

Get 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'.

ParameterTypeDescription
industrystring

sg_gdp_history

Time 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.

ParameterTypeDescription
industry *string
quarters_backinteger

sg_gdp_industry_compare

Rank all industries by YoY growth for a given quarter (e.g. '2025Q4', '20254Q'). Returns every industry row with its growth value, sorted descending.

ParameterTypeDescription
quarter *string

sg_cpi_latest

Most recent CPI index value and YoY change for a matching sub-index (substring match on DataSeries). Defaults to 'All Items'.

ParameterTypeDescription
categorystring

sg_cpi_history

Monthly 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.

ParameterTypeDescription
category *string
months_backinteger

sg_cpi_yoy

Year-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'.

ParameterTypeDescription
category *string
monthstring

sg_median_income_lookup

Look up median monthly income by year and/or sex. If year is omitted, returns the most recent year. sex values: 'Males', 'Females', 'Total'.

ParameterTypeDescription
sexstring
yearinteger

sg_median_income_history

Annual 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.

ParameterTypeDescription
sexstring
years_backinteger

sg_employment_by_sector

Employment 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.

ParameterTypeDescription
sectorstring
yearinteger

sg_employment_sector_history

Employment time series for a single sector (substring match on DataSeries), oldest-to-newest. Optionally trimmed to last N years.

ParameterTypeDescription
sector *string
years_backinteger

sg_employment_growth

Percent change in employment for a sector between two years (substring match on DataSeries).

ParameterTypeDescription
base_year *integer
sector *string
target_year *integer

sg_ura_private_txn_latest

Latest quarter of URA private residential transactions, broken down by type_of_sale and sale_status.

sg_ura_private_txn_history

URA private residential transaction volumes over time, optionally filtered to a single type_of_sale ('New Sale', 'Sub-Sale', 'Resale'). Oldest-to-newest, optionally trimmed.

ParameterTypeDescription
quarters_backinteger
type_of_salestring

sg_ura_new_sale_pipeline

New sale volume only, quarter-by-quarter, for pipeline analysis. Returns summed units per quarter across all sale_status values.

ParameterTypeDescription
quarters_backinteger

sg_visitors_latest

Most recent monthly visitor arrivals for a matching source country (substring match). Defaults to 'Total International Visitor Arrivals'.

ParameterTypeDescription
countrystring

sg_visitors_history

Monthly 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.

ParameterTypeDescription
countrystring
months_backinteger

sg_visitors_top_sources

Top N source countries by visitor arrivals for a given month. If month is omitted, uses the most recent month. Excludes the 'Total' row.

ParameterTypeDescription
monthstring
ninteger

sg_retail_sales_latest

Most recent retail sales index value for a matching sub-industry (substring match on DataSeries). Defaults to 'Total'.

ParameterTypeDescription
categorystring

sg_retail_sales_history

Monthly retail sales index time series for a sub-industry. Defaults to 'Total'. Returns oldest-to-newest, trimmed to last N months if given.

ParameterTypeDescription
categorystring
months_backinteger

sg_retail_sales_yoy

Year-on-year percent change in retail sales index for a sub-industry in a given month (defaults to most recent month).

ParameterTypeDescription
category *string
monthstring

sg_fx_rate

Monthly 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.

ParameterTypeDescription
currency *string
monthstring

sg_fx_history

Monthly SGD rate time series for a single currency. Returns oldest-to-newest, trimmed to last N months.

ParameterTypeDescription
currency *string
months_backinteger

sg_fx_basket

All major SGD currency pairs for a single month. If month is omitted, uses the most recent month.

ParameterTypeDescription
monthstring

sg_iras_collection

Look up IRAS tax collection by tax_type (substring match) and/or financial_year. If both omitted, returns the most recent year's full breakdown.

ParameterTypeDescription
financial_yearstring
tax_typestring

sg_iras_collection_history

Annual tax collection time series for a single tax_type (substring match). Oldest-to-newest, trimmed to last N years.

ParameterTypeDescription
tax_type *string
years_backinteger

sg_iras_tax_mix

Percentage breakdown of IRAS total collection by tax type for a given financial_year.

ParameterTypeDescription
financial_year *string

sg_ecda_search_centres

Search 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.

ParameterTypeDescription
has_infant_vacancyboolean
limitinteger
offsetinteger
postal_prefixstring
querystring
service_modelstring
spark_certifiedboolean

sg_ecda_centres_near

Find childcare centres whose postal_code shares a prefix with the supplied postal_code (default prefix length 2 — postal sector).

ParameterTypeDescription
postal_code *string
prefix_lengthinteger

sg_ecda_vacancy_summary

Aggregate 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.

ParameterTypeDescription
level *string
postal_prefixstring

sg_unemployment_latest

Get the most recent quarterly unemployment rates for Singapore. Returns seasonally adjusted and unadjusted rates by residential status (overall, residents, citizens).

ParameterTypeDescription
residential_statusstring

sg_unemployment_history

Unemployment 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.

ParameterTypeDescription
residential_status *string
quarters_backinteger

sg_population_latest

Get 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.

ParameterTypeDescription
indicatorstring

sg_population_history

Annual time series for a single population indicator (e.g. 'Total Population'). Returns oldest-to-newest, optionally trimmed to last N years.

ParameterTypeDescription
indicator *string
years_backinteger

sg_disease_latest

Get 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.

ParameterTypeDescription
diseasestring

sg_disease_trend

Weekly case count trend for a specific disease (e.g. 'Dengue Fever', 'HFMD'). Returns oldest-to-newest, optionally trimmed to last N weeks.

ParameterTypeDescription
disease *string
weeks_backinteger

sg_disease_list

List all diseases tracked in the Weekly Infectious Disease Bulletin with their total case counts across all weeks.

sg_electricity_latest

Get the most recent month's electricity generation figures by source. Optionally filter by source (e.g. 'Total', 'Gas').

ParameterTypeDescription
sourcestring

sg_electricity_history

Monthly 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.

ParameterTypeDescription
source *string
months_backinteger

sg_births_latest

Get the most recent month's live-birth counts by sex and ethnic group. Optionally filter by category (e.g. 'Total', 'Males', 'Chinese').

ParameterTypeDescription
categorystring

sg_births_history

Monthly live-birth count time series for a category (e.g. 'Total Live-Births'). Returns oldest-to-newest.

ParameterTypeDescription
category *string
months_backinteger

sg_crime_latest

Get the most recent year's crime case counts by type. Optionally filter by crime type (substring match, e.g. 'Robbery', 'Cheating', 'Scam').

ParameterTypeDescription
crime_typestring

sg_crime_history

Annual crime case count time series for a specific crime type (e.g. 'Total Crimes', 'Cheating'). Returns oldest-to-newest.

ParameterTypeDescription
crime_type *string
years_backinteger

sg_crime_compare

Rank all crime types by case count for a given year. Returns every crime type sorted descending by number of cases.

ParameterTypeDescription
year *string

sg_tourism_latest

Get the most recent year's tourism receipts breakdown by component (shopping, accommodation, F&B, transport, etc.).

sg_tourism_history

Tourism receipts time series for a specific component (e.g. 'Shopping', 'Accommodation', 'Food & Beverage'). Returns annual data oldest-to-newest.

ParameterTypeDescription
component *string
years_backinteger

sg_hawker_stats

Summary statistics of all hawker centres — total count, breakdown by type, total stalls nationwide.

sg_formations_latest

Get 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.

ParameterTypeDescription
top_nintegerReturn top N industries by formation count. Default 15.
yearstring | numberYear to query (e.g. 2025). Defaults to latest available.

sg_formations_history

Get 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.

ParameterTypeDescription
ssic *stringSSIC code to query (e.g. '62' for Computer Programming/IT, '70' for Management Consultancy, 'Total' for all industries).
years_backintegerLimit to last N years. Default: all available.

sg_formations_compare

Compare business formation counts across multiple industries for a given year. Great for spotting which sectors are growing fastest. Optionally filter by SSIC codes.

ParameterTypeDescription
ssic_codesarrayList of SSIC codes to compare (e.g. ['62', '70', '47']). If omitted, returns all industries sorted by formations.
yearstring | numberYear to compare. Defaults to latest available.

sg_formations_monthly

Get 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.

ParameterTypeDescription
months_backintegerLimit to last N months. Default 24.
ssicstringSSIC code (e.g. '62' for IT, '70' for Management Consultancy). Default 'Total' for all industries.

sg_cessations_monthly

Get 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.

ParameterTypeDescription
months_backintegerLimit to last N months. Default 24.
ssicstringSSIC code (e.g. '62' for IT, '70' for Management Consultancy). Default 'Total' for all industries.

sg_net_formations

Get 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.

ParameterTypeDescription
months_backintegerLimit to last N months. Default 24.
ssicstringSSIC code (e.g. '62' for IT). Default 'Total' for all industries.

sg_household_income

Singapore 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).

ParameterTypeDescription
indicatorstringSeries to return (substring match). Examples: 'Median Monthly Household Market Income', 'Average Monthly Household Market Income Per Household Member', 'Gini'. Default = median income.
limitinteger
yearstring | number

sg_wages

Average monthly nominal earnings per employee in Singapore (overall economy). Annual time series, from MOM/DOS via SingStat (M182941).

ParameterTypeDescription
limitintegerNumber of recent periods to return in the series. Default 12.
yearstring | numberFilter to a specific year (e.g. 2024). Defaults to latest.

sg_deaths

Singapore 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.

ParameterTypeDescription
indicatorstring'Crude Death Rate' or 'Infant Mortality Rate'.
limitinteger
yearstring | number

sg_marriages

Singapore 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).

ParameterTypeDescription
indicatorstringSeries to return (substring match). Default 'Total Marriages'.
limitinteger
yearstring | number

sg_divorces

Singapore 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).

ParameterTypeDescription
indicatorstringSeries to return (substring match). Default 'Total Divorces And Annulments'.
limitinteger
yearstring | number

sg_trade

Singapore 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.

ParameterTypeDescription
limitintegerRecent months to return. Default 12.
segmentstringTrade segment. Default 'total'.
yearstring | number

sg_labour_force

Singapore 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).

ParameterTypeDescription
indicatorstringSeries to return (substring match). Default 'Total Resident Participation Rate'. Age bands like '25 - 29 Years' are available.
limitinteger
yearstring | number

sg_psi

Live 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_temperature

Live 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_rainfall

Live 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_forecast

NEA 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.

ParameterTypeDescription
areastring
horizonstring

sg_carpark_availability

Live 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).

ParameterTypeDescription
carpark_numberstring
limitinteger

sg_dengue_clusters

Active 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.

ParameterTypeDescription
min_casesinteger

sg_visualize

Generate 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.

ParameterTypeDescription
labels *array
values *array
titlestring
unitstring

sg_cross_dataset

Compare 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.

ParameterTypeDescription
dataset_a *stringID or name of the first dataset (e.g. 'gdp_yoy', 'unemployment')
dataset_b *stringID or name of the second dataset (e.g. 'cpi_monthly', 'crime')
limitinteger

sg_list_datasets

List 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_ask

Ask 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'.

ParameterTypeDescription
question *stringNatural language question about Singapore data, e.g. 'What is the latest unemployment rate?' or 'How many dengue cases this week?'