Content
# Weather MCP
Model Context Protocol (MCP) based Weather Application
## Overview
This application is a MCP server that retrieves and displays weather forecast data using the Open-Meteo API. Through the MCP protocol, LLM applications can access weather information.
## Features
- Display current weather information
- Display 3-day weather forecast
- Retrieve weather information based on location
- Access through MCP protocol
## Setup
1. Install dependencies:
```bash
pip install -e .
```
2. Configure environment variables:
Create a `.env` file and set the required environment variables.
```
MCP_API_KEY=your_api_key_here
MCP_BASE_URL=http://localhost:8000
```
3. Start the MCP server:
```bash
python -m app.server
```
4. Run the client:
```bash
python -m app.client
```
## MCP Tools
### get_weather
Retrieve current weather information and 3-day forecast for a specified city.
**Parameters:**
- `city`: City name to retrieve weather information (e.g. Tokyo, New York)
**Response Example:**
```json
{
"location": {
"name": "Tokyo",
"country": "Japan",
"latitude": 35.6895,
"longitude": 139.6917,
"timezone": "Asia/Tokyo"
},
"current": {
"temperature": 22.5,
"feels_like": 23.1,
"humidity": 65,
"wind_speed": 3.2,
"wind_direction": 180,
"precipitation": 0,
"condition": "Sunny",
"weather_code": 1
},
"forecast": [
{
"date": "2023-04-10",
"max_temp": 24.5,
"min_temp": 15.2,
"precipitation": 0,
"condition": "Sunny",
"sunrise": "05:30",
"sunset": "18:15"
},
...
]
}
```
## License
MIT
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
markitdown
Python tool for converting files and office documents to Markdown.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
mempalace
The highest-scoring AI memory system ever benchmarked. And it's free.
mempalace
The highest-scoring AI memory system ever benchmarked. And it's free.