get_current_weatherLABSCO SUMMARY
Two tools, plus resources for the same data.
Exposing current conditions and the forecast as weather:// resources as well as tools means a client that prefers to attach context rather than call a function gets the same data either way. An api-status resource is a small thing that saves a confusing failure when the key has run out of quota.
What it is
A Python server on the OpenWeatherMap API. It answers two questions — what is the weather there now, and what is it going to be — and accepts city names in Chinese or English, which is the reason to pick it over a generic weather wrapper.
What you get
get_current_weather(city)returns formatted current conditions — temperature, humidity, wind and the restget_weather_forecast(city, days)returns the forecast, withdaysfrom 1 to 5 and defaulting to 5- Resources alongside the tools:
weather://current/{city},weather://forecast/{city}andweather://api-status - City names work in Chinese or English
Requirements
Python 3.10 or newer and an OpenWeatherMap API key, passed as OPENWEATHER_API_KEY. Set up with uv venv then uv pip install -r requirements.txt, and configure your client to run uv --directory . run main.py. The repository also documents Docker, Docker Compose and Linux system-service deployment.
Setup effort
Build from source — git clone https://github.com/KennyKang7012/mcp-server-weather
USE CASES
Checking conditions somewhere before you travel
Ask by city name, in either language, and read the current numbers.
Planning around the next few days
Pull the forecast for as many days as you need, up to five.
Working out whether the key is the problem
Read the API status resource instead of guessing at an error.
2 tools
Listed in project docs. Your client may show a different list.
get_weather_forecastBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- uv on PATH
- Python >= 3.10
- OPENWEATHER_API_KEY in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/KennyKang7012/mcp-server-weather
cd mcp-server-weather
uv venv
uv pip install -r requirements.txtMCP Clients
Any MCP client
{
"mcpServers": {
"weather": {
"command": "uv",
"args": [
"--directory",
"<YOUR_PATH_TO_MCP_SERVER_WEATHER>",
"run",
"main.py"
],
"env": {
"OPENWEATHER_API_KEY": "<YOUR_OPENWEATHER_API_KEY>"
}
}
}
}