Skip to main content
Glama
damerakd

MCP Weather Server

by damerakd

MCP Weather Server

This repository provides a simple Model Context Protocol (MCP) server written in Python that exposes weather data as tools. It is packaged so it can be published to GitHub and (optionally) to PyPI.

The server is built on the official mcp Python SDK and uses the free Open‑Meteo APIs (no API key required).

Features

  • MCP-compliant server using FastMCP

  • Two tools:

    • get_current_weather – current conditions for a city

    • get_daily_forecast – daily forecast for a city for the next N days

  • Runs locally in Python (stdio transport by default)

Installation

From the project root:

pip install -e .

Or, using uv:

uv sync

Running the MCP server locally

You can run the server directly via the console script:

python -m mcp_weather_server.server

Or, if installed as a package:

mcp-weather-server

By default it uses the stdio transport, which works with MCP-compatible clients (e.g. IDE integrations or LLM apps that support MCP).

Connecting with MCP Inspector (optional)

To experiment via HTTP instead of stdio, you can set the transport to streamable-http inside server.py and then run:

uv run --with mcp python -m mcp_weather_server.server

Then start the MCP Inspector:

npx -y @modelcontextprotocol/inspector

and connect to http://localhost:8000/mcp.

Git conventions

  • Commit messages must follow Conventional Commits (e.g. feat: add daily forecast tool, fix(server): handle API errors).

  • A Cursor rule at .cursor/rules/git-conventional-commits.mdc documents the allowed types and format.

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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/damerakd/mcp-weather-server'

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