Weather
@X-shuffle
关于 Weather
个基于Go语言开发的天气查询MCP(Model Context Protocol)服务器,提供实时和未来天气信息查询功能。
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"weather-mcp-server": {
"command": "go",
"args": [
"run",
"cmd/server/main.go"
],
"env": {
"OPENWEATHER_API_KEY": "your_openweather_api_key_here"
},
"cwd": "/path/to/weather-mcp-server"
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Weather?
Weather is a Go-based MCP (Model Context Protocol) server that provides real-time weather information. It integrates with the OpenWeatherMap API and is intended for developers who want to add weather queries to their MCP-enabled applications.
How to use Weather?
To use Weather, obtain an OpenWeatherMap API key, set it as the environment variable OPENWEATHER_API_KEY, and then configure your MCP client (e.g., Claude Desktop, Cursor) by editing its mcp_settings.json file with the command and environment settings shown in the README. The server exposes a single tool get_weather that accepts a location (city name or coordinates) and an optional hours parameter for forecasts.
Key features of Weather
- Real-time weather queries by city name or coordinates
- Supports Chinese and English city names and district names
- Optional hourly forecast (1–12 hours, 3-hour intervals)
- Easy integration via standard MCP protocol
- Built with Go, following domain-driven design principles
Use cases of Weather
- A chatbot that answers “What is the weather in Beijing?”
- A developer tool that provides weather context for automation
- A multi-language assistant supporting Chinese location queries
- An application needing current conditions and short-term forecasts
FAQ from Weather
What API key is required?
Weather requires an OpenWeatherMap API key, set via the OPENWEATHER_API_KEY environment variable. You can obtain a free key from openweathermap.org.
How do I configure this server in my MCP client?
Edit your client’s MCP settings file (e.g., claude_desktop_config.json for Claude Desktop) to add the server’s command, working directory, and environment variable with your API key. The README provides examples for development (go run) and production (binary) modes.
What location formats are supported?
You can use Chinese city names (e.g., 北京), English names (Beijing), Chinese district names (北京海淀), or coordinates in the format latitude,longitude (e.g., 39.9042,116.4074).
What does the hours parameter do?
If omitted or set to 0, it returns current real-time weather. If set to a value between 1 and 12, it returns future hourly forecasts for that many hours, but note that OpenWeatherMap forecast data is provided in 3‑hour intervals.
Where does the weather data come from?
All weather data is fetched from the OpenWeatherMap API. The server does not store any weather data; it is queried in real time.
媒体与设计 分类下的更多 MCP 服务器
MiniMax MCP
MiniMax-AIOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
MCP Figma to React Converter
StudentOfJSMCP server for converting Figma designs to React components
YouTube MCP Server
anaisbettsA Model-Context Protocol Server for YouTube
MiniMax MCP JS
MiniMax-AIOfficial MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.
Figma MCP Server
JayArrowzFigma MCP Server with full API functionality
评论