- Home
- MCP servers
- Weather
Weather
- javascript
13
GitHub Stars
javascript
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"hideya-mcp-server-weather-js": {
"command": "npx",
"args": [
"-y",
"@h1deya/mcp-server-weather"
]
}
}
}You can run a lightweight MCP server that exposes weather data for the US through simple, reusable MCP endpoints. This Weather MCP Server example lets you fetch alerts and forecasts using standardized MCP requests, making it easy to plug into your existing MCP client workflows.
How to use
To use this server, configure your MCP client to connect to the Weather MCP Server via a local stdio-based server entry. The server exposes two tools you can invoke: get-alerts to fetch weather alerts for a US state and get-forecast to retrieve a forecast for a specific location. Use these in your client workflows to retrieve timely weather information for automation, dashboards, or decision-making applications.
How to install
Prerequisites you need on your machine before starting:
• Node.js and npm must be available on your system.
Installation and start steps
# Step 1: Ensure Node.js and npm are installed on your machine
# Step 2: Run the MCP server using the provided MCP command through your client
# Example command relies on npx as shown in the server configuration
Configuration example
{
"mcpServers": {
"weather": {
"command": "npx",
"args": [
"-y",
"@h1deya/mcp-server-weather"
]
}
}
}
Usage tips with MCP clients
-
Use the
get-alertstool to fetch weather alerts for a two-letter US state code (for example, CA or NY). The client can pass thestateinput as part of the MCP workflow. -
Use the
get-forecasttool to obtain a forecast by providing the location’slatitudeandlongitude.
Notes on security and run mode
This server is designed to run as an MCP stdio process started by your MCP client configuration. Do not expose HTTP endpoints unless explicitly configured by your deployment. Keep any API keys or location data secured within your MCP client configuration and environment.
Examples of queries
-
Tomorrow's weather in Palo Alto?
-
Any weather alerts in California?
Troubleshooting
If you do not see results, verify that your MCP client is correctly initializing the weather server entry and that the npx command can be executed in your environment. Ensure any required dependencies for the weather server package are accessible in your runtime.
Available tools
get-alerts
Get weather alerts for a US state. Input: state (string) Two-letter US state code (e.g., CA, NY)
get-forecast
Get weather forecast for a location in the US. Inputs: latitude (number) and longitude (number)