返回 MCP 目录
public公开dns本地运行

国家公园数据助手

便于使用国家公园管理局(NPS)API检索国家公园服务数据,允许用户按州列出国家公园并获取特定公园的详细信息。

article

README


MCP Server for National Park Services Data

This MCP Server provides an interface to retrieve National Park Services (NPS) data. It allows users to:

  • Retrieve a list of national parks in a given U.S. state.
  • Fetch detailed information about a specific national park.

It uses the National Park Service API to obtain the data.

Requirements

Setup

  1. Clone this repository:

    git clone <repository-url>
    cd <repository-folder>
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file in the root directory and add your NPS API key:

    API_KEY=your_nps_api_key_here
    

Running the Server

To start the MCP server:

npm run build
node ./build/server.js

Using Claude Desktop:

  1. Add this MCP Server to the claude_desktop_config.json
{
    "mcpServers": {
        "nps": {
            "command": "node",
            "args": [
                "/<Path to Server>/build/index.js"
            ],
            "env": {
                "API_KEY": "Your NPS API Key"
            }
        }
    }
}
  1. Start or Restart Claude Desktop
  2. Ensure your MCP server is recognized and running by clicking on the tools icon at the bottom of Claude's chat window.
  3. Use Claude's interface to query National Park Services data.

API Endpoints

Fetch List of National Parks by State

Tool Name: park-list

Parameters:

  • stateCode (string) – Two-letter U.S. state code

Response Example:

[
  {
    "fullName": "Yellowstone National Park",
    "description": "First national park in the U.S.",
    "parkCode": "yell"
  }
]

Fetch Details of a National Park

Tool Name: park-details

Parameters:

  • parkCode (string) – National Park lookup code

Response Example:

[
  {
    "fullName": "Yellowstone National Park",
    "description": "First national park in the U.S.",
    "states": "WY, MT, ID"
  }
]

Prompts

Retrieve Parks in a State

Prompt Name: parks-by-state

Parameters:

  • stateCode (string)

Example:

What National Parks are in the state of CA?

Get Park Details

Prompt Name: details-for-park

Parameters:

  • park (string)

Example:

Give me details about Yellowstone National Park.
help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端