Weather-Prediction MCP Server

Weather-Prediction MCP Server

A Streamable HTTP MCP server backed by Open-Meteo, plus the prompt and registration metadata for a Databricks Agent Bricks weather agent.

Category
访问服务器

README

Weather-Prediction MCP Server + Agent

A Streamable HTTP MCP server backed by Open-Meteo, plus the prompt and registration metadata for a Databricks Agent Bricks weather agent. Open-Meteo requires no signup, API key, or committed secret.

Submission links

Architecture

User
  |
  v
Databricks Agent Bricks
  |  external MCP / Streamable HTTP
  v
Databricks App: weather_mcp_server.py
  |
  v
weather_adapter.py
  |----------------------|
  v                      v
Open-Meteo Geocoding     Open-Meteo Forecast

The server functions only validate tool inputs and shape success/error envelopes. weather_adapter.py owns all HTTP calls, API parsing, WMO-code translation, and recommendation logic.

Tools

Tool Inputs Result
get_current_weather location Temperature, feels-like temperature, condition, humidity, precipitation, and wind
get_forecast location, days (1-16) Daily high/low, feels-like values, condition, precipitation probability/amount, and wind
get_travel_recommendation location, date (YYYY-MM-DD) Forecast-backed umbrella, jacket, heat, and wind recommendations with explicit thresholds

Locations may be a city/postal-code query or a latitude,longitude pair. All temperatures use Celsius, wind uses km/h, and precipitation uses millimetres.

Recommendation thresholds:

  • Umbrella or waterproof layer: precipitation probability at least 40%.
  • Warm jacket: daily low below 10°C.
  • Light jacket: daily high below 18°C when the warm-jacket rule does not apply.
  • Heat precautions: daily high at least 28°C.
  • Strong-wind precautions: maximum daily wind at least 40 km/h.

Local setup

Python 3.10 or newer is required.

python3 -m venv .venv
.venv/bin/pip install -r requirements-dev.txt
.venv/bin/pytest -q

Start the server:

.venv/bin/python weather_mcp_server.py

The Streamable HTTP endpoint is http://localhost:8000/mcp.

Generate three live Open-Meteo examples:

PYTHONPATH=. .venv/bin/python scripts/run_demo.py

Results are written to evidence/demo_results.md. They prove live adapter calls, not an Agent Bricks deployment.

Databricks App deployment

The MCP server is designed to run as one Databricks App. Authenticate the Databricks CLI first:

databricks auth login --host https://<workspace-host>
databricks auth profiles

Create a workspace source directory, upload the project, create the app, and deploy it:

export DBX_USER='<your-workspace-email>'
export APP_NAME='weather-prediction-mcp'
export SOURCE_PATH="/Workspace/Users/${DBX_USER}/${APP_NAME}"

databricks workspace mkdirs "$SOURCE_PATH"
databricks sync . "$SOURCE_PATH" --watch=false
databricks apps create "$APP_NAME" --description 'Open-Meteo weather MCP server'
databricks apps deploy "$APP_NAME" --source-code-path "$SOURCE_PATH"
databricks apps get "$APP_NAME" -o json

Do not upload .venv; it is excluded by .gitignore. Databricks Apps installs requirements.txt and starts the app.yaml command. The deployed external MCP URL is:

https://weather-prediction-mcp-rajesh-1352785079224954.aws.databricksapps.com/mcp

The app endpoint is permission-controlled by Databricks Apps. Grant the intended agent/user permission to use the app before testing the MCP connection.

Agent Bricks configuration

The deployed server is registered as the governed Unity Catalog MCP Service:

bootcamp_students.rajesh.weather_prediction_mcp

It is connected to Agent Bricks supervisor agent:

supervisor-agent-2026-08-08-20-02-56

The agent uses these three tools:

  • get_current_weather
  • get_forecast
  • get_travel_recommendation

Four recorded conversations—including three weather questions and an ambiguous-location guardrail test—are documented in evidence/agent_bricks_transcript.md.

Error behavior

  • Empty, unresolved, and invalid-coordinate locations return a clean ok: false response.
  • Forecast lengths outside 1-16 and unsupported dates return validation messages.
  • API timeouts, HTTP errors, malformed payloads, and unexpected internal failures do not expose stack traces.
  • The agent prompt prohibits filling missing tool results with guesses.

Verification status

  • Automated adapter and MCP wrapper tests: see tests/.
  • Live Open-Meteo adapter demonstration: see evidence/demo_results.md.
  • Databricks App deployment: succeeded as weather-prediction-mcp-rajesh.
  • Authenticated deployed MCP initialization: HTTP 200, MCP protocol 2025-06-18.
  • Deployed app screenshot: see evidence/databricks-app-overview.png.
  • Active MCP Service and three-tool screenshot: see evidence/Mcp_tools_screenshot.jpg.
  • Supervisor configuration, system prompt, MCP attachment, tool trace, and Toronto response screenshot: see evidence/MCP_conversation_1.jpg.
  • Chicago forecast and Austin recommendation tool-trace screenshot: see evidence/Mcp_conversation_3.jpg.
  • Austin grounded final answer and Springfield ambiguity guardrail screenshot: see evidence/MCP_conversation_4.jpg.
  • Agent Bricks registration: completed through bootcamp_students.rajesh.weather_prediction_mcp.
  • Agent behavior: three weather conversations and one ambiguity guardrail conversation recorded in evidence/agent_bricks_transcript.md.
  • Evidence note: the Chicago conversation proves tool use but contains a “tomorrow” date-label mismatch and should be rerun for the cleanest correctness evidence.
  • GitHub repository: published at https://github.com/rajeshd101/databricks-mcp-demo.

Files

agent/agent_config.yaml     External MCP tool record
agent/system_prompt.md      Agent Bricks instructions and guardrails
app.yaml                   Databricks App process configuration
evidence/demo_results.md   Three live API demonstrations
evidence/deployment.md     Deployment and protocol evidence
evidence/databricks-app-overview.png  Deployment screenshot
evidence/agent_bricks_transcript.md  Agent conversations and tool traces
evidence/Mcp_tools_screenshot.jpg  Active MCP Service and enabled tools
evidence/MCP_conversation_1.jpg  Supervisor configuration and conversation
evidence/Mcp_conversation_3.jpg  Forecast and recommendation traces
evidence/MCP_conversation_4.jpg  Recommendation answer and guardrail
scripts/run_demo.py        Reproducible live demonstration
tests/                     Adapter and MCP error-boundary tests
weather_adapter.py         Open-Meteo HTTP/parsing/recommendation layer
weather_mcp_server.py      Thin FastMCP tool layer
SUBMISSION.md              Grader-facing submission summary
TESTING.md                 Local and deployed test procedure

Limitations

  • Current conditions are modeled Open-Meteo data, not direct observations from a local weather station.
  • Geocoding selects the first Open-Meteo match; users should add province/state and country for ambiguous names.
  • This version does not provide official severe-weather alerts. Users should consult official local alert services for safety-critical decisions.
  • Forecasts are limited to Open-Meteo's next 16 days.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选