国家公园数据服务

MCP服务器提供国家公园服务数据接口,支持按州查询公园列表和获取公园详细信息。

  • by amysatterlee
  • TypeScript
  • 本地部署
  • 3 星标
  • 更新于
在 GitHub 查看 amysatterlee/nps_mcp

使用说明


国家公园服务数据MCP服务器

此MCP服务器提供了一个检索国家公园服务(NPS)数据的接口。它允许用户:

  • 检索美国某个州的国家公园列表。
  • 获取特定国家公园的详细信息。

它使用API国家公园管理局获取数据。

需求

设置

  1. 克隆此存储库:

    git clone <repository-url>
    cd <repository-folder>
    
  2. 安装依赖项:

    npm install
    
  3. 创建一个 .env 文件,并添加NPS API密钥:

    API_KEY=your_nps_api_key_here
    

运行服务器

要启动MCP服务器,请执行以下操作:

npm run build
node ./build/server.js

使用克劳德桌面:

  1. 将此MCP服务器添加到 claude_desktop_config.json
{
    "mcpServers": {
        "nps": {
            "command": "node",
            "args": [
                "/<Path to Server>/build/index.js"
            ],
            "env": {
                "API_KEY": "Your NPS API Key"
            }
        }
    }
}
  1. 启动或重新启动Claude Desktop
  2. 点击Claude聊天窗口底部的工具图标,确保您的MCP服务器被识别并正在运行。
  3. 使用克劳德的界面查询国家公园管理局的数据。

API终点

按州提取国家公园列表

工具名称: park-list

参数:

  • stateCode (string)–两个字母的美国州代码

响应示例:

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

获取国家公园的详细信息

工具名称: park-details

参数:

  • parkCode (string)-国家公园查找代码

响应示例:

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

鼓励

检索州内的公园

提示名称: parks-by-state

参数:

  • stateCode (字符串)

例子:

What National Parks are in the state of CA?

获取公园详细信息

提示名称: details-for-park

参数:

  • park (字符串)

例子:

Give me details about Yellowstone National Park.