weather-mcp

weather-mcp

0

weather mcp server with openweather

Weather MCP Server

This is a Model Context Protocol (MCP) server using the OpenWeather API to fetch weather data and air quality information.

Features

  • Detailed weather forecast for any city (up to 5 days)
  • Current air quality information for any city

Installation

Prerequisites

Steps

  1. Clone the repository
  2. Connect to the MCP server by adding the JSON configuration to your MCP client.

Usage

After connecting, you can use the Weather MCP Server to:

  • Ask for the weather forecast of any city
  • Request air quality information for any city

Example prompts:

  • "What is the weather forecast for the next 3 days in Beijing?"
  • "How is the air quality in Shanghai now?"

Troubleshooting

  • Ensure API key is correctly provided in the command line
  • Make sure your network can access the OpenWeather API
  • Verify your MCP client server configuration is correct

Technical Details

  • Uses OpenWeather API for weather data
  • FastMCP framework for implementing MCP protocol
  • Python's requests library for API interaction