
Weather
STDIOWeather MCP server providing US weather information and alerts using NWS API
Weather MCP server providing US weather information and alerts using NWS API
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.
git clone https://github.com/akaramanapp/weather-mcp-server.git cd weather-mcp-server
npm install
npm run build
The server provides two MCP tools that can be used by AI agents:
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 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..." } ] }
weather/
├── src/
│ └── index.ts # Main server code with MCP tool implementations
├── build/ # Compiled JavaScript files
├── package.json # Project dependencies and scripts
└── tsconfig.json # TypeScript configuration
To modify or extend the server:
src/index.ts
filenpm run build
ISC