weather-mcp

weather-mcp

MCP server exposing weather tools (current conditions, forecasts, umbrella prediction, travel advice, city comparisons) via Open-Meteo, designed for integration with Databricks Agent Bricks.

Category
Visit Server

README

Weather MCP Server & Databricks Agent

A Model Context Protocol (MCP) server built with FastMCP exposing weather intelligence tools backed by the Open-Meteo API, integrated with Databricks Agent Bricks.


๐Ÿ“ Repository Structure

weather-mcp/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ weather_mcp/
โ”‚       โ”œโ”€โ”€ __init__.py          # Package exports
โ”‚       โ”œโ”€โ”€ weather_broker.py    # Adapter module & WeatherClient / WeatherRuleEngine
โ”‚       โ””โ”€โ”€ mcp_server.py        # FastMCP server & tool definitions
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ test_weather.py          # Unit & integration test suite
โ”œโ”€โ”€ AGENT_PROMPT.md              # Databricks Agent system prompt & registration guide
โ”œโ”€โ”€ CONTEXT.md                   # Domain model glossary
โ”œโ”€โ”€ README.md                    # Project documentation
โ”œโ”€โ”€ app.yaml                     # Databricks Apps manifest
โ”œโ”€โ”€ pyproject.toml               # Python package configuration
โ””โ”€โ”€ requirements.txt             # Production dependencies

๐Ÿ›๏ธ Architecture Overview

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚            Databricks Agent Bricks Agent               โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚ Model Context Protocol (MCP / HTTP)
                            โ–ผ
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚      FastMCP Server (src/weather_mcp/mcp_server.py)    โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚ Thin wrapper calls
                            โ–ผ
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚     Broker Adapter (src/weather_mcp/weather_broker.py) โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ”‚ Geocoding API                   โ”‚ Forecast API
            โ–ผ                                 โ–ผ
 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ”‚ Open-Meteo Geocoding โ”‚         โ”‚  Open-Meteo Forecast  โ”‚
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ› ๏ธ MCP Tools Reference

Tool Signature Description Key Arguments
get_current_weather Returns real-time temperature, humidity, wind speed, and conditions. location: str
get_forecast Multi-day daily forecast (high/low temps, precipitation %, conditions). location: str, days: int = 3
predict_umbrella_needed Evaluates if an umbrella is needed based on precip probability (>=40%) and volume. location: str, date: str = "today"
get_travel_recommendation Generates clothing packing advice and outdoor activity ratings. location: str, days: int = 3
compare_city_weather Compares current weather conditions across multiple cities. cities: str (comma-separated)

๐Ÿš€ Setup & Local Execution

1. Install Dependencies

uv sync

2. Run Test Suite

PYTHONPATH=src uv run python tests/test_weather.py

3. Start FastMCP Server Locally

uv run fastmcp run src/weather_mcp/mcp_server.py --transport http --port 8000

The server will listen at http://127.0.0.1:8000/mcp.


โ˜๏ธ Databricks Apps Deployment & Agent Bricks Registration

  1. Deploy App: Deploy this repository to Databricks Apps using app.yaml:

    command:
      - "fastmcp"
      - "run"
      - "src/weather_mcp/mcp_server.py"
      - "--transport"
      - "http"
      - "--host"
      - "0.0.0.0"
      - "--port"
      - "8000"
    
  2. Register External MCP Tool:

    • In Databricks Workspace -> AI Playground / Agent Bricks.
    • Click Add Tool -> External MCP Server.
    • Enter App URL: https://<databricks-app-url>/mcp.
  3. Configure System Prompt:


๐Ÿงช Demonstrated Agent Queries & Responses

Query 1: Rain & Umbrella Prediction

User: "Will it rain in Chicago tomorrow?"

  • Tool Call: predict_umbrella_needed(location="Chicago", date="tomorrow")
  • Agent Response:

    "No, it is very unlikely to rain in Chicago tomorrow (2026-08-09). The precipitation probability is only 2% with clear skies. High: 79.0ยฐF (26.1ยฐC), Low: 64.5ยฐF (18.1ยฐC). You won't need an umbrella!"

Will it rain in Chicago tomorrow?

Query 2: Travel Packing Advice

User: "Should I bring a jacket to Austin this weekend?"

  • Tool Call: get_travel_recommendation(location="Austin, TX", days=3)
  • Agent Response:

    "You will not need a heavy jacket in Austin this weekend! Temperatures will be very warm with highs reaching 99.6ยฐF (37.5ยฐC) and lows around 76.1ยฐF (24.5ยฐC). I recommend packing light summer clothing and staying hydrated."

Should I bring a jacket to Austin this weekend?

Query 3: Multi-City Weather Comparison

User: "Is it warmer right now in Chicago, Austin, or Tokyo?"

  • Tool Call: compare_city_weather(cities="Chicago, Austin, Tokyo")
  • Agent Response:

    "Currently, Austin, Texas is the warmest at 96.6ยฐF (35.9ยฐC). Comparison:

    1. Austin, TX: 96.6ยฐF (35.9ยฐC)
    2. Chicago, IL: 79.0ยฐF (26.1ยฐC)
    3. Tokyo, Japan: 73.9ยฐF (23.3ยฐC)"

Is it warmer right now in Chicago, Austin, or Tokyo?

Query 4: Edge Case Error Handling

User: "What's the weather in NonExistentCityXYZ?"

  • Tool Call: get_current_weather(location="NonExistentCityXYZ")
  • Agent Response:

    "I couldn't find a location matching 'NonExistentCityXYZ'. Could you please check the spelling or provide the city name alongside its state or country?"

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured