weather
MCP server from CodeByWaqas/weather-mcp-server
claude mcp add --transport stdio codebywaqas-weather-mcp-server uv --directory /<absolute-path>/weather-mcp-server/src/resources run server.py \ --env WEATHER_API_KEY="YOUR_API_KEY"
How to use
This Weather MCP Server provides real-time weather information by interfacing with the OpenWeatherMap API. It delivers metric-unit data including temperature, humidity, wind speed, sunrise and sunset times, and a descriptive weather summary. The server is designed to run via UV (uvx) in a Claude Desktop workflow, enabling you to ask the model for current conditions, forecasts, or location-based weather details and have responses grounded in up-to-date data from OpenWeatherMap. To use it, provide your OpenWeatherMap API key as an environment variable (WEATHER_API_KEY) and run the server through the configured UV environment. Once running, you can query weather information through Claude Desktop or any MCP client integrated with this server, and the responses will reflect the latest data for the requested location.
Common use cases include: requesting current temperature and conditions for a city, retrieving wind speed and humidity, and getting sunrise/sunset times for a given locale. The MCP server abstracts API calls, so you can focus on natural-language prompts while receiving structured, up-to-date weather details.
How to install
Prerequisites:
- Python 3.12 or higher
- OpenWeatherMap API key
- Internet access to reach the OpenWeatherMap API
Option A: Installing via Smithery
- Install the MCP server automatically via Smithery: npx -y @smithery/cli install @CodeByWaqas/weather-mcp-server --client claude
Option B: Manual Installation
- Clone the repository: git clone https://github.com/CodeByWaqas/weather-mcp-server
- Create a virtual environment and activate it: python -m venv .venv source .venv/bin/activate # On Windows use: .\venv\Scripts\activate
- Install dependencies: pip install -e .
- Install additional MCP components needed for development (if not already present): uv add "mcp[cli]" python-dotenv requests httpx
- Create and configure the environment file for weather API access as described in the Configuration section (WEATHER_API_KEY).
Additional notes
Tips and notes:
- Ensure Python 3.12+ is installed and the virtual environment is active when running the server.
- Set WEATHER_API_KEY in the environment to authorize calls to OpenWeatherMap.
- The UV command you configure should point to the server.py script within src/resources, as shown in the example configuration.
- If you encounter connectivity issues, verify that the API key is valid and that there are no network restrictions blocking access to OpenWeatherMap.
- For Claude Desktop integration, ensure the path in the mcpServers configuration matches your local setup and that the environment variable is provided where the client expects it.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP