io.github.cyanheads/epa-drinking-water-mcp-server

Registre officiel Recherche et web

Search EPA drinking water systems, violations, enforcement, and contaminant measurements.

Que pouvez-vous faire avec io.github.cyanheads/epa-drinking-water-mcp-server ?

  • Contact-free inventory and service membership, with source codes retained when labels are unavailable
  • Historical quarterly SDWIS records, LCR summaries, and limited-participation UCMR 5 monitoring kept distinct; empty results establish neither current compliance nor tap-water safety or contaminant absence
  • Source dates retain calendar meaning; non-midnight source timestamps retain a _raw field
  • Lazy process-local UCMR acquisition; statewide requests can exceed the 45-second membership budget even after archive acquisition. Narrow by PWSID/county rather than treating the server as a complete national warehouse
  • Provenance — effective_filters, source URL, retrieved_at, publication/HTTP validators when available, and interpretation caveats
  • Completeness — source_complete:false can remain false with has_more:false after earlier rows were delivered in other pages or partitions; aggregation does not restore completeness
  • Whole-record paging — limit defaults to 10 and clamps at 100; byte limits can return fewer rows. Follow next_cursor with unchanged selectors, including empty phase:membership pages; source cursors expire after 15 minutes of inactivity
  • Oversized records — item_too_large supplies record_cursor; use view:text and concatenate JSON chunks, then follow the records continuation. Both MCP content surfaces carry the same values

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package @cyanheads/epa-drinking-water-mcp-server
Claude Code
claude mcp add epa-drinking-water-mcp-server -e 'CANVAS_PROVIDER_TYPE=none' -e 'SDWIS_DATAFRAME_DROP_ENABLED=false' -e 'CANVAS_DEFAULT_ROW_LIMIT=10000' -e 'CANVAS_DEFAULT_MEMORY_LIMIT_MB=512' -e 'MCP_LOG_LEVEL=info' -- npx -y @cyanheads/epa-drinking-water-mcp-server@0.2.0
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "epa-drinking-water-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@cyanheads/epa-drinking-water-mcp-server@0.2.0"
            ],
            "env": {
                "CANVAS_PROVIDER_TYPE": "none",
                "SDWIS_DATAFRAME_DROP_ENABLED": "false",
                "CANVAS_DEFAULT_ROW_LIMIT": "10000",
                "CANVAS_DEFAULT_MEMORY_LIMIT_MB": "512",
                "MCP_LOG_LEVEL": "info"
            }
        }
    }
}

Variables d'environnement

  • CANVAS_PROVIDER_TYPE Optional SQL staging in the npm runtime: none or duckdb.
  • SDWIS_DATAFRAME_DROP_ENABLED Enable removal of staged tables when DataCanvas is enabled.
  • CANVAS_DEFAULT_ROW_LIMIT SQL retained-row ceiling; the server maximum is 25000.
  • CANVAS_DEFAULT_MEMORY_LIMIT_MB DuckDB memory budget per engine in MiB; maximum 512.
  • MCP_LOG_LEVEL Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').
NPM package @cyanheads/epa-drinking-water-mcp-server
Claude Code
claude mcp add epa-drinking-water-mcp-server -e 'CANVAS_PROVIDER_TYPE=none' -e 'SDWIS_DATAFRAME_DROP_ENABLED=false' -e 'CANVAS_DEFAULT_ROW_LIMIT=10000' -e 'CANVAS_DEFAULT_MEMORY_LIMIT_MB=512' -e 'MCP_TRANSPORT_TYPE=<MCP_TRANSPORT_TYPE>' -e 'MCP_HTTP_HOST=127.0.0.1' -e 'MCP_HTTP_PORT=3010' -e 'MCP_HTTP_ENDPOINT_PATH=/mcp' -e 'MCP_AUTH_MODE=none' -e 'MCP_LOG_LEVEL=info' -- npx -y @cyanheads/epa-drinking-water-mcp-server@0.2.0
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "epa-drinking-water-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@cyanheads/epa-drinking-water-mcp-server@0.2.0"
            ],
            "env": {
                "CANVAS_PROVIDER_TYPE": "none",
                "SDWIS_DATAFRAME_DROP_ENABLED": "false",
                "CANVAS_DEFAULT_ROW_LIMIT": "10000",
                "CANVAS_DEFAULT_MEMORY_LIMIT_MB": "512",
                "MCP_TRANSPORT_TYPE": "<MCP_TRANSPORT_TYPE>",
                "MCP_HTTP_HOST": "127.0.0.1",
                "MCP_HTTP_PORT": "3010",
                "MCP_HTTP_ENDPOINT_PATH": "/mcp",
                "MCP_AUTH_MODE": "none",
                "MCP_LOG_LEVEL": "info"
            }
        }
    }
}

Variables d'environnement

  • CANVAS_PROVIDER_TYPE Optional SQL staging in the npm runtime: none or duckdb.
  • SDWIS_DATAFRAME_DROP_ENABLED Enable removal of staged tables when DataCanvas is enabled.
  • CANVAS_DEFAULT_ROW_LIMIT SQL retained-row ceiling; the server maximum is 25000.
  • CANVAS_DEFAULT_MEMORY_LIMIT_MB DuckDB memory budget per engine in MiB; maximum 512.
  • MCP_TRANSPORT_TYPE Selects the HTTP transport.
  • MCP_HTTP_HOST The hostname for the HTTP server.
  • MCP_HTTP_PORT The port to run the HTTP server on.
  • MCP_HTTP_ENDPOINT_PATH The endpoint path for the MCP server.
  • MCP_AUTH_MODE Authentication mode to use: 'none', 'jwt', or 'oauth'.
  • MCP_LOG_LEVEL Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. @cyanheads/epa-drinking-water-mcp-server
  2. Overview
  3. Capability reference
  4. Features
  5. Getting started
  6. Configuration
  7. Running the server
  8. Project structure
  9. Development guide
  10. Contributing
  11. License

@cyanheads/epa-drinking-water-mcp-server

Search EPA drinking water systems, violations, enforcement actions, and contaminant measurements via MCP. STDIO or Streamable HTTP.

6 EPA Tools • 3 Optional DataCanvas Tools


Overview

EPA drinking-water records from SDWIS DMAP and the UCMR 5 publication. Resolve water systems, inspect historical violations and enforcement, and retrieve Lead and Copper Rule summaries or unregulated-contaminant occurrence measurements. Runs over stdio or Streamable HTTP without an API key.

Tools
ToolDescription
sdwis_list_referenceDecode identifiers, contaminant namespaces, coverage, standards, and EPA dictionaries
sdwis_search_water_systemsFind contact-free public water-system inventory
sdwis_get_system_profileRetrieve summary, geography, service areas, or treatment
sdwis_get_violationsPage reported historical SDWA violations
sdwis_search_contaminantsSelect violations, LCR summaries, or UCMR 5 occurrence
sdwis_get_enforcement_actionsRetrieve actions or violation associations
sdwis_dataframe_describeInspect tables and provenance inside a supplied canvas
sdwis_dataframe_queryRun read-only SQL against staged partitions
sdwis_dataframe_dropOptionally remove one staged table

The dataframe tools require npm or Docker with CANVAS_PROVIDER_TYPE=duckdb; drop also requires SDWIS_DATAFRAME_DROP_ENABLED=true. The Claude Desktop bundle provides the six EPA-reading tools.

Capability reference

sdwis_list_reference tool
  • Required topic: identifiers, system_types, sources, contaminants, violation_types, enforcement_types, treatment, service_areas, standards, or coverage; optional substring query
  • Interpretation topics are bundled; dictionaries are live. SDWIS codes and UCMR analytes remain separate namespaces; standards explain MCL, MCLG, and action levels without classifying historical records as exceedances

sdwis_search_water_systems tool
  • At least one narrowing selector: pwsid, name_contains, state, county (requires state), population_min / population_max, source, system_type, primacy_agency, or pwsid_prefix
  • activity defaults to active; choose inactive or all explicitly. State means reported legal-entity state; county means county served, and neither establishes complete physical service boundaries

sdwis_get_system_profile tool
  • Required nine-character alphanumeric pwsid; section is summary (default), geography, service_areas, or treatment, independently paged
  • Summary returns system; child sections return items. found:false reports missing inventory, not a compliance finding; operator contacts and mailing addresses are excluded

sdwis_get_violations tool
  • Require pwsid or state; optional county, contaminant, category, health_based, and compliance_status
  • Inclusive date_from / date_to select compliance-period overlap; unknown dates do not match. Monitoring/reporting violations may lack concentrations
  • stage:true requests a partition; stage_max_rows defaults to 5,000 and clamps at 25,000. Supply a held canvas_id to add another partition

sdwis_search_contaminants tool
  • Require dataset (violations, lcr, or ucmr5) and pwsid or state; optional county, contaminant, and inclusive dates select compliance periods, LCR sample periods, or UCMR collection dates respectively
  • LCR lead/copper select PB90/CU90 summaries, not household samples. UCMR PFAS covers 29 analytes; lithium is separate. zip and detected_only are UCMR-only; service ZIP is not sample location, and censored values remain unknown below reporting limits
  • Supports stage, canvas_id, and stage_max_rows (5,000 default, 25,000 maximum). Cold UCMR calls may need a 180-second client timeout; narrow broad requests to a PWSID or county when membership resolution times out

sdwis_get_enforcement_actions tool
  • Required pwsid; section is actions (default) or associations. Optional violation_id selects related actions through PWSID-bound association keys
  • action_type, originator, and inclusive enforcement-date filters apply only to actions. Associations page separately; source action text does not imply a federal order or monetary penalty
  • Supports stage, canvas_id, and stage_max_rows (5,000 default, 25,000 maximum)

sdwis_dataframe_describe tool
  • Required caller-held canvas_id; optional exact table_name; limit defaults to 10 and clamps at 100 with cursor pagination
  • One table-column entry per item includes types, row counts, expiry, filters, provenance, completeness, and continuation. There is no global canvas listing

sdwis_dataframe_query tool
  • Required canvas_id and one read-only SELECT, WITH, or FROM statement in sql (at most 20,000 characters); describe the canvas first
  • Retains at most CANVAS_DEFAULT_ROW_LIMIT (framework default 10,000), bounded by 25,000. row_count, truncated, and has_more distinguish retained rows from omitted rows; continuations read an immutable result for up to 15 minutes
  • File, network, write, and system-catalog access are refused. source_complete conservatively includes every live source partition, including tables the SQL does not reference

sdwis_dataframe_drop tool
  • Required canvas_id and exact table_name; requires CANVAS_PROVIDER_TYPE=duckdb and SDWIS_DATAFRAME_DROP_ENABLED=true
  • Idempotent: missing tables or expired canvases return dropped:false; other staged partitions remain available

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

EPA-specific:

  • Contact-free inventory and service membership, with source codes retained when labels are unavailable
  • Historical quarterly SDWIS records, LCR summaries, and limited-participation UCMR 5 monitoring kept distinct; empty results establish neither current compliance nor tap-water safety or contaminant absence
  • Source dates retain calendar meaning; non-midnight source timestamps retain a _raw field
  • Lazy process-local UCMR acquisition; statewide requests can exceed the 45-second membership budget even after archive acquisition. Narrow by PWSID/county rather than treating the server as a complete national warehouse

Agent-friendly output:

  • Provenance — effective_filters, source URL, retrieved_at, publication/HTTP validators when available, and interpretation caveats
  • Completeness — source_complete:false can remain false with has_more:false after earlier rows were delivered in other pages or partitions; aggregation does not restore completeness
  • Whole-record paging — limit defaults to 10 and clamps at 100; byte limits can return fewer rows. Follow next_cursor with unchanged selectors, including empty phase:membership pages; source cursors expire after 15 minutes of inactivity
  • Oversized records — item_too_large supplies record_cursor; use view:text and concatenate JSON chunks, then follow the records continuation. Both MCP content surfaces carry the same values

Getting started

Add one of these configurations to your MCP client. No EPA account or API key is required.

{
  "mcpServers": {
    "epa-drinking-water-mcp-server": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/epa-drinking-water-mcp-server@latest"]
    }
  }
}

Or with npx (no Bun required):

{
  "mcpServers": {
    "epa-drinking-water-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cyanheads/epa-drinking-water-mcp-server@latest"]
    }
  }
}

Or with Docker:

{
  "mcpServers": {
    "epa-drinking-water-mcp-server": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "MCP_TRANSPORT_TYPE=stdio",
        "ghcr.io/cyanheads/epa-drinking-water-mcp-server:latest"
      ]
    }
  }
}

For SQL staging, set CANVAS_PROVIDER_TYPE=duckdb in the npm process environment (Docker: -e CANVAS_PROVIDER_TYPE=duckdb). Call a source tool with stage:true, retain dataset.canvas_id, then call sdwis_dataframe_describe before querying. Retain every source-partition continuation. The Claude Desktop bundle fixes CANVAS_PROVIDER_TYPE=none; staging there returns canvas_disabled.

For Streamable HTTP from a local checkout:

MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# http://localhost:3010/mcp
Prerequisites
  • Bun ≥1.4.0 or Node.js ≥24.0.0
  • Network access to EPA services; allow a 180-second client timeout for cold UCMR calls
Installation
git clone https://github.com/cyanheads/epa-drinking-water-mcp-server.git
cd epa-drinking-water-mcp-server
bun install
cp .env.example .env
bun run rebuild

Configuration

VariableDescriptionDefault
SDWIS_DATAFRAME_DROP_ENABLEDEnable early removal of staged tables when canvas is enabledfalse
CANVAS_PROVIDER_TYPEnone or duckdb; npm/Docker supports DuckDB, MCPB fixes nonenone
CANVAS_DEFAULT_ROW_LIMITSQL row ceiling, bounded by server maximum 25,00010000
CANVAS_DEFAULT_MEMORY_LIMIT_MBPer-engine budget, at most 512 MiB512
MCP_TRANSPORT_TYPEstdio or httpstdio
MCP_HTTP_HOSTHTTP bind address; Docker binds 0.0.0.0127.0.0.1
MCP_HTTP_PORTHTTP port3010
MCP_AUTH_MODEnone, jwt, or oauthnone
MCP_LOG_LEVELMinimum log levelinfo
OTEL_ENABLEDEnable OpenTelemetryfalse

See .env.example for the full overrides.

Running the server

Local development
bun run rebuild
bun run start:stdio
# or bun run start:http
bun run devcheck
bun run test
Docker
docker build -t epa-drinking-water-mcp-server .
docker run --rm -p 3010:3010 epa-drinking-water-mcp-server

The image defaults to Streamable HTTP on port 3010 with stateless sessions. Add -e CANVAS_PROVIDER_TYPE=duckdb for SQL staging.

Project structure

PathPurpose
src/index.tsRegistration, source initialization, and optional canvas
src/configDataframe-drop configuration
src/domainSelectors, reference data, schemas, and dual-surface formatting
src/mcp-server/tools/definitionsSix EPA tools and three optional dataframe tools
src/services/sdwisValidated DMAP reads, membership, paging, and joins
src/services/ucmr5Archive acquisition, parsing, indexing, and occurrence
src/services/dataframeCapability-scoped staging, SQL, expiry, and removal
testsDomain, service, tool, and integration tests
scriptsBuild, checks, packaging, and release tooling

Development guide

See CLAUDE.md and AGENTS.md.

  • Handlers throw typed failures; the framework renders errors
  • Register directly in src/index.ts; validate upstream data before normalization
  • Preserve uncertainty, provenance, dates, and completeness; never infer compliance, household exposure, or exceedances
  • Keep content[] and structuredContent equivalent; never write source results to user storage

Contributing

Issues are welcome. Run bun run devcheck and bun run test before submitting.

License

Apache-2.0.

Questions fréquentes

Qu'est-ce que io.github.cyanheads/epa-drinking-water-mcp-server ?

Search EPA drinking water systems, violations, enforcement, and contaminant measurements.

Comment installer io.github.cyanheads/epa-drinking-water-mcp-server ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add epa-drinking-water-mcp-server -e 'CANVAS_PROVIDER_TYPE=none' -e 'SDWIS_DATAFRAME_DROP_ENABLED=false' -e 'CANVAS_DEFAULT_ROW_LIMIT=10000' -e 'CANVAS_DEFAULT_MEMORY_LIMIT_MB=512' -e 'MCP_LOG_LEVEL=info' -- npx -y @cyanheads/epa-drinking-water-mcp-server@0.2.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour io.github.cyanheads/epa-drinking-water-mcp-server ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

io.github.cyanheads/epa-drinking-water-mcp-server est-il open source ?

Oui. Son code est sur GitHub sous licence Apache-2.0.

Qui maintient io.github.cyanheads/epa-drinking-water-mcp-server ?

Il est publié par cyanheads. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.