weather_mcp

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

  1. Clone the repository.
  2. Create and activate a virtual environment.
  3. Install dependencies.
  4. Set the OpenAI API Key.
  5. 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

  1. Fork the repository.
  2. Create a new branch and commit changes.
  3. Push to the branch and open a pull request.

📄 License

Licensed under the MIT License.