U.

U.S. National Parks MCP Server: Alerts and Trails

Explore U.S. National Parks on the MCP server for latest alerts, park details, visitor centers, campgrounds, trails, and events.

Quick Install
npx -y @KyrieTangSheng/mcp-server-nationalparks

Overview

This MCP (Model Context Protocol) server exposes curated data about U.S. National Parks — alerts, park metadata, visitor centers, campgrounds, trails, and scheduled events — in a lightweight API suitable for integration with generative AI agents, chat assistants, trip planners, or monitoring dashboards. It implements a predictable, REST-style surface that can act as a context provider to models or other services that need up‑to‑date park information.

The project is open source (GitHub: https://github.com/KyrieTangSheng/mcp-server-nationalparks) and is designed for developers who want an easy-to-run local or containerized data provider. Typical uses include supplying context tokens for LLMs, driving UI widgets in mobile/web apps, and feeding automated alerting systems for park administrators and visitors.

Features

  • Exposes park-level metadata (name, description, location, entrance fees, hours)
  • Provides current alerts and advisory messages for parks
  • Lists visitor centers and campground details (amenities, coordinates)
  • Publishes trail information (length, difficulty, status) and event schedules
  • Simple REST endpoints with predictable resource names for easy consumption
  • Ready for local development and Docker deployment
  • Designed to be used as a Model Context Protocol (MCP) resource provider

Installation / Configuration

Prerequisites:

  • Node.js >= 14 (or Docker)
  • Git

Clone and install:

git clone https://github.com/KyrieTangSheng/mcp-server-nationalparks.git
cd mcp-server-nationalparks
npm install

Environment configuration (.env example):

PORT=8080
NODE_ENV=development
# Optional: if the project supports an upstream NPS API or external dataset
# NPS_API_KEY=your_nps_api_key_here
# DATA_SOURCE can be "local" (default) or "nps"
DATA_SOURCE=local

Start the server:

# development
npm run dev

# production
npm start

Docker (build and run):

docker build -t mcp-nationalparks .
docker run -p 8080:8080 --env-file .env mcp-nationalparks

If the repository includes a docker-compose file:

docker-compose up --build

Available Tools / Resources

The server exposes REST endpoints intended for programmatic consumption. Below is a concise reference of common routes and their purpose.

PathMethodDescriptionQuery/Path Params
/parksGETList parks (paginated)?page=&limit=&state=
/parks/{parkCode}GETPark details by park codeparkCode (path)
/alertsGETRecent alerts across parks?parkCode=&severity=
/parks/{parkCode}/alertsGETAlerts for a single parkparkCode (path)
/parks/{parkCode}/trailsGETTrails for a parkparkCode (path), ?maxLength=
/campgroundsGETCampgrounds list?parkCode=
/visitor-centersGETVisitor centers list?parkCode=
/eventsGETUpcoming events?parkCode=&start=&end=

Example alert response (abbreviated):

{
  "id": "alert-123",
  "parkCode": "yell",
  "title": "Road Closure - West Entrance",
  "severity": "Warning",
  "description": "Due to rockfall, the West Entrance Road is closed until further notice.",
  "startTime": "2026-04-08T10:00:00Z",
  "updatedAt": "2026-04-09T14:20:00Z"
}

Authentication: If the server is configured to use an upstream API key or user authentication, configure those credentials in the .env file. Otherwise local/dev mode typically runs without authentication.

Use Cases

  • LLM context provider: Attach recent park alerts and trail conditions as context for a conversational agent answering visitor safety questions. Example: fetch /parks/yell and /parks/yell/alerts before generating a hiking recommendation.
  • Trip planning app: Populate a mobile itinerary by fetching parks, campgrounds, and events. Example flow:
    1. GET /parks?state=UT
    2. GET /parks/{parkCode}/trails
    3. GET /parks/{parkCode}/campgrounds
  • Alerting/monitoring system: Poll /alerts or /parks/{parkCode}/alerts on a schedule; trigger email/SMS when severity=“Critical”.
  • Mapping and visualization: Use the trails and visitor-centers endpoints to render trailheads and points of interest on an interactive map.
  • Data enrichment for search: Index the parks and events endpoints into a search engine (Elasticsearch/Algolia) to provide fast lookup and faceted search.

Quick Examples

Fetch all parks (curl):

curl "http://localhost:8080/parks?page=1&limit=20"

Fetch trails for a park:

curl "http://localhost:8080/parks/grca/trails"

Fetch active alerts across parks:

curl "http://localhost:8080/alerts?severity=Warning"

Notes for Developers

  • The API is intentionally simple to make it easy to use from server-side code, edge functions, or within an agent pipeline feeding context to models.
  • Check the repository README and code for configuration options related to data sources (local JSON fixtures vs remote NPS API) and any available sample data.
  • If you plan to deploy to production, add appropriate authentication, rate limiting, and update-checking cadence for upstream data feeds.

For code, issues, and contribution instructions, see the project repository: https://github.com/KyrieTangSheng/mcp-server-nationalparks