Skip to main content

Model Context Protocol server unifying real-time and historical earthquake data from multiple global seismic agencies (USGS, EMSC, JMA, INGV, GeoNet, AFAD, ...).

Project description

seismic-mcp

A unified Model Context Protocol server for global seismic data. Queries 20 seismic agencies in parallel; matches cross-agency reports of the same event; surfaces magnitude and location discrepancies so AI agents can see what one feed alone would hide.

Status

Working:

  • 20 agencies wired up. FDSN-event: USGS, EMSC, IRIS, INGV, GeoNet, GFZ, NOA, IPGP, NCEDC, SCEDC, ISC, SED, BMKG, NIEP, RESIF, KNMI, NRCAN. Custom (non-FDSN): JMA (Japan), AFAD (Türkiye), IMO (Iceland).
  • Cross-agency reconciliation. Spatiotemporal clustering, prime-report selection (local authority > EMSC for Europe > USGS), discrepancy detection (magnitude/location/depth spread). Reviewed bulletins trump preliminary.
  • Seven MCP tools: find_events, get_event, compare_sources, find_discrepancies, list_recent_by_agency, get_agency_info, list_agencies.
  • TTL cache (60 s) with in-flight de-dup: repeated queries are sub-100 ms.
  • 57 unit tests covering parsers, matching, prime-selection, authorities, reconciliation, and cache.
  • HTTP frontend for manual inspection: form + Leaflet map + side-by-side compare drawer.

Not yet built: EMSC eventid mapping (cross-references USGS/EMSC IDs for tighter matching), populated known_aliases.json, multi-region per-event authority (KOERI alongside AFAD for Türkiye).

Safety

Reports earthquake data from multiple seismic agencies for research, journalism, situational awareness, and curiosity. It is NOT an early-warning system. All earthquake reports arrive AFTER shaking has already occurred where it was felt. For earthquake preparedness and emergency response, consult official local authorities (USGS ShakeAlert, JMA Earthquake Early Warning, etc.). Preliminary magnitudes and locations are routinely revised by reporting agencies; never make safety decisions based on a single reading.

Run

As an MCP server (Claude Desktop, VS Code, etc.)

Once published to PyPI, no checkout is needed — uvx fetches and runs it:

uvx seismic-mcp

Add to claude_desktop_config.json — Windows path is %APPDATA%\Claude\claude_desktop_config.json, macOS ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "seismic": {
      "command": "uvx",
      "args": ["seismic-mcp"]
    }
  }
}

To run from a local checkout instead (development):

uv sync
uv run python server.py

Restart Claude Desktop. The tools appear under the seismic-mcp server in the tools menu.

As a web frontend (manual inspection)

uv run python web.py

Then open http://127.0.0.1:8765/. Same code paths as the MCP server, just exposed over HTTP with a small UI.

Tests

uv run pytest

Architecture

server.py              FastMCP entry point — 7 @mcp.tool functions
web.py                 FastAPI HTTP wrapper around the same tools
src/
  schemas.py           Pydantic models: SourceReport, ReconciledEvent, ...
  adapters/
    base.py            SeismicAdapter protocol
    fdsn.py            Header-aware FDSN-event adapter (handles 17 networks)
    afad.py            Custom AFAD JSON adapter
    jma.py             Custom JMA list.json adapter
    imo.py             Custom IMO GeoJSON adapter
    __init__.py        Registry: make_adapter(code), supported_agencies()
  authorities.py       Regional-authority bbox lookup
  matching.py          Spatiotemporal clustering with mag-scaled thresholds
  prime_selection.py   Headline-report selection rules
  reconcile.py         Cluster → ReconciledEvent with spreads
  cache.py             TTL cache + in-flight de-dup
  tools/               One file per MCP tool
data/
  agency_metadata.json    Per-agency coverage, latency, notes
  region_authorities.json Region bboxes → authoritative agency
  known_aliases.json      (manual fallback for matching, currently {})
tests/                 pytest suite — 57 tests, fast (<1s)
static/index.html      Single-page UI for the HTTP frontend

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seismic_mcp-0.1.0.tar.gz (42.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seismic_mcp-0.1.0-py3-none-any.whl (37.4 kB view details)

Uploaded Python 3

File details

Details for the file seismic_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: seismic_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 42.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for seismic_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d8410564bf9650c11e25c2e61bc3e91cdb47313b0a075d821ce034fe0c2cc89c
MD5 66a64df61558eb0ec704fb5d9466d542
BLAKE2b-256 b2cbfbfeab966fabd37ae470180b5706040a7a9b12b421423b8993ff5ee7b7bc

See more details on using hashes here.

File details

Details for the file seismic_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: seismic_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for seismic_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86436eed7513bd9a4c072d4676ca4b4c5eedf860162ef988c845fd04f3f94353
MD5 7a3af60038b96caffdb15d71dd64415c
BLAKE2b-256 c8281a8533888a9bf69c099bea0af136ce06888b8d6c48921e291a15dde4029f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page