Skip to main content
Glama
weather-mcp-server

weather-mcp-server

🌦️ Weather MCP Server

A Model Context Protocol (MCP) server built with FastMCP that provides live weather information for any city using the Open-Meteo APIs.

Features

  • Get current weather for any city

  • Uses Open-Meteo Geocoding API

  • Uses Open-Meteo Weather API

  • Built using FastMCP

  • Modular project structure

  • Logging and exception handling

  • Configuration management

Related MCP server: MCP Weather Server Demo

Tech Stack

  • Python 3

  • FastMCP

  • MCP (Model Context Protocol)

  • HTTPX

  • Open-Meteo API

Project Structure

weather-mcp-server/
β”‚
β”œβ”€β”€ server.py
β”œβ”€β”€ weather_api.py
β”œβ”€β”€ config.py
β”œβ”€β”€ logger.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .gitignore
└── README.md

Installation

  1. Clone the repository

git clone https://github.com/your-username/weather-mcp-server.git
  1. Create a virtual environment

python -m venv .venv
  1. Activate the virtual environment

Windows:

.venv\Scripts\activate
  1. Install dependencies

pip install -r requirements.txt

Run the Server

python server.py

Example Tool

get_weather

Input:

Hyderabad

Output:

πŸ“ Hyderabad, India

🌑 Temperature : 30.2°C
πŸ’¨ Wind Speed  : 18.7 km/h
☁ Condition   : Moderate Drizzle

Future Improvements

  • Weather forecast

  • Air quality information

  • Multiple MCP tools

  • Docker support

  • Unit tests

Author

Rishitha Reddy

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers