About Weather Rs
Weather Rs is an MCP server in the Maps category: mCP Server for Weather Forecasting built with Rust.
Install
git clone https://github.com/zuramai/mcp-weather-rsThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Weather Rs
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
Rust MCP Server Weather
This repository contains a Rust implementation of a Model Context Protocol (MCP) server that provides weather forecasting capabilities. The server integrates with the Open-Meteo API to fetch real-time weather data based on geographic coordinates.
Features
- Weather Forecasting: Get current weather conditions and hourly forecasts
- Geographic Coordinates: Query weather data using latitude and longitude
- MCP Integration: Compatible with Model Context Protocol for AI assistant integration
- Real-time Data: Fetches live weather data from Open-Meteo API
- Structured Output: Returns formatted weather information including temperature, humidity, and wind speed
Installation
Prerequisites
- Rust (latest stable version)
- Cargo package manager
Building from Source
- Clone the repository:
git clone https://github.com/yourusername/mcp-weather.git
cd mcp-weather
- Build the project:
cargo build --release
- The binary will be available at
target/release/mcp-weather
Usage
Running the MCP Server
Start the weather MCP server:
cargo run
Debugging the MCP Server
Start the weather MCP server with npx @modelcontextprotocol/inspector:
npx @modelcontextprotocol/inspector cargo run
The server will start and listen for MCP protocol messages via standard input/output.
MCP Tool: get_forecast
The server provides a get_forecast tool that accepts latitude and longitude coordinates and returns weather information.
Parameters:
latitude(f32): Geographic latitude coordinatelongitude(f32): Geographic longitude coordinate
Example Response:
Current Weather:
Temperature: 22.5°C
Wind Speed: 15.2 km/h
Hourly Forecast:
- 14:00: 23.1°C, 65% humidity, 12.8 km/h wind
- 15:00: 24.2°C, 62% humidity, 14.1 km/h wind
...
API Integration
This MCP server integrates with the Open-Meteo API, a free weather API that provides:
- Current weather conditions
- Hourly forecasts
- Temperature, humidity, and wind speed data
- No API key required
Development
Project Structure
src/
├── main.rs # Application entry point
├── service.rs # MCP service implementation
├── model.rs # Data structures and API models
├── util.rs # Utility functions
└── error.rs # Error handling
Dependencies
rmcp: Rust MCP SDK for server implementationreqwest: HTTP client for API requestsserde: Serialization/deserializationtokio: Async runtimetracing: Logging and diagnostics
Adding New Features
To extend the weather service:
- Add new tools in
service.rsusing the#[tool]attribute - Define request/response models in
model.rs - Implement utility functions in
util.rs - Update error handling in
error.rs
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Open-Meteo for providing free weather data
- Model Context Protocol for the MCP specification
- Rust MCP SDK for the Rust implementation
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.