sg-gov-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
sg-gov-mcp
An MCP (Model Context Protocol) server over Singapore government open data. One server, many agencies behind a uniform tool interface: NEA weather and environment readings, taxi and carpark availability now, LTA transport, OneMap geocoding, and dataset search in later phases.
Idea: following the "sell the MCP layer, not the agent" argument, the durable
asset is a reliable, rate-limit-respecting MCP server over valuable public
data. This repo is the long-term horizontal build: plan in docs/PLAN.md,
measured rate-limit evidence in docs/RATE-LIMITS.md.
Status: iteration 1 (2026-11-20)
12 live tools over two keyless API families (data.gov.sg v2 real-time, legacy api.data.gov.sg v1), plus 2 meta tools (
sg_list_sources,sg_rate_limit_status).Dependency-free Node (>= 18, uses built-in
fetch). Stdio transport.Rate limits are always obeyed: conservative client-side buckets below documented limits, caching, and a single 10-second back-off on 429. No workarounds, ever.
Related MCP server: data-gov-sg
Run
No install step, no dependencies:
node src/server.js # speaks MCP over stdio
node test/mcp-test.js # handshake + live smoke test (2 upstream calls)Claude Code:
claude mcp add sg-gov -- node /path/to/sg-gov-mcp/src/server.jsClaude Desktop config:
{ "mcpServers": { "sg-gov": { "command": "node", "args": ["/path/to/sg-gov-mcp/src/server.js"] } } }Tools
Tool | Agency | Data |
sg_pm25 | NEA | PM2.5 by region, hourly |
sg_psi | NEA | PSI + sub-indices by region, hourly |
sg_uv_index | NEA | UV index |
sg_weather_forecast_2hr | NEA | 2h forecast by area |
sg_weather_forecast_24hr | NEA | 24h island-wide forecast |
sg_air_temperature | NEA | Per-station air temperature |
sg_rainfall | NEA | Per-station rainfall |
sg_relative_humidity | NEA | Per-station humidity |
sg_wind_direction | NEA | Per-station wind direction |
sg_wind_speed | NEA | Per-station wind speed |
sg_taxi_availability | LTA (legacy v1) | Available taxi locations (GeoJSON) |
sg_carpark_availability | HDB/URA/LTA (legacy v1) | Carpark lot availability |
All real-time tools accept an optional date (YYYY-MM-DD or
YYYY-MM-DDTHH:mm:ss, SGT) where the upstream API supports it.
Rate-limit policy
Client-side token buckets sit below documented upstream limits (5 req/10s where the documented keyless limit is 6/10s).
Responses are cached for their natural update cadence, so most calls never hit the upstream at all.
On HTTP 429 we wait the full 10-second window once, retry once, then return an error. No header tricks, no IP rotation, no parallel bursting, no workarounds of any kind.
sg_rate_limit_statusexposes bucket usage so compliance is inspectable.
Honest caveats
We are on the keyless tier. data.gov.sg offers 2x-5x higher limits with a free API key (signup requires an email OTP; see docs/PLAN.md phase 2).
The legacy api.data.gov.sg v1 endpoints are the older generation; data.gov.sg is migrating traffic to the new platform, so taxi/carpark may move.
SLA already runs an official OneMap MCP gateway (account required). We link to it rather than duplicate it; see docs/PLAN.md phase 4.
Rate-limit numbers in docs/RATE-LIMITS.md mix official documentation with our own gentle live measurements; each row says which.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
data.gov.sg MCP — Singapore open data + real-time environment/transport feeds
This MCP server provides seamless access to Malaysia's government open data, including datasets, w…
Singapore property & financial data APIs for AI agents. 27 MCP tools. x402 micropayments.
OpenAQ MCP — global air-quality measurements via the OpenAQ v3 API.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceReal-time Singapore government data for AI agents. Weather forecasts, air quality (PSI/PM2.5), HDB carpark availability, and taxi supply from data.gov.sg.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables access to Singapore government open data and real-time environment/transport feeds including weather, air quality, taxi availability, and traffic incidents.86 npmMIT
- AlicenseAqualityDmaintenanceUnified MCP server offering 30 tools for Singapore government and public data including weather, transport, education, and property, with many tools working immediately without API keys.34MIT
- AlicenseNot gradedqualityBmaintenanceEnables interaction with Singapore public data including datasets, real-time traffic, weather, and geospatial services through MCP.10MIT