Siddhant-kochhar/weather_mcp_server
3.1
If you are the rightful owner of weather_mcp_server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A weather information server built with FastAPI and MCP that provides weather data through a web interface.
Weather MCP Server
A weather information server built with FastAPI and MCP (Machine Conversation Protocol) that provides weather data through a beautiful web interface.
Features
- 🌤️ Real-time weather information
- 🎨 Modern, responsive web interface
- 🔄 Asynchronous API endpoints
- 🔒 Secure API key management
- 🚀 Fast and efficient data delivery
Prerequisites
- Python 3.8 or higher
- Virtual environment (recommended)
Installation
- Clone the repository:
git clone <repository-url>
cd weather_mcp_server
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the root directory with your API keys:
OPENWEATHER_API_KEY=your_api_key_here
Running the Server
- Start the server:
python run_server.py
- Open your browser and navigate to:
http://localhost:8000
Project Structure
src/
fastapi_server.py
- Frontend server with web UImcp_server.py
- MCP server implementationmain.py
- Entry point for MCP serverweather_tools.py
- Weather API integrationconfig.py
- Configuration management
run_server.py
- Server startup scriptrequirements.txt
- Project dependencies
API Endpoints
GET /
- Web interfacePOST /weather
- Get weather dataGET /health
- Health check endpoint
License
MIT License