天气 MCP 服务器 logo

天气 MCP 服务器

by qianyan

This is a weather query server built on FastMCP, providing city weather information query services. It allows users to retrieve temperature, humidity, and weather descriptions for cities worldwide.

View on GitHub

Last updated: N/A

What is 天气 MCP 服务器?

The 天气 MCP 服务器 is a weather query server that utilizes the Model Context Protocol (MCP) to provide weather information for cities around the world. It leverages the OpenWeatherMap API to fetch real-time weather data and presents it in a structured format.

How to use 天气 MCP 服务器?

To use the server, you can either install it locally or use it via uvx. After setting up the server and configuring the OpenWeatherMap API key, you can send MCP requests with the get_weather tool, specifying the city name and desired temperature units (metric or imperial). The server will respond with the temperature, humidity, and a brief weather description.

Key features of 天气 MCP 服务器

  • Global city weather query

  • Temperature, humidity, and weather description

  • Celsius and Fahrenheit temperature units

  • Model Context Protocol (MCP) implementation

  • Complete logging

Use cases of 天气 MCP 服务器

  • Integrating weather information into Claude workflows

  • Providing weather updates in applications

  • Automated weather reporting

  • Personalized weather assistants

FAQ from 天气 MCP 服务器

What is the required Python version?

Python 3.8 or higher is required.

Do I need an OpenWeatherMap API key?

Yes, an OpenWeatherMap API key is required to fetch weather data.

How do I install the dependencies?

You can install the dependencies using make install after cloning the repository.

How do I run the server?

You can run the server using make run after setting up the environment variables.

How do I specify the temperature units?

You can specify the temperature units in the get_weather request using the units parameter, either 'metric' for Celsius or 'imperial' for Fahrenheit.