MCP-Based Weather Information System
Generates AI-powered responses using Google Gemini API.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP-Based Weather Information System
A Python-based project that provides weather information using MCP tools and includes a simple web dashboard for viewing weather details. The project integrates WeatherAPI for live weather data and Google Gemini API for AI-powered responses through FastMCP.
Features
MCP Server
Retrieves current weather information for any location.
Generates AI-powered responses using Google Gemini.
Weather Dashboard
Provides an interactive and user-friendly interface.
Displays weather details for the selected city instantly.
Related MCP server: MCP Weather Server
Project Structure
MCP/
├── my_mcp_server.py # MCP and HTTP server
├── weather_dashboard.py # Weather dashboard UI
├── weather.html # Legacy static page
├── .env # API keys and setup
└── venv/ # Virtual environmentRequirements
Python 3.10 or higher
WeatherAPI API key
Google Gemini API key
Installation
1. Create a Virtual Environment
python -m venv venv
.\venv\Scripts\Activate.ps12. Install Dependencies
pip install mcp python-dotenv requests google-genai3. Create a .env File
GOOGLE_API_KEY=your_google_api_key
WEATHER_API_KEY=your_weather_api_key
WEATHER_API_BASE_URL=https://api.weatherapi.com/v1
MCP_SERVER_PORT=8001
HTTP_SERVER_PORT=8002
WEATHER_DASHBOARD_PORT=8080Running the Weather Dashboard
Start the dashboard:
python weather_dashboard.pyOpen:
http://localhost:8080Steps
Enter a location (e.g., Delhi).
Click the Get Weather button.
View weather details instantly.
Running the MCP Server
Start the server:
python my_mcp_server.pyHealth Check
curl http://localhost:8002/healthExample Tool Request
curl -X POST http://localhost:8002/ `
-H "Content-Type: application/json" `
-d '{"tool":"get_current_weather","args":{"location":"London"}}'Available MCP Tools
Tool | Description |
| Returns current weather information for a location. |
| Generates AI-powered responses using Google Gemini. |
Notes
Use accurate city names for better results.
Keep the .env file secure and private.
Technologies Used
Python – Core programming language used for developing the application.
FastMCP – Framework used to create and manage MCP tools and services.
Requests – Python library used for making HTTP requests to external APIs.
Python Dotenv – Used to load environment variables from a .env file.
Google Gemini API – Used to generate AI-powered text responses.
WeatherAPI – Provides real-time weather data for different locations.
HTML, CSS, and JavaScript – Used to create an interactive web interface.
Project Results
Image 1: Weather Dashboard Home Interface
Image 2: Real-Time Weather Information Interface
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Weather MCP — wraps Open-Meteo API (free, no auth)
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
WeatherAPI.com MCP — wraps WeatherAPI.com (api.weatherapi.com)
Get current weather for any city and create images from your prompts. Streamline planning, reports…
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides current weather and multi-day forecasts for any location worldwide, integrable with MCP clients like Claude.5Apache 2.0
- FlicenseNot gradedqualityDmaintenanceProvides real-time weather information for any location using FastMCP.-
- AlicenseNot gradedqualityCmaintenanceProvides weather data from WeatherAPI.com through MCP, enabling AI agents to query current conditions and forecasts via natural language.146 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides weather data including current conditions, forecasts, and summaries via Open-Meteo with no API key required, enabling natural language queries through an MCP interface.MIT