JackKuo666_Weather-MCP-Server

JackKuo666_Weather-MCP-Server

0

The Weather MCP Server is a Model Context Protocol server providing weather information via the National Weather Service API. It offers features such as weather alerts and forecasts for specific locations and is integrated with the Cline tool for broader application use.

Weather MCP Server

This is a Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API.

Features

  • Get weather alerts for a US state
  • Get weather forecast for a specific location (using latitude and longitude)

Requirements

  • Python 3.10+
  • FastMCP
  • httpx

Installation

  1. Clone this repository
  2. Set up a virtual environment.
  3. Install the required packages using uv.

Configuration

Modify the config.py file to customize server settings such as API base URL and logging.

Usage

Running the server standalone

Activate the virtual environment and run the server.

Using with Cline

The server is integrated with Cline, allowing usage of weather tools like get_alerts and get_forecast.

Error Handling and Logging

The server logs errors and outputs messages according to the configured log level.

Testing

Unit tests cover the basic functionality, and manual testing can be performed using the MCP client.

Contributing

Contributions are welcome.

License

This project is open source under the MIT License.