weather-mcp-server
0
Weather MCP Server is a modular and Dockerized server for fetching live weather data from OpenWeatherMap. It can be deployed on cloud platforms like Render or Heroku and is based on FastAPI.
Weather MCP Server
A modular FastAPI-based weather server with Docker support.
Features
- Live weather from OpenWeatherMap
- Dockerized for easy deployment
- Optional cloud deployment (Render, Heroku)
Getting Started
Setup
- Create
.env
:OPENWEATHER_API_KEY=your_api_key
- Run with Docker:
docker build -t weather-mcp .
docker run -p 8000:8000 weather-mcp-server
- Access:
http://localhost:8000/weather?city=Tokyo
How to Get an OPENWEATHER_API_KEY
To use this project, you need an API key from OpenWeather. Follow these steps to obtain one:
- Go to the OpenWeather website.
- Sign up for a free account or log in if you already have one.
- Navigate to the "API Keys" section in your account dashboard.
- Generate a new API key or use an existing one.
- Copy the API key and add it to the
.env
file in the project root as follows:
OPENWEATHER_API_KEY=your_api_key_here
Deployment
You can deploy this app using Render or Heroku. See instructions in /docs
.