National Parks MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@National Parks MCP ServerFind parks in Montana"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Public Hosted Server: https://national-parks.caseyjhand.com/mcp
Tools
Six tools shaped around the trip-planning workflow — resolve a park, then key the detail tools on its code:
Tool | Description |
| Resolve a place name, US state, or free-text query to parks — the required first step. Returns each park's |
| Full detail for up to ten parks in one batched call: description, activities, fees & passes, hours, contacts, directions, weather overview, images. |
| Current alerts for a park or state — closures, hazards, caution, information — with category and recency surfaced first. |
| Campgrounds at a park or state: amenities, reservable vs. first-come site counts, reservation info, accessibility, and fees. |
| Curated things to do and points of interest: title, duration, location, accessibility, and fee/pet/reservation flags. |
| Scheduled events within a date range: dates/times, location, category, fee, and registration links. |
Coverage is US National Park Service sites only — national parks, monuments, historic sites, seashores — not state parks and not Forest Service or BLM land.
The parkCode spine
parkCode (e.g. yose, grca, zion) is the join key for the whole API. The workflow is two steps:
nps_find_parksresolves a name / state / query →parkCode(s) plus a summary.nps_get_park,nps_get_alerts,nps_find_campgrounds,nps_get_activities,nps_find_eventskey on thatparkCode.
nps_get_alerts, nps_find_campgrounds, and nps_find_events also accept a stateCode for statewide queries without a code (e.g. "is anything closed in Montana's parks?"). The coordinates returned by nps_find_parks / nps_get_park feed weather servers (nws-weather, open-meteo) for a forecast.
nps_find_parks
Resolve a place name, US state, or free-text query into NPS parks — the entry point.
Free-text search across park names and descriptions (e.g.
"yosemite","civil war","redwood"); results are re-ranked locally so an exactparkCodeor name match leads, since NPS returns matches in alphabetical-by-code order with no relevance rankingFilter by two-letter
stateCodeor a comma-separated list (e.g."CA","WY,MT,ID")Optional
activityfilter — case-insensitive substring match applied locally (the API has no activity param) across every site matchingquery/stateCode, then paginatedPagination via
limit(1–50, default 10) andstartoffset;totalCountcounts the whole matched set, so truncation guidance names the nextstartSummary carries
parkCode, designation, states, description, coordinates, headline activities, lowest entrance fee, and the NPS pageEnrichment reports
totalCount, applied-filter echo, and broadening guidance when nothing matched
nps_get_park
Full trip-planning detail for one or more parks by parkCode.
Batch up to 10 codes in a single upstream call
Always-present core: name, designation, states, description, coordinates, weather overview, NPS page
Optional
fieldsselector (activities,topics,fees,hours,contacts,directions,images) trims the payload to the sections you needEntrance fees and passes broken out by category; operating hours by area/season with per-weekday values; phone and email contacts; representative images (capped at 5, with
imagesTruncateddisclosing when the park has more upstream)Unresolved codes surface as
missingCodesenrichment with a correction hint; only a fully-empty result is an error
nps_get_alerts
Current alerts for a park or a whole state, with category and recency leading.
Filter by
parkCode,stateCode, or free-textquery; optionalcategory(Danger,Caution,Information,Park Closure) applied locally (the API has no category param) across every matching alert, then paginatedPagination via
limit(1–50, default 20) andstartoffset; truncation guidance names the nextstartSorted most-recent-first, identically on both client surfaces (
structuredContentandcontent[])categoryBreakdownenrichment counts returned alerts per category — severity-ordered — so severity is legible without scanning each oneAn empty result is explicitly framed in the notice — good news (the park reports nothing closed or hazardous) when nothing matched, or a paging artifact when
startran past the end — never a bare errorlastIndexedDateis the recency signal — a stale date may mean the condition has changed
nps_find_campgrounds
Campgrounds at a park or across a state, flattened to what a camper filters on.
Filter by
parkCode,stateCode, or free-textquery;limit(1–50, default 15) andstartpaginationAmenity booleans: potable water, showers, RV dump station, toilets, trash collection, RV access — normalized from NPS's mixed array/string amenity fields
Reservable vs. first-come-first-served site counts, total sites, reservation guidance and booking URL (often recreation.gov)
Lowest fee, accessibility summary, coordinates, and the campground's NPS page
Some parks list lodging or backcountry permits instead of NPS-managed campgrounds; an empty result is not an error
nps_get_activities
Curated things to do and points of interest, backed by the NPS /thingstodo list (distinct from a park's raw activity tags).
Accepts a single 4-letter
parkCodeor a single two-letterstateCode— at least one is requiredFree-text
query;limit(1–50, default 15) andstartpaginationPer activity: title, short description, time commitment, location, coordinates, accessibility, season, and the NPS page
Reservation-required and pets-permitted booleans; fee description (absence does not guarantee free)
Not every park has a curated list; an empty result is not an error
nps_find_events
Scheduled events at a park within a date range — ranger programs, festivals, tours, interpretive events.
Filter by
parkCode,stateCode, or free-textquery; bound the window withdateStart/dateEnd(YYYY-MM-DD)Page-based pagination (
pageNumber/pageSize), not offset — the/eventsendpoint differs from the rest of the APIPer event: title, date range, time slots, location, category, fee info, and registration / info URLs (HTML stripped to plain text)
The events feed is sparser and less consistent than alerts or campgrounds; many parks list few or no events
A non-empty upstream
errors[]array folds into the result notice as a warning rather than failing the request
Related MCP server: National Parks MCP Server
Features
Built on @cyanheads/mcp-ts-core:
Declarative tool definitions — single file per tool, framework handles registration and validation
Unified error handling — handlers throw, framework catches, classifies, and formats
Pluggable auth:
none,jwt,oauthSwappable storage backends:
in-memory,filesystem,Supabase,Cloudflare KV/R2/D1Structured logging with optional OpenTelemetry tracing
STDIO and Streamable HTTP transports — same codebase runs locally or on Cloudflare Workers
NPS-specific:
One service wrapping the NPS Data API (
developer.nps.gov/api/v1,X-Api-Keyauth) across six trip-planning endpointsAggressive normalization of NPS's inconsistent payloads — numeric and boolean fields returned as strings, nested values (
campsites.totalSites), array-typed amenity fields, and the distinct/eventsenvelope with lowercased field names — coerced to clean domain types before they reach handlersnps_get_parkbatches up to ten park codes into a single upstream requestLight retry on transient upstream failures (5xx / network); a missing or invalid key fails loud and names
NPS_API_KEY
Agent-friendly output:
Result-set context on every response —
totalCount, truncation (shown/cap), applied-filter echo, and empty-result notices reach both the structured and text surfacesThe
parkCode-first workflow is encoded in every tool description;nps_get_parkreturnsmissingCodesso a wrong code self-correctsUncertainty preserved, never fabricated — every derived field is nullable and a missing upstream value yields
null, not a guess; coordinates are never invented for downstream weather lookups
Getting started
Public Hosted Instance
A public instance is available at https://national-parks.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP, with this client config:
{
"mcpServers": {
"national-parks-mcp-server": {
"type": "streamable-http",
"url": "https://national-parks.caseyjhand.com/mcp"
}
}
}Self-hosted
Add the following to your MCP client configuration file. A free NPS Data API key is required — instant signup here.
{
"mcpServers": {
"national-parks-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/national-parks-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"NPS_API_KEY": "your-api-key"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"national-parks-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/national-parks-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"NPS_API_KEY": "your-api-key"
}
}
}
}Or with Docker:
{
"mcpServers": {
"national-parks-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "NPS_API_KEY=your-api-key",
"ghcr.io/cyanheads/national-parks-mcp-server:latest"
]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 NPS_API_KEY=... bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.3 or higher (or Node.js v24+).
A free NPS Data API key — instant signup. The server fails to start without it.
Installation
Clone the repository:
git clone https://github.com/cyanheads/national-parks-mcp-server.gitNavigate into the directory:
cd national-parks-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env and set NPS_API_KEYConfiguration
All configuration is validated at startup via Zod schemas. Key environment variables:
Variable | Description | Default |
| Required. NPS Data API key, sent as the | — |
| NPS Data API base URL override (testing / proxy). |
|
| Transport: |
|
| Port for the HTTP server. |
|
| Path where the MCP server is mounted. |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). |
|
| Storage backend: |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t national-parks-mcp-server .
docker run --rm -e NPS_API_KEY=your-key -p 3010:3010 national-parks-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/national-parks-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| NPS Data API service — HTTP client, retry boundary, error-envelope detection, and all upstream normalization. |
| Unit and integration tests mirroring |
Development guide
See AGENTS.md / CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools in the
createApp()arraysWrap the external API: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues and pull requests are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
Data & attribution
Data is retrieved from the NPS Data API operated by the U.S. National Park Service. Content produced by NPS employees in their official capacity is a U.S. Government work in the public domain (17 U.S.C. §§ 101 and 105). No claim to original U.S. Government works.
Not all content returned by the API is government-authored. Some images and materials carry third-party copyright or other restrictions — check individual item rights before reuse.
The NPS Arrowhead symbol is a restricted mark protected under 18 U.S.C. § 701. It must not be reproduced or reused without written permission from the NPS Director.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceFacilitates retrieval of National Park Services data using the NPS API, allowing users to list national parks by state and access detailed information about specific parks.Last updated58,8673MIT
- AlicenseBqualityFmaintenanceProvides real-time information about U.S. National Parks through the NPS API, enabling users to search parks, check details, alerts, visitor centers, campgrounds, and upcoming events.Last updated679340MIT
- Alicense-qualityDmaintenancePython based with all 29 tools that's available to developers from National Park Services (NPS)Last updatedMIT
- Alicense-qualityDmaintenanceProvides access to the National Park Service API to search for U.S. national parks, view park details, check alerts and closures, find visitor centers, campgrounds, and upcoming events.Last updated793MIT
Related MCP Connectors
Recreation.gov MCP — wraps the Recreation Information Database (RIDB) API v1
Query FDA data on drugs, food, devices, and recalls via openFDA. STDIO or Streamable HTTP.
Query SEC EDGAR filings, XBRL financials, and company data through MCP. STDIO & Streamable HTTP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/national-parks-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server