mcp-weather logo

mcp-weather

by erhwenkuo

mcp-weather is an example MCP Server for AI Agents, used to retrieve weather forecasts and alerts for US states. It demonstrates an SSE-based MCP server and a standalone MCP client.

View on GitHub

Last updated: N/A

What is mcp-weather?

mcp-weather is an SSE-based MCP server that provides weather forecasts and alerts for US states. It allows AI agents to access real-time weather information through a standardized interface.

How to use mcp-weather?

To use mcp-weather, you can either run it locally using uv or deploy it using Docker. After starting the server, you can use an MCP inspector (like the one from modelcontextprotocol) to connect to the server, list available tools (get_alerts, get_forecast), and execute them with appropriate parameters (e.g., state for alerts, latitude/longitude for forecasts).

Key features of mcp-weather

  • SSE-based MCP server

  • Provides weather forecasts

  • Provides weather alerts

  • Easy deployment with uv or Docker

Use cases of mcp-weather

  • AI agents needing weather information

  • Robotic applications requiring environmental awareness

  • Smart home systems reacting to weather conditions

  • Decision-making processes based on real-time weather data

FAQ from mcp-weather

What is MCP?

MCP stands for Model Context Protocol. It provides a standardized way for AI agents to interact with tools and services.

What is SSE?

SSE stands for Server-Sent Events. It's a server push technology enabling real-time data streaming from a server to a client.

How do I install uv?

You can install uv by running the following command: curl -LsSf https://astral.sh/uv/install.sh | sh

What ports does the server use?

By default, the server runs on port 5488. You can configure this using command-line arguments.

How do I verify the server is working?

Use the MCP inspector to connect to the server's SSE endpoint (e.g., http://localhost:5488/sse) and run the available tools.