The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Fema MCP Server listing page.
Query FEMA disaster declarations, public assistance grants, housing aid, and NFIP flood insurance claims via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://fema.caseyjhand.com/mcp
Eight tools are advertised by default. Setting FEMA_ENABLE_CANVAS_DROP=true adds a ninth, destructive DataCanvas cleanup tool. Together they cover the OpenFEMA data surface — convenience tools for the headline datasets, SQL analytics over large NFIP result sets via DuckDB canvas, and a generic escape hatch for datasets the convenience tools don't cover:
| Tool | Description |
|---|---|
fema_search_disasters | Search federal disaster declarations by state, incident type, declaration type, date range, and county |
fema_get_disaster | Fetch all designated-area records for a specific disaster by disaster number |
fema_get_public_assistance | Public assistance funded projects for a disaster or state — where federal recovery money went |
fema_get_housing_assistance | Individual assistance housing data for a disaster — owner and renter breakdowns by county/ZIP |
fema_search_nfip | NFIP flood insurance claims for a state, county, or ZIP, with optional DataCanvas spillover for SQL analytics |
fema_dataframe_describe | List columns and row counts for DataCanvas tables staged by fema_search_nfip |
fema_dataframe_query | Run a SELECT query against a DataCanvas table staged by fema_search_nfip |
fema_dataframe_drop | Remove a staged DataCanvas table or view (disabled unless explicitly enabled) |
fema_query_dataset | Generic OData query against any OpenFEMA v2 dataset — escape hatch for datasets the convenience tools don't cover |
fema_search_disastersThe primary entry point — "what disasters were declared in Texas in 2025?"
DR/EM/FM), date range, and countydesignatedAreaCountlimit / offsetfema_get_disasterFetch all designated-area records for a specific FEMA disaster number.
fema_search_disasters to drill into a specific event; the disaster number chains to PA and housing toolsDisasterDeclarationsSummaries returns one row per designated area — a single declaration can span dozens of countiesfema_get_public_assistanceRetrieve PA funded project details — where federal recovery money went after a disaster.
disaster_number, state, or county; at least one of disaster_number or state is requiredfema_get_housing_assistanceIndividual assistance housing data for a disaster, broken down by county and ZIP.
type param (owners/renters/both)HousingAssistanceOwners and HousingAssistanceRenters datasets in a single callfema_search_nfipNFIP flood insurance claims with optional DuckDB-backed SQL analytics for large result sets.
state filter — unfiltered NFIP Claims is 2.7M rowscounty_code, zip_code, year_from, year_to; pagination via limitCANVAS_PROVIDER_TYPE=duckdb is set and results exceed the inline cap, the full result set spills to a DataCanvas table and returns a canvas_id handlefema_dataframe_describe to inspect the schema, then fema_dataframe_query for aggregation, grouping, and time-series analysis without re-fetchingfema_dataframe_describe / fema_dataframe_query / fema_dataframe_dropIn-conversation SQL analytics over NFIP Claims data staged by fema_search_nfip on a DuckDB-backed DataCanvas.
fema_dataframe_describe: lists columns, types, and row count for a canvas table — use before writing a queryfema_dataframe_query: runs a single SELECT statement against the staged table; standard DuckDB SQL (GROUP BY, SUM, window functions, time-series)fema_dataframe_drop: removes one staged table or view; disabled by default and enabled with FEMA_ENABLE_CANVAS_DROP=truefema_search_nfip (with canvas enabled) → fema_dataframe_describe → fema_dataframe_queryfema_query_datasetGeneric OData query against any OpenFEMA v2 dataset — the escape hatch for datasets the convenience tools don't cover.
$filter, $select, $orderby, limit, and offset paramsFimaNfipPolicies, IndividualAssistanceHousingRegistrantsLargeDisasters)| Type | Name | Description |
|---|---|---|
| Resource | fema://disaster/{disasterNumber} | Summary for a specific FEMA disaster declaration — title, state, incident type, programs, incident period |
All resource data is also reachable via tools. Use fema_get_disaster for the same data with pagination and full designated-area detail.
Built on @cyanheads/mcp-ts-core:
none, jwt, oauthin-memory, filesystem, Supabase, Cloudflare KV/R2/D1FEMA/OpenFEMA-specific:
%24-encoded to satisfy Akamai's Drupal layer), response parsing, and structured error classification (JSON 400 vs HTML 404)DisasterDeclarationsSummaries — one row per designated area collapsed to declaration-level summaries with designatedAreaCountstate filter is required to prevent unbounded 2.7M-row fetchesAgent-friendly output:
invalid_state, no_results, missing_filter, unknown_dataset, invalid_filter, canvas_unavailable — with recovery hints telling agents the concrete next stepdesignatedAreaCount on search results so agents know whether to drill in with fema_get_disaster without having to fetch the full record firstA public instance is available at https://fema.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
Add the following to your MCP client configuration file.
Or with npx (no Bun required):
Or with Docker:
For Streamable HTTP, set the transport and start the server:
To enable DuckDB-backed SQL analytics for NFIP Claims:
CANVAS_PROVIDER_TYPE=duckdb to enable SQL analytics over large NFIP Claims result sets.All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Key environment variables:
| Variable | Description | Default |
|---|---|---|
FEMA_BASE_URL | Override the OpenFEMA API base URL. | https://www.fema.gov/api/open/v2 |
FEMA_REQUEST_TIMEOUT_MS | Per-request HTTP timeout in milliseconds. NFIP county queries can be slow. | 30000 |
CANVAS_PROVIDER_TYPE | Set to duckdb to enable DataCanvas for NFIP Claims analytics. Without it, fema_search_nfip inlines results up to the cap. | — |
FEMA_ENABLE_CANVAS_DROP | Enable the destructive fema_dataframe_drop tool for removing staged tables and views. | false |
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_SESSION_MODE | Session mode: auto, stateful, or stateless. This server explicitly uses stateless; schema default auto resolves to stateful when no value is provided. | stateless |
MCP_HTTP_PORT | HTTP server port. | 3010 |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (debug, info, warning, error, etc.). | info |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
OTEL_ENABLED | Enable OpenTelemetry instrumentation. | false |
See .env.example for the full list of optional overrides.
Build and run:
Run checks and tests:
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/fema-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them. Production dependencies, including the DuckDB native binding, are installed directly in the runtime stage without lifecycle scripts.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools/resources and inits services. |
src/config | Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools | Tool definitions (*.tool.ts) — one file per tool. |
src/mcp-server/resources | Resource definitions (*.resource.ts). |
src/services/openfema | OpenFEMA REST API client — OData param builder, response parser, error classifier, retry wrapper. |
src/services/canvas | DataCanvas integration — DuckDB spillover for large NFIP result sets. |
tests/ | Unit and integration tests mirroring src/. |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storagesrc/index.tsIssues and pull requests are welcome. Run checks and tests before submitting:
Data is provided by the OpenFEMA API, a free public API maintained by the Federal Emergency Management Agency. Usage is subject to OpenFEMA Terms and Conditions.
This product uses the Federal Emergency Management Agency's OpenFEMA API, but is not endorsed by FEMA. The Federal Government or FEMA cannot vouch for the data or analyses derived from these data after the data have been retrieved from the Agency's website(s).
When citing OpenFEMA datasets in research or publications, use the format FEMA specifies:
Apache-2.0 — see LICENSE for details.