- Home
- MCP servers
- Weather MCP Python Server
Weather MCP Python Server
- python
9
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
The Weather MCP Python server provides a minimal, paywalled MCP experience that reveals a weather.today(city) tool, a weather://today/{city} resource, and a weather.ensureCity prompt. It demonstrates both a High-Level FastMCP server over HTTP and a Low-Level JSON‑RPC server, showing how Nevermined Payments can protect tools, resources, and prompts.
How to use
Use a compatible MCP client to access protected tools from this Weather MCP server. You can request weather information by calling the exposed tool weather.today with a city name, which returns a text summary and a resource link to weather://today/{city}. Reading that resource yields structured data about today’s weather. The paywall authenticates your subscription and burns credits after each call, so you must present a valid access token to access protected endpoints.
How to install
Prerequisites: Python 3.10 or newer and a project toolchain such as Poetry (recommended) or pip.
poetry install
# or
pip install -e .
Additional sections
Environment and run configurations are shown to help you start either the High-Level or Low-Level server, and to prepare the client for authenticated access.
High-Level server run over HTTP uses an MCP endpoint at /mcp. Start the server with the following command and then connect with an MCP client or inspector.
poetry run uvicorn weather_mcp_py.app:create_app \
--factory --host 127.0.0.1 --port 8000
Available tools
weather.today
Tool that returns a weather summary for a given city. Accepts a city name and yields a text description along with a resource link to weather://today/{city}.