Skip to main content
Glama

mcp-weather

全球天气 MCP 服务器。它将地名转换为坐标,然后通过 stdio 为 Cursor 等 MCP 客户端返回当前天气状况。

仓库:github.com/deep3036/mcp-weather

功能

该服务器注册了一个工具:

工具

输入

输出

get-current-weather

location(城市或地名,至少 2 个字符)

当前温度、体感温度、湿度、降水量、风速、天气状况、昼夜、时区和坐标

location 示例:DelhiGreater NoidaMumbaiLondon

地理编码使用 Open-Meteo Geocoding。预报数据使用 Open-Meteo Forecast。这两种 API 在此用途下均无需密钥。

如果多个地点与名称匹配,则使用第一个地理编码结果。

Related MCP server: Weather MCP

环境要求

  • Node.js 20 或更高版本

  • npm

安装

npm install

运行

开发模式(通过 tsx 运行 TypeScript):

npm run dev

生产模式:

npm run build
npm start

该进程通过 stdin/stdout 进行 MCP 通信。日志输出到 stderr。请勿将其作为普通 Web 应用运行。

Cursor MCP 配置

将客户端指向此项目目录:

{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["tsx", "src/index.ts"],
      "cwd": "D:\\mcp\\weather-mcp"
    }
  }
}

构建后,可以使用 nodedist/index.js 代替 tsx

项目结构

路径

作用

src/index.ts

MCP 服务器、工具及 Open-Meteo 调用

tsconfig.json

TypeScript(ES2022NodeNextsrcdist

package.json

脚本:devbuildstart

许可证

ISC

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables users to get current weather information for any city using the Open-Meteo API. Provides detailed meteorological data including temperature, precipitation, day/night status, and hourly forecasts through natural language queries.
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables users to get real-time weather information for any city in the world. Provides current temperature and weather conditions through a simple city name query.
    MIT

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/deep3036/mcp-weather'

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