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 Serverwhat's the forecast for San Francisco?"
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 alerts and forecasts using the National Weather Service (NWS) API.
Features
Weather Alerts: Get active weather alerts for any US state
Location Forecasts: Retrieve detailed weather forecasts for specific coordinates
Real-time Data: Pulls live data from the official NWS API
MCP Compliance: Fully compatible with Claude Desktop and other MCP clients
Related MCP server: Weather MCP Server
Installation
Clone the repository:
git clone https://github.com/MikeySharma/weather-mcp-server.git
cd weather-mcp-serverInstall dependencies:
npm installBuild the project:
npm run buildConfiguration
Claude Desktop Setup
Add the following to your Claude Desktop MCP settings:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/absolute/path/to/weather-mcp-server/build/index.js"],
"env": {
"NODE_ENV": "production"
}
}
}
}Environment Variables
The server uses the following environment variables (optional):
# For debugging
export DEBUG_MCP=true
export NODE_ENV=developmentUsage
Available Tools
1. Get Weather Alerts
get_alerts(state: string)state: Two-letter US state code (e.g., "CA", "NY", "TX")
Returns: Active weather alerts for the specified state
2. Get Weather Forecast
get_forecast(latitude: number, longitude: number)latitude: Geographic latitude (-90 to 90)
longitude: Geographic longitude (-180 to 180)
Returns: 7-day weather forecast for the location
Example Usage with Claude
@weather get_alerts(state: "CA")@weather get_forecast(latitude: 37.7749, longitude: -122.4194)API Reference
National Weather Service API
This server uses the official NWS API:
Base URL:
https://api.weather.govRate Limits: Please respect rate limits (typically 10 requests/minute)
Data Coverage: US territories only
Response Formats
Alerts Response
{
features: Array<{
properties: {
event: string;
severity: string;
description: string;
instruction: string;
areaDesc: string;
effective: string;
expires: string;
}
}>
}Forecast Response
{
properties: {
periods: Array<{
name: string;
temperature: number;
temperatureUnit: string;
windSpeed: string;
windDirection: string;
shortForecast: string;
detailedForecast: string;
}>
}
}Development
Project Structure
weather-mcp-server/
├── src/
│ ├── index.ts # Main server entry point
│ ├── tools/
│ │ └── weather-tools.ts # Tool implementations
│ └── helpers/
│ └── weather-service.helpers.ts # API helpers
├── build/ # Compiled JavaScript
├── package.json
└── tsconfig.jsonBuilding from Source
Install TypeScript (if not already installed):
npm install -g typescriptBuild the project:
npm run buildDevelopment mode with watch:
npm run devTesting
Run the server in standalone mode for testing:
npm startError Handling
The server includes comprehensive error handling for:
Network timeouts
API rate limiting
Invalid coordinates
Unsupported locations (non-US)
Malformed responses
Limitations
US Only: NWS API only provides data for US territories
Rate Limits: Respect NWS API rate limits (10 requests/minute)
Coordinate Precision: Limited to 4 decimal places for grid points
Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
National Weather Service for providing the free API
Anthropic for the Model Context Protocol specification
MCP SDK developers
Support
For issues and questions:
Check the existing issues
Create a new issue with detailed description
Include error logs and reproduction steps
Changelog
v1.0.0
Initial release with alerts and forecast functionality
MCP protocol compliance
TypeScript implementation
Comprehensive error handling
Note: This server requires an internet connection to fetch weather data from the NWS API.
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.
Latest Blog Posts
- 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/MikeySharma/weather-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server