Weather MCP MY
天气 MCP 服务器
一个基础的模型上下文协议 (MCP) 服务器,提供从马来西亚官方开放数据门户的开放 API 检索的天气信息。该服务器使 LLM 能够获取天气预报、警报、洪水相关水位以及地震报告。
API 文档: data.gov.my
成分
工具
获取水位条件
检索指定地区或州的洪水警报相关的水位状况。如果同时提供地区和州,则以地区为准。如果未指定地区或州,则该字段为空字符串。
参数:
区:指定州内要检索洪水预警情况的地区名称。
州:要检索洪水预警情况的马来西亚州的名称。
获取警告
检索指定日期范围内发布的一般天气警告。
参数:
datetime_start:以
YYYY-MM-DD HH:MM:SS(含)格式表示的最早时间戳,用于获取天气预警信息。如果省略,则默认为当前日期。datetime_end:以
YYYY-MM-DD HH:MM:SS(含)格式表示的停止检索天气预警的最晚时间戳。如果省略,则默认为当前日期。
获取天气预报
检索给定日期范围内特定位置的天气预报。
参数:
location_name:检索预报的位置的名称或标识符。
date_start:开始检索天气预报的最早日期(含)。如果省略,则默认为当前日期。
date_end:停止检索天气预报的最晚日期(含)。如果省略,则默认为当前日期。
获取地震新闻
获取指定日期范围内特定地点的地震新闻。
参数:
位置:地震发生地点的名称或标识符。
date_start:开始搜索地震新闻的最早日期(含)。如果省略,则默认为当前日期。
date_end:停止搜索地震新闻的最晚日期(含)。如果省略,则默认为当前日期。
Related MCP server: Weather MCP Server
Claude桌面配置
在claude_desktop_config.json文件中添加以下内容。更多信息,请参阅Claude Desktop 用户指南。
使用uv
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"weather-my-mcp",
"run",
"weather.py"
]
}
}
}使用 Docker
创建docker镜像
docker build . --tag weather-my-mcp编辑
claude_desktop_config.json文件如下:{ "mcpServers": { "weather": { "command": "docker", "args": [ "run", "-i", "--rm", "weather-my-mcp" ] } } }
执照
此 MCP 服务器采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但须遵守 MIT 许可证的条款和条件。更多详情,请参阅项目仓库中的 LICENSE 文件。
Available Tools
4 toolsget_earthquake_newsB
Fetch earthquake news for a given location within a specified date range.
Args:
location: Name or identifier of the place where the earthquake(s) occurred.
date_start: The earliest timestamp in the form of <YYYY-MM-DD HH:mm:ss> (inclusive) to start searching for earthquake news. If omitted, defaults to the current date.
date_end: The latest timestamp in the form of <YYYY-MM-DD HH:mm:ss> (inclusive) to stop searching for earthquake news. If omitted, defaults to the current date.
Inputs: location (required), datetime_start, datetime_end.
get_warningB
Retrieve general weather warnings issued within a specified date range.
Args:
datetime_start: The earliest timestamp in the form of <YYYY-MM-DD HH:mm:ss> (inclusive) from which to retrieve weather warnings. If omitted, defaults to the current date.
datetime_end: The latest timestamp in the form of <YYYY-MM-DD HH:mm:ss> (inclusive) to stop retrieving the weather warnings. If omitted, defaults to the current date.
Inputs: datetime_start, datetime_end.
get_water_level_conditionA
Retrieve the water level conditions associated with flood warnings for a specified district or state. If both district and state are provided, the district takes precedence. If district or state is not specified, use an empty string for that field.
Args:
district: The name of the district within the specified state for which to retrieve flood warning conditions.
state: The name of the state in Malaysia for which to retrieve flood warning conditions.
Inputs: district, state.
get_weather_forecastB
Retrieve a weather forecast for a specific location within a given date range.
Args:
location_name: The name or identifier of the location for which the forecast is retrieved.
date_start: The earliest date (inclusive) to begin retrieving the weather forecast. If omitted, defaults to the current date.
date_end: The latest date (inclusive) to stop retrieving the weather forecast. If omitted, defaults to the current date.
Inputs: location_name (required), date_start, date_end.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: get_earthquake_news for earthquake-related news, get_warning for general weather warnings, get_water_level_condition for flood-specific water level data, and get_weather_forecast for general weather predictions. There is no overlap in functionality, and the descriptions clearly differentiate their domains (earthquakes, warnings, floods, forecasts).
All tool names follow a consistent verb_noun pattern with 'get_' as the prefix, followed by a descriptive noun phrase (e.g., get_earthquake_news, get_warning, get_water_level_condition, get_weather_forecast). This uniformity makes the tool set predictable and easy to understand.
With 4 tools, the count is reasonable for a weather-focused server, covering key areas like earthquakes, warnings, floods, and forecasts. It is slightly lean but well-scoped, as each tool addresses a distinct aspect of weather and related hazards without redundancy.
The tool set covers specific weather-related data (earthquakes, warnings, floods, forecasts) but has notable gaps for a general 'Weather MCP' server. Missing operations include current weather conditions, historical data, or broader meteorological tools (e.g., humidity, wind speed), which limits comprehensive coverage of the weather domain.
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
This MCP server provides seamless access to Malaysia's government open data, including datasets, w…
Bangladesh's first national public data MCP server and REST API (mcp-bangladesh). Combines 8 live Bangladesh government datasets into a single free, zero-auth endpoint: DGHS dengue and measles stats, FFWC river flood levels (44 stations), BPDB power generation (40 plants), district weather, city air quality (AQI), 6 ministry notice boards, Bangladesh Bank forex/inflation, and geography.
An MCP server for weather information by @kulybaba
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceThis is a Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API. Features Get weather alerts for a US state Get weather forecast for a specific location (using latitude and longitude)-
- AlicenseBqualityDmaintenanceAn MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.1415MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides tools to fetch weather alerts for US states and forecasts based on latitude/longitude coordinates using the US National Weather Service API.21MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that provides hourly and daily weather forecasts using the AccuWeather API.2376 npm34TypeScriptMIT