The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Earthquake MCP Server listing page.
Search USGS and EMSC seismic data — real-time feeds, event queries, and earthquake counts via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://earthquake.caseyjhand.com/mcp
4 tools for querying global earthquake data from USGS and EMSC:
| Tool | Description |
|---|---|
earthquake_get_feed | Fetch a USGS pre-computed real-time earthquake feed by magnitude tier and time window |
earthquake_search | Search earthquakes by time range, magnitude, depth, location radius, PAGER alert level, or felt reports |
earthquake_count | Count earthquakes matching filters without fetching full records |
earthquake_get_event | Fetch complete detail for a specific earthquake by USGS event ID |
earthquake_get_feedFetch a USGS pre-computed real-time earthquake feed by magnitude tier and time window.
all (microseisms), 1.0, 2.5, 4.5, and significant (USGS-curated by magnitude, felt reports, and PAGER impact)hour, day, week, monthcursor: limit bounds a page (default 100, max 1000), totalCount reports the whole feed, and nextCursor retrieves the rest — the broad tiers run past 10,000 events for monthearthquake_search for historical or filtered queriesearthquake_searchSearch earthquakes by time range, magnitude, depth, location radius, PAGER alert level, or felt reports.
green/yellow/orange/red), DYFI felt reports count, significance score, event typeevent_type in one vocabulary whichever source served it — the QuakeML names USGS publishes (earthquake, quarry blast, explosion, ice quake); EMSC's two-character code is decoded to the same names, with how sure EMSC was kept beside it in event_certainty — and the event_type filter narrows to one of them on USGSlatitude, longitude, and radius_km togethermin_latitude, max_latitude, min_longitude, max_longitude, each independently optional and forwarded to both sources; combining a box with the radius circle intersects the two. Longitude accepts up to ±360 so a box can cross the antimeridianoffset, forwarded straight to the upstream FDSN offset parameter on both sourcesoffset counts from 1, matching both upstream APIs — a capped result carries totalCount and the nextOffset to pass on the following call, and says so with countUnavailable when the follow-up count query failed rather than leaving the total silently absentearthquake_count first to gauge result sizesource=emsc they are dropped and named in ignoredFilters, so an unconstrained result set is never mistaken for a filtered oneearthquake_countCount earthquakes matching filters without fetching full records.
earthquake_search for statistical queries ("how many M5+ events in 2025?")earthquake_search: time, magnitude, depth, location radius, bounding box, PAGER, DYFI, significance, event typeevent_type="earthquake" on USGS to exclude themexceeds_limit flag when count exceeds 20,000 — signals a full search needs pagingqueryEcho, including the resolved time window — omitting start_time counts only the last 30 daysmax_allowed cap (20,000); EMSC count endpoint does not expose this field (max_allowed will be null)ignoredFilters when source=emsc, the same as on earthquake_searchearthquake_get_eventFetch complete detail for a specific earthquake by USGS event ID.
detail — a projection of the analysis products only the single-event response holdsdetail groups: PAGER alert and report link, ShakeMap peak MMI/PGA/PGV and intensity map, DYFI response count and max CDI, moment-tensor scalar moment and nodal planes, landslide and liquefaction alerts, origin quality (azimuthal gap, station count, location and depth uncertainty), finite-fault rupture length and widthid field of earthquake_get_feed and earthquake_search results (e.g. us6000sznj, hv74966427)| Type | URI pattern | Description |
|---|---|---|
| Resource | earthquake://feed/{magnitude_tier}/{time_window} | USGS real-time earthquake feed as injectable context — returns the whole feed, so use the earthquake_get_feed tool for the broad tiers |
| Resource | earthquake://event/{event_id} | Full USGS earthquake event detail by ID as injectable context, including the same detail product projection as earthquake_get_event |
Built on @cyanheads/mcp-ts-core:
none, jwt, oauth)in-memory, filesystem, Supabase, Cloudflare KV/R2/D1Earthquake-specific:
Agent-friendly output:
usgs / emsc) so agents can reason about data provenanceexceeds_limit flag on count responses surfaces truncation risk before a full searchnull, never as a fabricated zero — tsunami and status are null on EMSC events, and the rendered text says "not published by source" rather than "no tsunami" or "reviewed"source_catalog and auth carry provenance (which catalog and which authoritative agency produced a solution) so agents can weigh two sources against each otherignoredFilters on both earthquake_search and earthquake_countevent_type travels with every event, so a quarry blast or explosion is never silently read as an earthquake, and event_certainty keeps a suspected one from reading as confirmedA public instance is available at https://earthquake.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:
All configuration is validated at startup via Zod schemas in src/config/server-config.ts. Key environment variables:
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT_TYPE | Transport: stdio or http | stdio |
MCP_HTTP_PORT | HTTP server port | 3010 |
MCP_HTTP_ENDPOINT_PATH | HTTP endpoint path where the MCP server is mounted | /mcp |
MCP_PUBLIC_URL | Public origin override for TLS-terminating reverse-proxy deployments | none |
MCP_SESSION_MODE | HTTP session handling: stateful, stateless, or auto. The Docker image and .env.example ship stateless. | auto (resolves to stateful) |
MCP_AUTH_MODE | Authentication: none, jwt, or oauth | none |
MCP_LOG_LEVEL | Log level (debug, info, warning, error, etc.) | info |
MCP_GC_PRESSURE_INTERVAL_MS | Opt-in Bun-only forced-GC pressure loop (ms). Try 60000 if heap growth is observed under sustained HTTP load. | 0 (disabled) |
LOGS_DIR | Directory for log files (Node.js only) | <project-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1 | in-memory |
USGS_BASE_URL | USGS API base URL. Override for testing or mirroring. | https://earthquake.usgs.gov |
EMSC_BASE_URL | EMSC API base URL. Override for testing or mirroring. | https://www.seismicportal.eu |
DEFAULT_LIMIT | Default result limit for earthquake_search | 100 |
REQUEST_TIMEOUT_MS | HTTP timeout in milliseconds for upstream API calls | 10000 |
OTEL_ENABLED | Enable OpenTelemetry | false |
Build and run the production version:
Run checks and tests:
| Directory | Purpose |
|---|---|
src/mcp-server/tools | Tool definitions (*.tool.ts). Four tools across USGS and EMSC. |
src/mcp-server/resources | Resource definitions. Feed and event resources. |
src/services/usgs | USGS ComCat service — GeoJSON feed fetcher and FDSN query API client. |
src/services/emsc | EMSC SeismicPortal service — FDSN event search and count endpoints. |
src/config | Server-specific environment variable parsing and validation with Zod. |
tests/ | Unit and integration tests, mirroring the src/ structure. |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for logging, ctx.state for storagecreateApp() arraysIssues and pull requests are welcome. Run checks and tests before submitting:
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.