Skip to main content
Glama

igepn-mcp

Ecuador earthquakes and volcano activity from the IGEPN (Instituto Geofísico de la Escuela Politécnica Nacional) → SQLite (accumulating, never pruned) → structured MCP tools. Source: the IGEPN public Telegram channel, read through its keyless public preview t.me/s/SismosVolcanesIGEPN. Design rationale: CLAUDE.md.

Tools

tool

use

last_quake()

the most recent quake (revised value if available, plus the preliminary estimate) — "¿qué fue ese temblor?"

latest_quakes(hours=24, min_mag?, place?, n=15)

recent quakes, one per event; place is accent-insensitive ("Manabí", "Quito")

volcano_status(volcano?)

latest surface/internal activity level + trend (all volcanoes reported in the last 30 days, or one)

ig_alerts(hours=48, volcano?, n=10)

#IGAlInstante bulletins (lahars, ash, activity) and special volcano reports, as written

Every tool declares a title and all four MCP hints explicitly. All four tools only read the local store, so each is read-only, non-destructive, idempotent and closed-world (openWorldHint=false); the poller, not a tool, is what fetches from Telegram. A test enforces this, so a new tool without metadata fails CI.

Times come in Ecuador local time (occurred_local_ec, UTC−5) and UTC. Quakes keep IGEPN's label as report_status (PRELIMINAR / REVISADO, older posts CONFIRMADO). Every item carries a post_url (the Telegram post, with its image) for the UI to show.

Results

Every result has a top-level status, so callers never have to interpret prose:

status

meaning

fields

ok

the data is good; count: 0 really means nothing was reported

the data, the resolved parameters, and data (last_check_utc, plus warning if the last successful poll is over 20 min old)

refused

the request needs changing: an impossible hours / n, or a volcano with nothing stored

kind, reason, advice (and known_volcanoes for an unknown name)

error

a fault, or nothing captured yet

kind (no_data, database, internal), detail

A store that has never been polled is an error, not an empty list, so "couldn't check" can't read as "all quiet". Arguments of the wrong type (hours="abc") are rejected by the MCP SDK before the tool runs, so those still surface as a protocol-level tool error.

Related MCP server: TMD Earthquake MCP Server

Run

uv sync
uv run igepn-mcp poll                        # fetch new posts once (watermark-incremental; run every ~3 min)
uv run igepn-mcp backfill --pages 50         # walk history backwards, ~20 posts/page, resumable (see below)
uv run igepn-mcp reparse                     # rebuild parsed tables from the raw log after a parser change
uv run igepn-mcp serve                       # stdio (Claude Desktop / dev)
IGEPN_MCP_TOKEN=secret uv run igepn-mcp serve --transport http --host 0.0.0.0 --port 8000   # streamable-http at /mcp
uv run pytest

env

default

IGEPN_DB

data/igepn.db

SQLite path (WAL; poller and server can share it)

IGEPN_POLL_MINUTES

0 (off)

>0: serve also polls in the background (no timer needed); 3 recommended

IGEPN_MCP_TOKEN

unset

bearer token required on HTTP (/healthz stays open)

IGEPN_CHANNEL

SismosVolcanesIGEPN

Telegram channel

IGEPN_MAX_CATCHUP_PAGES

25

pages one poll may walk back to reach the watermark after downtime

IGEPN_USER_AGENT, IGEPN_FETCH_TIMEOUT

honest UA, 20

Storage

posts_raw is the append-only record of every kept post (procurement notices are dropped). quakes keeps every report (preliminary and revised) and the view v_quake_current gives the latest per event (the revised one wins). volcano_reports covers daily, weekly and monthly reports, and alerts holds the free-text bulletins. The parsed tables are derived from posts_raw, so reparse can rebuild them at any time.

History

The preview pages back to the channel's first post (2019), so backfill can recover the full archive through the same keyless route, about 620 pages. Its default of 3 s between pages keeps it polite. It is resumable, so it can run in chunks (--pages 100 at a time). The parser handles all three post formats the channel has used (2019, 2021, 2023+).

Claude Desktop

%APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "igepn": {
      "command": "uv",
      "args": ["--directory", "C:\\Code\\igepn-mcp", "run", "igepn-mcp", "serve"],
      "env": { "IGEPN_DB": "C:\\Code\\igepn-mcp\\data\\igepn.db", "IGEPN_POLL_MINUTES": "3" }
    }
  }
}

Docker Compose (e.g. mcpo → Open WebUI)

Build the image with docker build -t igepn-mcp .. It serves HTTP on :8000 at /mcp, and the healthcheck uses the open /healthz endpoint.

services:
  igepn-mcp:
    image: igepn-mcp:latest
    restart: unless-stopped
    environment:
      IGEPN_MCP_TOKEN: ${IGEPN_MCP_TOKEN}    # put it in .env; clients send "Authorization: Bearer <token>"
      IGEPN_POLL_MINUTES: "3"                # poll at startup, then every 3 min (no timer needed)
      IGEPN_USER_AGENT: "igepn-mcp/0.1 (+https://example.org/your-contact)"   # identify your deployment
    volumes:
      - igepn-data:/data                     # SQLite; local disk, not NFS/SMB. Accumulates - back it up.
volumes:
  igepn-data:

One-time history backfill into the same volume: docker compose run --rm igepn-mcp backfill --pages 700.

Auth scope

The server is deliberately auth-agnostic beyond an optional bearer token: run it over stdio, or HTTP + bearer on a private network. It has no OAuth and won't grow one. To publish it more widely (at work, on the internet), put a management layer in front of it, such as an MCP gateway or an auth proxy that handles OAuth, users and audit.

mcpo entry (from a container on the same network):

{ "mcpServers": { "igepn": { "type": "streamable-http", "url": "http://igepn-mcp:8000/mcp",
  "headers": { "Authorization": "Bearer ${IGEPN_MCP_TOKEN}" } } } }

AI assistance

igepn-mcp is developed openly with the help of Claude (Anthropic). We state this plainly: commits Claude helped write carry a Co-Authored-By: Claude trailer. The code and design are open source so the work can be inspected, reused, and given back.

License

Code: MPL-2.0. The earthquake and volcano reports belong to the IGEPN (igepn.edu.ec); they are fetched from its public channel and stay in your local database. Attribute them to the IGEPN, keep polling polite (≥3 min), and set IGEPN_USER_AGENT to identify your own deployment. For official information and emergencies, follow the IGEPN and Ecuador's risk-management authorities directly.

Available Tools

4 tools
ig_alertsA
Read-only

Recent IGEPN instant bulletins (#IGAlInstante: lahars, ash emissions, increased activity) and special volcano reports, newest first, as IGEPN wrote them. Use for "any volcano alerts", "is there ash from the Sangay", "lahar warnings". Relay safety recommendations exactly as written.

    Args:
        hours: look-back window in hours (default 48; 168 = one week).
        volcano: optional volcano name filter, e.g. "Sangay".
        n: max bulletins (default 10, max 50).
    

Inputs: n, hours, volcano.

last_quakeA
Read-only

The single most recent earthquake reported by the IGEPN, with its latest (revised if available) values. Use for "¿qué fue ese temblor?", "what was that earthquake just now", "did it just shake?".

    Check `ago`: if the last quake is hours or days old, the tremor the user felt may not be reported yet
    (a PRELIMINAR report usually appears within ~5 minutes) - say so rather than guessing.
    When the event was revised, `preliminary` shows the first estimate for comparison.
    

Inputs: no named parameters.

latest_quakesA
Read-only

Recent earthquakes reported by the IGEPN, newest first, one entry per event (its latest report). Use for "earthquakes today / this week", "any tremors near Quito?", "strong quakes this month".

    Args:
        hours: look-back window in hours (default 24; e.g. 168 = one week, 720 = 30 days).
        min_mag: only events with magnitude >= this (e.g. 4).
        place: text that must appear in the location, case/accent-insensitive: a city or province as IGEPN
            writes it, e.g. "Quito", "Manabí", "Esmeraldas" (IGEPN names the NEAREST town, so a quake felt
            in a city may be listed under a neighbouring one).
        n: max events (default 15, max 50).
    

Inputs: n, hours, place, min_mag.

volcano_statusA
Read-only

Latest IGEPN activity report for Ecuadorian volcanoes: surface and internal activity level, each with its trend. Use for "how is the Sangay", "is Cotopaxi active", "volcano status".

    Without `volcano`: every volcano with a report in the last 30 days (IGEPN only publishes periodic
    reports for volcanoes it is actively following; others are not listed). With `volcano`: that
    volcano's latest report however old (check `report_date`) plus its recent instant alerts.

    Args:
        volcano: name, case/accent/space-insensitive, e.g. "Sangay", "reventador", "Cotopaxi".
    

Inputs: volcano.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: last_quake fetches a single most-recent event, latest_quakes lists events with filters, volcano_status provides activity reports, and ig_alerts delivers bulletins. The descriptions explicitly differentiate use cases, leaving no ambiguity.

    Naming Consistency4/5

    All names use snake_case consistently, but the structural patterns vary (adjective_noun, noun_noun, abbreviation_noun). This minor deviation from a uniform pattern prevents a perfect score.

    Tool Count5/5

    Four tools are well-scoped for a focused monitoring server, covering core needs of recent earthquakes, volcano status, and alerts without redundancy. Each tool earns its place.

    Completeness4/5

    The surface covers the main earthquake and volcano information needs, but lacks detailed historical querying beyond hourly windows or event-specific lookups. These minor gaps are workable with existing filters.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables querying seismic station metadata, regional earthquake catalogs, and federated waveform data availability across FDSN web services, letting users locate seismometers, retrieve local seismicity, and identify data holdings through direct tool calls or natural language.
      54 npm
      1
      MIT