weather-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@weather-mcp-serverShould I bring an umbrella to Chicago tomorrow?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Weather Prediction MCP Server + Agent A weather-focused Model Context Protocol (MCP) server built with FastMCP and integrated with a Databricks Agent Bricks agent. The project exposes weather tools that allow an AI agent to retrieve current weather, obtain forecasts, and make simple weather-based recommendations. Project Overview This project follows the Day 3 MCP architecture demonstrated in the classroom reference project. Instead of a financial trading MCP server, this project provides weather capabilities using the free National Weather Service (NWS) API.
Project Structure weather-mcp-server/ │ ├── mcp_server/ │ ├── weather_mcp_server.py │ └── weather_adapter.py │ ├── agent/ │ ├── system_prompt.txt │ └── tool_list.md │ ├── requirements.txt ├── app.yaml └── README.md Weather API This project uses the National Weather Service (NWS) API. NWS was selected because:
It is free.
It does not require an API key.
It provides official U.S. weather information.
It provides current observations and forecasts.
It is suitable for demonstrating an MCP weather assistant without requiring paid services or credentials. API base URL: https://api.weather.gov The NWS API is U.S.-focused, so this implementation supports U.S. locations. MCP Server The MCP server is implemented using FastMCP. The server uses the streamable HTTP transport required by the Day 3 MCP pattern. The MCP tool functions are intentionally thin. HTTP requests and weather-data parsing are implemented separately in weather_adapter.py. Server file mcp_server/weather_mcp_server.py Adapter file mcp_server/weather_adapter.py The adapter is responsible for:
Resolving locations.
Calling the NWS API.
Handling HTTP errors.
Parsing NWS responses.
Normalizing weather data.
Applying recommendation rules. MCP Tools The server exposes three required weather tools.
get_current_weather Returns current weather conditions for a U.S. location. Input location: string Example: Chicago, IL Provides
Temperature
Conditions
Humidity
Wind speed
Wind direction
Observation time
Location information
Data source Example natural-language question: What's the weather in Chicago right now?
get_forecast Returns a multi-day forecast. Inputs location: string days: integer The number of days must be between 1 and 7. Provides
Forecast date/time
Temperature
Conditions
Precipitation probability
Wind speed
Wind direction
Data source Example natural-language question: What's the forecast for Chicago for the next three days?
get_weather_recommendation Provides a simple weather-based recommendation using forecast data. Inputs location: string date: string The date uses: YYYY-MM-DD Recommendation logic The tool applies deterministic rules to forecast information. Precipitation probability >= 40% → Recommend an umbrella.
Temperature < 55°F → Recommend a jacket.
Temperature > 80°F → Recommend light clothing and hydration. If none of the thresholds are reached, the tool reports that no special weather gear is strongly recommended. Example natural-language question: Should I bring an umbrella to Chicago tomorrow? This tool demonstrates derived reasoning rather than simply returning raw API data. Agent Configuration The Databricks Agent Bricks agent uses the Weather MCP server as an external MCP tool. The agent configuration is documented in: agent/system_prompt.txt agent/tool_list.md Agent responsibilities The agent is instructed to:
Use MCP tools for weather information.
Never invent weather information.
Use get_current_weather for current conditions.
Use get_forecast for future weather.
Use get_weather_recommendation for practical weather decisions.
Ask for clarification when a location is ambiguous.
Report API failures instead of guessing.
Ground responses in MCP tool results. Dependencies The application uses the following Python packages: databricks-sdk>=0.30.0 fastmcp>=3.2.0 python-dotenv>=1.0.1 requests>=2.31.0 Databricks App Configuration The MCP server is deployed as a Databricks App. App name: mcp-weather-server The application is started using: python mcp_server/weather_mcp_server.py The application configuration is defined in: app.yaml The MCP server uses streamable HTTP transport. Local Setup Clone the repository and install dependencies: pip install -r requirements.txt Start the MCP server: python mcp_server/weather_mcp_server.py The server can then be connected to an MCP-compatible client. Databricks Deployment
Create the Databricks App Create a new Databricks App using the MCP Server starter. Configuration: App name: mcp-weather-server Compute: Medium
Connect the GitHub repository Connect the Databricks workspace to this repository and deploy the application source.
Deploy the MCP server The application uses: app.yaml requirements.txt mcp_server/weather_mcp_server.py
Register the MCP server Register the deployed Databricks App as an external MCP server in Databricks Agent Bricks.
Configure the agent Use the system prompt from: agent/system_prompt.txt and make the three Weather MCP tools available to the agent. Agent System Prompt The agent is designed to follow these principles:
Use tools for weather facts.
Never hallucinate weather information.
Select the appropriate tool based on the user's request.
Ask for clarification when the location or date is ambiguous.
Report API failures clearly.
Explain recommendations using the returned weather data. The complete system prompt is stored in: agent/system_prompt.txt Error Handling The MCP server handles common failure cases including:
Invalid or unknown locations.
Weather API request failures.
Invalid API responses.
Missing forecast data.
Invalid dates.
Unsupported forecast ranges. Errors are returned as clean responses instead of exposing Python stack traces to the agent. The agent is instructed to report these failures rather than inventing a response. Demonstration The final submission will demonstrate the Agent Bricks agent answering at least three different natural-language weather questions. Demonstration 1 — Current Weather Question: What's the weather in Chicago right now? Expected behavior: Agent ↓ get_current_weather ↓ NWS ↓ Current weather result ↓ Agent response
Demonstration 2 — Forecast
Question:
What's the forecast for Chicago for the next three days?
Expected behavior:
Agent
↓
get_forecast
↓
NWS
↓
Multi-day forecast
↓
Agent response


Demonstration 3 — Recommendation
Question:
Should I bring an umbrella to Chicago tomorrow?
Expected behavior:
Agent
↓
get_weather_recommendation
↓
Forecast data
↓
Recommendation rules
↓
Agent response


Submission The submission includes:
Weather MCP server source code.
Weather API adapter.
Agent system prompt.
MCP tool documentation.
requirements.txt.
app.yaml.
README.
Agent demonstration screenshots.
Databricks App URL or screenshots showing the deployed application and agent. GitHub repository: https://github.com/bhavikamange03/weather-mcp-server GitHub branch: main Databricks MCP App: https://mcp-weather-server-7474647450398536.aws.databricksapps.com/mcp
Limitations
The implementation uses U.S.-focused National Weather Service data.
Location resolution depends on the external geocoding service.
Weather forecasts can change as new observations and forecasts are published.
The recommendation logic is intentionally simple and rule-based for this assignment.
The recommendation tool is not intended for emergency or safety-critical weather decisions. Future Improvements If additional development time were available, the project could be extended with:
Severe weather alerts.
Historical weather lookup.
Weather comparison across multiple cities.
More sophisticated recommendation logic.
Support for additional weather APIs and international locations.
A dashboard showing recent agent queries and recommendations.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to access real-time US weather forecasts and alerts through the National Weather Service API.215MIT
- FlicenseBqualityDmaintenanceProvides real-time US weather alerts and forecasts by integrating with the National Weather Service API. It enables AI assistants to fetch state-specific alerts and detailed local forecasts using geographic coordinates.21
- Flicense-qualityDmaintenanceProvides real-time weather alerts and forecasts from the National Weather Service for US locations, integrating with AI assistants via the Model Control Protocol.
- Flicense-qualityDmaintenanceProvides weather forecasts and alerts for US locations via the National Weather Service API, enabling AI assistants to deliver real-time weather information.20
Related MCP Connectors
US weather, alerts, earthquakes and elevation for AI agents, from NWS/NOAA and USGS. No API keys.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Get US weather forecasts, active alerts, and current observations.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/bhavikamange03/weather-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server