Weather MCP Server
This server provides real-time weather information and alerts for US locations via the Model Context Protocol (MCP).
Get weather alerts for any US state using the
get-alertstool with a two-letter state codeFetch detailed weather forecasts with the
get-forecasttool by providing latitude and longitude coordinatesAccess temperature, wind conditions, and short forecast descriptions
Utilizes the National Weather Service (NWS) API for real-time data
Designed for integration with AI agents
Click on "Deploy 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 Server get the forecast for New York City"
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 MCP Server
A Model Context Protocol (MCP) server that provides weather information and alerts for US locations using the National Weather Service (NWS) API. This server is designed to be used by AI agents through the Model Context Protocol.
Features
Tool for getting weather alerts for any US state
Tool for getting detailed weather forecasts for any US location using coordinates
Supports temperature, wind conditions, and short forecast descriptions
Real-time data from the National Weather Service
Related MCP server: Weather MCP Server
Prerequisites
Node.js (v16 or higher)
npm or yarn package manager
Installation
Clone the repository:
git clone https://github.com/akaramanapp/weather-mcp-server.git
cd weather-mcp-serverInstall dependencies:
npm installBuild the application:
npm run buildMCP Tools
The server provides two MCP tools that can be used by AI agents:
get-alerts
Get weather alerts for a specific US state.
Parameters:
state: Two-letter state code (e.g., CA, NY)
Example response:
{
"content": [
{
"type": "text",
"text": "Active alerts for CA: ..."
}
]
}get-forecast
Get weather forecast for a specific location using coordinates.
Parameters:
latitude: Latitude of the location (-90 to 90)longitude: Longitude of the location (-180 to 180)
Example response:
{
"content": [
{
"type": "text",
"text": "Morning: Temperature: 72°F, Wind: 5mph NW, Partly cloudy..."
}
]
}Project Structure
weather/
├── src/
│ └── index.ts # Main server code with MCP tool implementations
├── build/ # Compiled JavaScript files
├── package.json # Project dependencies and scripts
└── tsconfig.json # TypeScript configurationTechnical Details
Built with TypeScript
Implements Model Context Protocol (MCP) server
Uses @modelcontextprotocol/sdk for MCP server implementation
Interfaces with the National Weather Service (NWS) API
ES2022 target with Node16 module resolution
Development
To modify or extend the server:
Make changes in the
src/index.tsfileRebuild the application:
npm run buildDependencies
@modelcontextprotocol/sdk: MCP server implementation framework
zod: Runtime type checking and validation for tool parameters
TypeScript: Development dependency for type safety
License
ISC
Notes
This server only works for US locations as it uses the National Weather Service API
API requests are rate-limited and require a User-Agent header
All coordinates should be in decimal degrees format
This is not a standalone CLI application, but rather a server that provides tools for AI agents through the Model Context Protocol
Available Tools
2 toolsget-alertsC
Get weather alerts for a state
Inputs: state (required).
get-forecastC
Get weather forecast for a location
Inputs: latitude (required), longitude (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: get-alerts retrieves weather alerts for a state, while get-forecast provides weather forecasts for a location. There is no overlap in functionality, and an agent can easily differentiate between them based on their specific use cases.
Both tools follow a consistent verb_noun naming pattern with hyphens (get-alerts and get-forecast). This uniformity makes the tool set predictable and easy to understand, with no deviations in style or convention.
With only two tools, the server feels thin for a weather domain, as it lacks essential operations like getting current conditions, historical data, or radar information. While the tools are well-defined, the count is too low to provide comprehensive coverage for typical weather-related tasks.
The tool set is severely incomplete for a weather server, missing core functionalities such as current weather, historical data, and radar or satellite imagery. Agents will face significant gaps when trying to perform common weather queries, leading to potential failures in broader tasks.
Maintenance
Related MCP Connectors
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
US NWS weather alerts and 5-day forecasts for AI agents. $0.01 per call.
The official Model Context Protocol server for Ambee. It gives any MCP-compatible AI assistant — Claude, ChatGPT, Cursor, VS Code, Ollama, and more direct access to live air quality, pollen, and weather data. To get started, including information on signing up and obtaining your Ambee key, check out the Ambee documentation on https://docs.ambeedata.com
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides tools to fetch weather alerts for US states and forecasts based on latitude/longitude coordinates using the US National Weather Service API.21MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI models to fetch weather alerts and detailed forecasts for US locations using the National Weather Service API.ISC
- FlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that provides US weather forecasts and active alerts using the National Weather Service API.2-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides real-time weather alerts and forecasts using the National Weather Service API.-