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., "@MCP Weather Servercheck for any active weather alerts in California"
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.
MCP WEATHER SERVER WRITTEN IN TYPESCRIPT
Protocol Map
This weather MCP server implements the Model Context Protocol (MCP) to provide weather data through a standardized interface. Below is the complete protocol mapping showing how the server communicates with MCP clients.
Server Information
Name:
weatherVersion:
1.0.0Transport: STDIO (Standard Input/Output)
Protocol: Model Context Protocol
Capabilities
Tools
The server exposes two tools for weather data retrieval:
1. get_alerts
Retrieves active weather alerts for a US state.
Input Schema:
Example Request:
Example Response:
Error Response:
2. get_forecast
Retrieves weather forecast for a specific location using latitude and longitude coordinates.
Input Schema:
Example Request:
Example Response:
Error Responses:
Communication Flow
Protocol Messages
Initialization
Client → Server:
Server → Client:
Tool Discovery
Client → Server:
Server → Client:
External API Integration
National Weather Service API
The server integrates with the following NWS API endpoints:
Endpoint | Purpose | Rate Limit |
| Retrieve active alerts for a state | User-Agent required |
| Get grid point metadata | User-Agent required |
| Retrieve detailed forecast | User-Agent required |
Required Headers:
Error Handling
The server implements graceful error handling for:
Invalid coordinates: Returns error message for non-US locations
Network failures: Returns "Unable to fetch..." messages
Missing data: Returns "No active alerts" or similar user-friendly messages
API errors: Catches and handles HTTP errors from NWS API
Transport Layer
Type: STDIO (Standard Input/Output)
Encoding: UTF-8
Message Format: JSON-RPC 2.0
Framing: Newline-delimited JSON
Security Considerations
Input Validation: All parameters are validated against schema
Rate Limiting: Respects NWS API rate limits
Error Sanitization: External API errors are sanitized before returning to client
No Authentication: Server uses public NWS API (no credentials required)
Logging
STDIO Servers: All logs written to
stderr(neverstdout)Log Location: Configured in MCP client (e.g.,
~/Library/Logs/Claude/mcp-server-weather.log)Log Level: Errors and warnings only (to avoid STDIO corruption)