weather_mcp
0
Weather-MCP is a FastAPI server designed to deliver real-time weather alerts and forecasts via natural language interaction. It utilizes FastMCP and Pydantic AI to provide users with seamless access to weather information.
🌦️ Weather-MCP
Weather-MCP is a FastAPI server that integrates with FastMCP and Pydantic AI to provide real-time weather alerts and forecasts. It allows users to interact with the server through natural language prompts, enabling access to weather information easily.
🚀 Features
- Fetch active weather alerts for U.S. states.
- Retrieve detailed weather forecasts via geographic coordinates.
- Natural language interaction with Pydantic AI.
- Extensible toolset using FastMCP.
📋 Table of Contents
- Features
- Installation
- Usage
- API Endpoints
- Contributing
- License
🛠️ Installation
Prerequisites
- Python 3.8 or higher
- An OpenAI API key
Steps
- Clone the repository.
- Create and activate a virtual environment.
- Install dependencies.
- Set the OpenAI API Key.
- Start the server.
💡 Usage
Interacting via Pydantic AI
Interact with the server using natural language through Pydantic AI.
Direct Tool Invocation
Invoke tools directly using FastMCP's client.
📡 API Endpoints
get_weather_alerts(state: str) -> str
: Fetches active weather alerts by state.get_weather_forecast(latitude: float, longitude: float) -> str
: Retrieves forecasts based on geographic coordinates.
🤝 Contributing
- Fork the repository.
- Create a new branch and commit changes.
- Push to the branch and open a pull request.
📄 License
Licensed under the MIT License.