# 国家公园数据助手
## 基本信息
- Slug: `amysatterlee-nps_mcp`
- Source: modelscope
- Publisher: @amysatterlee/nps_mcp
- Categories: travel-and-transportation / research-and-data
- Hosted: No
- License: Unknown
- Source URL: https://www.modelscope.cn/mcp/servers/@amysatterlee/nps_mcp
## 简介
便于使用国家公园管理局（NPS）API检索国家公园服务数据，允许用户按州列出国家公园并获取特定公园的详细信息。
## 安装提示

```bash
git clone <repository-url> cd <repository-folder> ``` 2. 安装依赖项： ```sh npm install
```

## MCP Server 详情

---

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

此MCP服务器提供了一个接口来检索国家公园服务（NPS）的数据。它允许用户：
- 获取给定美国州内的国家公园列表。
- 获取特定国家公园的详细信息。

它使用国家公园服务API来获取数据。

## 要求

- Node.js (推荐v18及以上版本)
- npm 或 yarn
- 有效的NPS API密钥（可从[https://www.nps.gov/subjects/developer/get-started.htm](https://www.nps.gov/subjects/developer/get-started.htm)获取）
- 安装了Claude Desktop（用于运行MCP服务器）

## 设置

1. 克隆此仓库：
   ```sh
   git clone <repository-url>
   cd <repository-folder>
   ```

2. 安装依赖项：
   ```sh
   npm install
   ```

3. 在根目录下创建一个`.env`文件，并添加您的NPS API密钥：
   ```sh
   API_KEY=your_nps_api_key_here
   ```

## 运行服务器

要启动MCP服务器：

```sh
npm run build
node ./build/server.js
```


使用Claude Desktop:

1. 将此MCP服务器添加到`claude_desktop_config.json`中

```
{
    "mcpServers": {
        "nps": {
            "command": "node",
            "args": [
                "/<Path to Server>/build/index.js"
            ],
            "env": {
                "API_KEY": "Your NPS API Key"
            }
        }
    }
}
```


2. 启动或重启Claude Desktop
3. 确保您的MCP服务器被识别并正在运行，通过点击Claude聊天窗口底部的工具图标。
4. 使用Claude的界面查询国家公园服务数据。

## API端点

### 按州获取国家公园列表

**工具名称:** `park-list`

**参数:**
- `stateCode` (字符串) – 两字母的美国州代码

**响应示例:**
```json
[
  {
    "fullName": "Yellowstone National Park",
    "description": "First national park in the U.S.",
    "parkCode": "yell"
  }
]
```


### 获取国家公园详情

**工具名称:** `park-details`

**参数:**
- `parkCode` (字符串) – 国家公园查找代码

**响应示例:**
```json
[
  {
    "fullName": "Yellowstone National Park",
    "description": "First national park in the U.S.",
    "states": "WY, MT, ID"
  }
]
```


## 提示

### 检索州内公园

**提示名称:** `parks-by-state`

**参数:**
- `stateCode` (字符串)

**示例:**
```text
What National Parks are in the state of CA?
```


### 获取公园详情

**提示名称:** `details-for-park`

**参数:**
- `park` (字符串)

**示例:**
```text
Give me details about Yellowstone National Park.
```


注意：原文中的`#0`, `#1`, `#2`, `#3`, `#4`, `#5`标记似乎是指向具体实现或示例的位置占位符，在这里保持不变。如果这些标记对应具体的代码或配置示例，请根据实际情况替换它们。

