weather-mcp-agent
Provides current weather, multi-day forecasts, and umbrella recommendations through natural language queries, using the Open-Meteo API with no API key required.
README
Weather-Prediction MCP Server + Agent Bricks Agent Architecture User question ("Should I bring an umbrella to Austin this weekend?") │ ▼ Databricks Agent Bricks agent (system prompt below) │ calls tools over MCP (streamable-HTTP) ▼ weather_mcp_server.py (FastMCP, deployed as its own Databricks App) │ thin @mcp.tool functions, no raw HTTP calls ▼ weather_broker.py (adapter — all HTTP + parsing lives here) │ ▼ Open-Meteo API (geocoding + forecast, no API key required)
Two Databricks Apps in total: the MCP server (mcp_server/) is the only one required for a passing grade; a dashboard (stretch goal) was not built for this submission.
Weather API + auth method
Open-Meteo (api.open-meteo.com + geocoding-api.open-meteo.com) — chosen per the assignment's recommendation to start with zero credentials, so the whole pipeline could be built and tested before dealing with secrets at all. No API key, no signup, no Databricks secret scope needed. If a stretch goal adds NWS alerts or a key-based provider later, weather_broker.py is the only file that would need a _secret()-style helper added (WorkspaceClient().secrets.get_secret(...), same pattern as Day 1/2's Lakebase/Massive secrets) — the MCP tool functions wouldn't change.
Tools exposed Tool Purpose get_current_weather(location) Current temp, conditions, humidity, wind get_forecast(location, days=3) Multi-day forecast: high/low, precip chance, conditions predict_umbrella_needed(location, date) Derived recommendation (not a passthrough) — thresholds precipitation chance into "yes / maybe / no" with a one-sentence explanation
All three live in mcp_server/weather_mcp_server.py; all HTTP calls and response parsing are pushed into mcp_server/weather_broker.py — no raw requests calls inside any @mcp.tool function. Location strings are geocoded automatically (city name, "City, State", etc. — no coordinates needed). Every tool returns {"error": "<message>"} on failure (bad location, API outage) instead of raising, so the agent gets a clean signal instead of a stack trace.
Setup steps Deploy the MCP server as a Databricks App: Push this repo (or just the mcp_server/ folder) to your GitHub repo In Databricks: Repos → clone/pull this repo into your workspace Apps → Create App → point it at mcp_server/ (uses app.yaml + requirements.txt in that folder) Deploy, confirm it's running, note the App URL Register the MCP server as an external MCP tool (Agent Bricks): In your Databricks workspace, open Agent Bricks Under external tools/MCP servers, add a new external MCP pointing at your deployed weather MCP server's URL (streamable-HTTP endpoint) Confirm the three tools (get_current_weather, get_forecast, predict_umbrella_needed) show up in the tool list Build the Agent Bricks agent: Create a new agent, attach the weather MCP server as an external tool Paste in the system prompt below Test with the sample questions in the next section Agent system prompt You are a weather assistant. You have access to three tools on the weather MCP server:
- get_current_weather(location) — current conditions
- get_forecast(location, days) — multi-day forecast
- predict_umbrella_needed(location, date) — a recommendation on whether to bring an umbrella, derived from precipitation chance
Rules:
- Always call a tool to get weather data. Never guess, estimate, or make up temperatures, forecasts, or conditions from your own knowledge — weather changes constantly and your training data is not current.
- For "will it rain" / "should I bring an umbrella" / "should I pack a jacket" type questions, prefer predict_umbrella_needed over reasoning about raw forecast numbers yourself — it already applies a clear threshold and will explain its reasoning.
- If a question mentions a relative date ("tomorrow", "this weekend"), convert it to a specific YYYY-MM-DD date before calling predict_umbrella_needed or get_forecast.
- If a tool call returns {"error": ...}, don't retry blindly and don't invent an answer — tell the user plainly what went wrong (e.g. "I couldn't find that location" or "the weather service is unavailable right now") and ask them to clarify or try again.
- If a location is ambiguous (e.g. a city name that exists in multiple states/countries), ask the user to clarify rather than guessing which one they meant.
- Keep answers concise and conversational — lead with the direct answer, then the supporting numbers. Deployment status MCP server: deployed as a Databricks App and running — https://weather-mcp-server-7474644487245197.aws.databricksapps.com/mcp Local verification: the server module was installed and imported in a clean environment (not just syntax-checked), and mcp.list_tools() confirmed all three required tools register correctly: get_current_weather, get_forecast, predict_umbrella_needed. Agent Bricks registration: attempted via AI Gateway → Create MCP Service, pointing at the deployed server's /mcp URL with a Bearer token (personal access token). The connection itself was created successfully (workspace.default.weather-mcp_connection), but the subsequent tool-discovery step failed with an empty/unlabeled error ({}) and no further detail was surfaced in the UI or browser console. I was not able to complete the agent wiring in time for submission — see "Known limitations" below. Demonstration
Not completed for this submission — the Agent Bricks tool-discovery step did not succeed (see "Deployment status" above), so there is no live agent transcript to include. The MCP server itself is deployed and its tools are verified working at the code/protocol level (see verification note above); what's unverified is specifically the Agent Bricks → MCP-service handshake.
Known limitations / what I'd improve The Agent Bricks "Create MCP Service" tool-discovery step did not complete successfully against the deployed server — the connection was created, but tool discovery returned an empty error with no diagnostic detail in the UI. Given more time I'd check the app's own request logs during a discovery attempt (to see whether the request even reached the server) and try the OAuth M2M auth path instead of a Bearer/PAT token, since Databricks Apps are OAuth-protected by default. No severe-weather alerts tool yet (NWS /alerts/active would be a natural second data source to layer in, US-only). No dashboard app showing recent agent queries (stretch goal, not built for this submission). predict_umbrella_needed only reasons about precipitation chance — a richer version could factor in wind speed (umbrellas are useless in high wind) or temperature (snow vs. rain gear).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。