Enables retrieving weather data through curl commands for current weather, forecasts, alerts, and location searches
Provides a fetch interface for JavaScript applications to access weather data including current conditions, forecasts, and alerts
Runs as a Node.js application with HTTP API endpoints for weather data, requiring Node.js 18 or later
Uses pnpm as the package manager for installation and dependency management
Developed with TypeScript, providing type-safe interfaces for weather data interaction
Weather MCP Server
A weather MCP (Model Context Protocol) server developed with TypeScript, providing simulated weather data and related functionality.
Features
๐ค๏ธ Get current weather information
๐ Multi-day weather forecast
โ ๏ธ Weather alert system
๐ Location search functionality
๐ Weather statistics
๐ญ Mock data support
Install Dependencies
๐ Usage
Installation and Build
Startup Methods
1. MCP Protocol (stdio)
2. HTTP API Server ๐
3. Simple HTTP Server (Recommended) ๐
Dynamic Port Support
The simple HTTP server supports dynamic port configuration:
The server will automatically:
Use port 8080 as default if no port is specified
Accept any valid port number as a command line argument
Display the actual port in the startup message and documentation
HTTP API Usage Examples
Once the HTTP server is started, you can use it in the following ways:
Browser Access
Open
http://localhost:8080
to view API documentationClick links directly to test various APIs
curl Commands
JavaScript/Fetch
Development Mode
Available Tools
1. get_current_weather
Get current weather information for a specified location
Parameters:
location
(string): Location name
Example:
2. get_weather_forecast
Get weather forecast for a specified location
Parameters:
location
(string): Location namedays
(number, optional): Forecast days (1-7 days, default 3 days)
Example:
3. get_weather_alerts
Get weather alert information
Parameters:
location
(string, optional): Location name
Example:
4. search_locations
Search supported locations
Parameters:
query
(string): Search keyword
Example:
5. get_weather_stats
Get weather statistics
Parameters: None
Supported Locations
Currently supports detailed weather data for the following locations:
Hong Kong
Tokyo, Osaka, Kyoto, Hiroshima, Sapporo, Fukuoka (Japan)
London (UK)
New York (USA)
Sydney (Australia)
Other locations will return randomly generated mock data.
Technical Specifications
Language: TypeScript
Package Manager: pnpm
MCP SDK: @modelcontextprotocol/sdk
Node.js: >=18
Project Structure
HTTP API Endpoints
Endpoint | Method | Parameters | Description |
| GET | - | API documentation page |
| POST | JSON-RPC 2.0 | MCP protocol endpoint |
| GET | location (required) | Get current weather |
| GET | location (required), days (optional) | Get weather forecast |
| GET | location (optional) | Get weather alerts |
| GET | q (required) | Search locations |
| GET | - | Get statistics |
License
MIT License
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A TypeScript-based MCP server that provides simulated weather data including current conditions, forecasts, alerts, and location search functionality through both MCP protocol and HTTP API endpoints.
- Features
- Install Dependencies
- ๐ Usage
- Available Tools
- Supported Locations
- Technical Specifications
- Project Structure
- HTTP API Endpoints
- License
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.Last updated -12MIT License
- -securityFlicense-qualityAn MCP server implementation that allows users to fetch and display weather information for specified cities, including temperature, humidity, wind speed, and weather descriptions.Last updated -1
- -securityFlicense-qualityA modular server based on Model Context Protocol (MCP) that provides weather queries, mathematical calculations, and search functionalities.Last updated -