Skip to main content
Glama

MCP 天气服务器

铁匠徽章

该项目是模型上下文协议 (MCP) 服务器的演示实现,该服务器提供与天气相关的工具。该服务器公开两个工具:

  1. get-alerts :获取特定美国州的有效天气警报。

  2. get-forecast :根据纬度和经度提供特定位置的天气预报。

特征

  • 使用 Node.js 构建。

  • 实施 MCP 工具来检索天气数据。

  • 使用美国国家气象局 API 获取准确和最新的天气信息。

Related MCP server: Weather MCP Server

先决条件

  • 您的系统上安装了 Node.js。

  • 熟悉 MCP 概念和工具。

设置

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 mcp-server-learn:

npx -y @smithery/cli install @adarshem/mcp-server-learn --client claude

手动安装

  1. 克隆存储库:

    git clone <repository-url> cd weather
  2. 使用pnpm安装依赖项(如项目中配置的那样):

    pnpm install
  3. 构建项目:

    pnpm build

配置

更新 VSCode 的settings.json文件以添加此 MCP 服务器

{ "mcpServers": { "weather": { "command": "node", "args": [ "/ABSOLUTE/PATH/TO/PARENT/FOLDER/weather/build/index.js" ] } } }

资源

One-click Deploy
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

Latest Blog Posts

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/adarshem/mcp-server-learn'

If you have feedback or need assistance with the MCP directory API, please join our Discord server