Skip to main content
Glama
Amann001

Weather MCP Server

by Amann001

Weather MCP Server

A mini project demonstrating how to build and use a Model Context Protocol (MCP) server with Python.

Features

  • Weather Alerts Tool

  • Weather Forecast Tool

  • SSE Transport

  • STDIO Transport

  • MCP Client Integration

  • Docker Support

  • Async Python Implementation

Related MCP server: Weather MCP Server

Project Structure

mcpcrashcourse/
│
├── server/
│   └── mcpserver/
│       ├── server.py
│       ├── client-sse.py
│       ├── client-stdio.py
│       ├── Dockerfile
│       └── requirements.txt
│
├── weather.py
├── weather.json
├── client.py
├── README.md
├── pyproject.toml
└── uv.lock

Tools

get_alerts

Returns active weather alerts for a US state.

Example:

get_alerts("CA")

get_forecast

Returns forecast information based on latitude and longitude.

Example:

get_forecast(
    latitude=37.7749,
    longitude=-122.4194
)

Transports

STDIO

Used for local MCP communication.

SSE

Used for remote communication through HTTP.

Running the Server

STDIO

uv run server/mcpserver/server.py

SSE

Configure transport as:

mcp.run(transport="sse")

Then:

uv run server/mcpserver/server.py

Running Clients

SSE Client

uv run server/mcpserver/client-sse.py

STDIO Client

uv run server/mcpserver/client-stdio.py

Docker

Build:

docker build -t weather-mcp .

Run:

docker run weather-mcp

Technologies Used

  • Python

  • MCP

  • FastMCP

  • HTTPX

  • AsyncIO

  • Docker

  • SSE

  • STDIO

Learning Outcomes

  • Building MCP tools

  • Creating MCP servers

  • Working with MCP clients

  • Using SSE transport

  • Using STDIO transport

  • Tool invocation

  • Agent-tool communication

  • Dockerizing MCP applications

Install Server
F
license - not found
A
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    -
    quality
    D
    maintenance
    Provides weather information tools based on the National Weather Service APIs through an SSE-based MCP server that can run as a standalone process or Docker container.
  • A
    license
    -
    quality
    D
    maintenance
    Provides weather forecasts and active alerts for US locations using the National Weather Service API. It supports both local stdio and remote HTTP/SSE transport modes for flexible integration with MCP clients.
    58
    GPL 3.0
  • F
    license
    B
    quality
    D
    maintenance
    Provides weather forecasts and alerts for US locations using the National Weather Service API. Enables users to retrieve active alerts by state and detailed forecasts by coordinates via MCP tools.
    2

View all related MCP servers

Related MCP Connectors

  • NOAA and ECMWF weather forecast MCP for discovery, validation, and GribStream OAuth queries.

  • OpenWeather MCP — wraps the OpenWeatherMap API (openweathermap.org)

  • Visual Crossing Weather MCP — wraps the Visual Crossing Weather Timeline API

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Amann001/weather-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server