______________________________________________________________________
国家公园服务数据MCP服务器
此MCP服务器提供了一个检索国家公园服务(NPS)数据的接口。它允许用户:
- 检索美国某个州的国家公园列表。
- 获取特定国家公园的详细信息。
它使用API国家公园管理局获取数据。
需求
- Node.js(建议使用v18+)
- npm或纱线
- 有效的NPS API密钥(可在 https://www.nps.gov/subjects/developer/get-started.htm)
- 已安装Claude Desktop(用于运行MCP服务器)
设置
- 克隆此存储库:
git clone
cd - 安装依赖项:
npm install- 创建一个
.env文件,并添加NPS API密钥:
API_KEY=your_nps_api_key_here运行服务器
要启动MCP服务器,请执行以下操作:
npm run build
node ./build/server.js使用克劳德桌面:
- 将此MCP服务器添加到
claude_desktop_config.json
{
"mcpServers": {
"nps": {
"command": "node",
"args": [
"/
/build/index.js"
],
"env": {
"API_KEY": "Your NPS API Key"
}
}
}
}- 启动或重新启动Claude Desktop
- 点击Claude聊天窗口底部的工具图标,确保您的MCP服务器被识别并正在运行。
- 使用克劳德的界面查询国家公园管理局的数据。
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.
