The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Ph Civic Data MCP listing page.
Philippine civic data as agent-callable tools. The full PSA OpenSTAT statistical catalog, PSGC location codes, infra-spending accountability, earthquakes, weather, typhoons, procurement, poverty, solar radiation, air quality, satellite vegetation, and macro indicators. Population figures reach barangay level. 41 tools, no API keys.
Philippine civic-data portals publish open data in different shapes: scraped HTML tables, PXWeb JSON, and undocumented APIs. Nothing ties them together for an agent to use. This server does, over stdio, with zero hosting cost and no API key needed. It answers questions such as how many people live in a barangay, whether a place sits near an active fault or volcano, what a city spent on flood control, and how one place compares against another.
All data comes from public records. Heuristic indicators are statistical only. A specific allegation needs independent investigation and a second source.
Every client below runs the same package, uvx ph-civic-data-mcp, over
stdio.
Claude Desktop. Add this to claude_desktop_config.json, which sits at
~/Library/Application Support/Claude/claude_desktop_config.json on macOS:
Claude Code.
Codex. Confirmed live on 2026-09-03.
Cursor. Add this to mcp.json:
VS Code. Add this to .vscode/mcp.json:
Docker. Build once, then run with -i for stdio:
The image runs as a non-root user and ships a healthcheck.

That recording is vhs docs/demo_setup.tape. It spawns Claude Code with
--mcp-config pointed at this server, and Claude fans out to
get_weather_forecast and get_population_stats, then correlates them. The
temperatures and the population are what the live sources returned while it
recorded. The population turn answers from the 2024 Census of Population
(NCR: 14,001,751 as of 1 July 2024).
ph-civic-data-mcp exposes 41 tools across 19 public sources. Start with
get_area_profile for any place-based question. It resolves the name to a
PSGC code once, then composes demographics, economy, procurement, hazards,
and the 3-day outlook in a single turn, with infra notices already normalized
per 100,000 residents.
get_area_profileresolve_ph_locationget_population_statsget_poverty_statsassess_area_risklist_admin_unitsget_location_hierarchycompare_areascompare_areascompare_areasget_latest_earthquakesget_earthquake_bulletinget_volcano_statusget_active_typhoonsget_usgs_earthquakes_phget_flood_forecastget_historical_typhoons_phsearch_procurementsearch_infra_projectssummarize_infra_spendingget_procurement_summaryflag_infra_anomaliesget_infra_projectsearch_psa_catalogbrowse_psa_catalogdescribe_psa_datasetquery_psa_datasetget_inflation_statsget_labor_statsget_health_indicatorssearch_psic_codesquery_psa_dataset needs an explicit value code for every dimension, refuses
"all" and "*", and caps a query at 1000 cells. PSA answers a full-cube
request with an HTTP 403, so describe_psa_dataset first is the only way in.
get_weather_forecastget_weather_alertsget_solar_and_climateget_air_qualityget_vegetation_indexlist_pagasa_advisory_filesget_world_bank_indicatorbrowse_election_resultsget_election_returnThe archive froze on 2025-05-16, so these two read a fixed public record. The tools retrieve and never interpret.
get_official_gazette_feedsearch_hdx_datasetsEvery HDX dataset carries its own license. Read license_id before reuse.
Three MCP prompts pre-write the multi-step work, so a client can offer them as slash commands or starting points.
area_briefing(location) composes a full place briefing.infra_accountability_scan(area) walks the procurement review path.psa_data_explorer(topic) drives the search, describe, query loop.One tool answers questions about the server itself. get_data_freshness
reports the running version, the tool count, every source with its cache
window and license, per-host health, and cache ages.
Two MCP resources carry context a client can read without a tool call.
data://ph-civic/source-catalog is the source, freshness, and license table.data://ph-civic/civic-framing is the language rule for accountability output.Full signatures, arguments, and limits for all 41 tools: docs/tool-reference.md.
get_area_profile("Tacloban") returns the resolved identity, then reports
Tacloban's own population next to the national figure, not the region's.
Captured live on 2026-09-03. Tacloban's own population, 259,353, replaces the Region VIII figure of about 4.6 million that an earlier version reported. Every demographic field names its own census, reference date, and geography level, so an agent never has to guess which population a number belongs to.
A list tool returns a real list on success. On upstream failure it returns an envelope instead:
Read that as "the source was unreachable," never as "no earthquakes" or "no
notices." Failures never enter a cache, so a retry is meaningful, and a
caveats entry carries the real error rather than an exception class name.
Every single-value tool sets data_status to one of five values:
data_status | Meaning |
|---|---|
success | The source returned a value, with its provenance. |
empty | The source answered but has no row for this request. |
unavailable | The source failed to respond, or sent an unreadable body. |
indeterminate | The source answered, but the server cannot trust the result. |
invalid_request | The caller sent a bad argument. Fix the argument named in caveats. |
upstream_error and validation_error derive from data_status, so a
caller can branch on either field. get_area_profile reports one status per
block in blocks and folds every failed block into caveats, so a null
figure never sits beside an empty caveats list.
Every response carries source and data_retrieved_at.
The table below comes straight from SOURCE_CATALOG in server.py, through
scripts/render_source_matrix.py, so it cannot drift from what the server
actually reports.
| Source | What it gives | Freshness | Cache TTL | License |
|---|---|---|---|---|
| PSGC | Place codes and names, region down to barangay | Updated when PSA publishes new PSGC version (annual or quarterly) | 24 h | Public domain (PSA Philippine Standard Geographic Code) |
| PHIVOLCS earthquakes | Earthquake events and full bulletins | 5-minute table refresh; bulletins published per event | 5 min | Public, PHIVOLCS public bulletin pages |
| PHIVOLCS volcanoes | Alert level and bulletin per monitored volcano | Daily bulletins per active volcano | 30 min | Public, PHIVOLCS public bulletin pages |
| PAGASA forecast | 10-day weather forecast, with an Open-Meteo fallback | Issued twice daily; Open-Meteo updates hourly | 1 h | Open-Meteo CC-BY 4.0 / PAGASA terms |
| PAGASA typhoons | Active typhoon bulletins and weather alerts | Bulletin every 3-6 hours when storms are active | 10 min | Public, PAGASA bulletin pages |
| PhilGEPS notices / infra | Procurement notices, the infra subset, spending summaries | Latest ~100 bid notices, refreshed every 6h | 6 h | Public, PhilGEPS open notice listing |
| PSA OpenSTAT | Population, poverty, CPI, labor, health, and the full statistical catalog | Per-table vintage. Population: 2024 Census of Population (reference date 2024-07-01), with 2010, 2015 and 2020 by year. Poverty: 2023. CPI/inflation: latest published month (lagged). Labor Force Survey: latest published quarter. Health (1D): per-indicator. | 24 h | PSA Open Data terms |
| Area profile (auto-stitch) | One place profile composed live from every source below | Composed live from PSGC + PSA + PhilGEPS + PHIVOLCS + PAGASA; each block carries its own reference period | 1 h | Public, PSA OpenSTAT, PSGC, PhilGEPS, PHIVOLCS, PAGASA |
| NASA POWER | Daily solar irradiance and climate at any point | Daily, ~3-day latency | 24 h | Public domain (NASA) |
| Open-Meteo air quality | PM2.5, PM10, NO2, SO2, O3, CO, and AQI | Hourly | 15 min | Open-Meteo CC-BY 4.0 |
| Open-Meteo flood forecast | Daily river discharge forecast (GloFAS model) for the nearest river cell | Daily GloFAS model run | 1 h | Open-Meteo CC-BY 4.0 |
| NASA MODIS NDVI | NDVI and EVI vegetation indices at any point | 16-day composite, ~14-day latency | 24 h | Public domain (NASA / ORNL) |
| USGS FDSN | Philippine-region earthquakes, cross-checked against PHIVOLCS | Real-time global feed | 10 min | Public domain (USGS) |
| NOAA IBTrACS | Historical tropical cyclone tracks through the Philippine AOR | Annual update | 24 h | Public domain (NOAA) |
| World Bank Open Data | Philippine macroeconomic indicators | Annual; lag varies by indicator | 24 h | World Bank Open Data CC-BY 4.0 |
| HDX | Humanitarian dataset search, with a per-dataset license | Per-dataset metadata_modified; the catalog is searched fresh each query | 6 h | HDX (Humanitarian Data Exchange) CKAN API, per-dataset license |
| Official Gazette RSS | Proclamations, memorandum circulars, and other government issuances | New issuances posted the same day; feed rebuilds on every request | 20 min | Public, Official Gazette government record, RA 8293 section 176 default |
| PAGASA public files | Raw advisory, bulletin, and storm surge PDF file listing | weather_advisory updates about every 6 hours; bulletin only while a cyclone is active; stormsurge has not published since 2019-12-02 | 15 min | PAGASA public files (pubfiles.pagasa.dost.gov.ph), government record |
| PSIC | Industrial classification code lookup, by code prefix or description | PSIC revisions change on the order of years | 24 h | PSA Philippine Standard Industrial Classification (PSIC), CC BY 4.0 |
| COMELEC 2025 election results | Precinct-level vote tallies, region down to barangay | Archive frozen 2025-05-16 10:00:09 AM; a fixed public record, not a live feed | 24 h | Public, COMELEC 2025 election results archive |
PAGASA_API_TOKEN is the only environment variable, and it is optional.
PAGASA gates it behind a formal request. Without it, forecasts use
Open-Meteo. Every one of the 41 tools works with no token at all.
Three vintages worth stating plainly:
psgc_code. PSA moved the census folders on OpenSTAT in
2026, so the server discovers them by title on every cold start, and names
the census, reference date, and geography level in every result. Pass
year for 2010, 2015, or 2020, and psgc_code for a city, municipality,
or barangay.get_area_profile withholds that figure below the threshold and names the
reason in caveats.The OpenSTAT updated field is server wall clock, not data vintage. Read the
vintage from the table's own time dimension, which every response reports.
flag_infra_anomalies, summarize_infra_spending, and the procurement
search produce starting points for investigation, never evidence of
wrongdoing. Every flagged item ships with a disclaimer, and the server
instructs agents to use defensible language.
high_cost_no_published_progress is named for what it actually checks: the
public listing publishes no progress data for any notice, so it is a
cost-threshold transparency flag, not a per-project progress check.
For an emergency, use ndrrmc.gov.ph and the official PHIVOLCS and PAGASA channels. This is not a life-safety system but a research tool.
CI runs the offline suite on Python 3.11, 3.12, 3.13, and 3.14, plus Ruff lint, Ruff format, a build, and a fresh-process check that a bare import exposes all 41 tools. CI action refs are pinned to a commit SHA, not a floating tag.
The docker build step above produces a non-root image with a healthcheck.
The server pins fastmcp>=4.0.0,<5.0.0, currently 4.0.2 on MCP SDK 2.1.1.
MIT licensed. Built by Xavier Puspus. Not affiliated with PSA, PHIVOLCS, PAGASA, PhilGEPS, DPWH, NASA, NOAA, or the World Bank.