MCP-server-weather
Weather Intelligence MCP Server
A simple Weather Intelligence application built using the Model Context Protocol (MCP). This project demonstrates how to expose weather-related functionalities as MCP tools and access them through an MCP client.
Features
Current Weather
Weather Forecast
Rain Prediction
Compare Weather Between Cities
Activity Recommendation
Natural Language Prompt Routing
Tech Stack
Python
MCP Python SDK (FastMCP)
OpenWeather API
python-dotenv
Project Structure
mcp-server/
│── client.py # MCP Client
│── server.py # MCP Server
│── weather.py # Weather API Logic
│── .env # API Keys
│── requirements.txt
│── README.mdInstallation
git clone <repository-url>
cd mcp-server
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txtRun the Project
Start the MCP Client:
python client.pyExample Prompts
What is the weather in Mumbai?
Forecast for Delhi
Will it rain in Pune?
Compare Mumbai and Chennai
Recommend activity in Bangalore
Project Workflow
User
↓
MCP Client
↓
MCP Server
↓
Weather Logic
↓
OpenWeather APIAuthor
Samarth More
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Samarth201104/MCP-server-weather'
If you have feedback or need assistance with the MCP directory API, please join our Discord server