Overview
OpenWeather MCP Server is a simple weather forecast server that provides global weather forecasts and current weather conditions using the Model Control Protocol (MCP).
To use the server, obtain an OpenWeatherMap API key, run the server with the API key set as an environment variable or passed as a parameter, and configure your MCP client to call the weather service.
- No separate configuration file needed; API key can be passed directly through environment variables or parameters. - Support for querying weather conditions anywhere in the world. - Provides current weather and future forecasts. - Detailed weather information including temperature, humidity, wind speed, etc. - Support for different time zones.
- Getting real-time weather updates for any location.
- Integrating weather data into applications using MCP.
- Providing weather forecasts for planning events or travel.
Add to your AI client
Use these steps to connect OpenWeather MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"weather-mcp-zippland": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-zippland"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"weather-mcp-zippland": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-zippland"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"weather-mcp-zippland": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-zippland"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"weather-mcp-zippland": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-zippland"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"weather-mcp-zippland": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-zippland"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"weather-mcp-zippland": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-weather-mcp-zippland"
]
}
}
}FAQ
How do I obtain an API key?
You can register at OpenWeatherMap to get your API key.
What programming language is used?
The server is implemented in Python.
What should I do if I encounter an error?
Ensure that you have set the API key correctly and that the location name is accurate.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3068,"uuid":"9d97c656-4593-4a74-bc77-cd70dfe6b300","name":"weather-mcp","title":"OpenWeather MCP Server","description":"天气预报 MCP Server for weather forecast","avatar_url":"https://avatars.githubusercontent.com/u/126135306?v=4","created_at":"2025-03-17T02:49:46.827Z","updated_at":"2025-03-17T02:59:51.491Z","status":"created","author_name":"Zippland","author_avatar_url":"https://avatars.githubusercontent.com/u/126135306?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/Zippland/weather-mcp","target":"_self","content":"$29","summary":"$2a","img_url":"https://github.com/Zippland/weather-mcp/raw/master/image.png","type":null,"metadata":"{\"star\":\"1\",\"license\":\"MIT license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-03-17 01:03:00\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]