Weather

Provides weather alerts and forecasts by querying external APIs via MCP over stdio.
  • typescript

0

GitHub Stars

typescript

Language

5 months ago

First Indexed

2 months 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": {
    "williammian-mcp-server-sample": {
      "command": "node",
      "args": [
        "C:\\\\Fontes\\\\mcp-server-sample\\\\build\\\\main.js"
      ]
    }
  }
}

You run a lightweight MCP server that exposes two weather-related tools, get-alerts and get-forecast, by connecting via stdio. This setup lets clients request active weather alerts for a state and weather forecasts for specific coordinates, all while validating inputs and delegating external API calls to the NWS service.

How to use

You will interact with the server through an MCP client over stdio. The two available tools let you fetch weather alerts for a state and fetch a forecast for geographic coordinates. Use the tools to build automation, chat assistants, or data dashboards that need weather information.

How to use the Weather tools in practice

  • Call get-alerts with a two-letter state code (for example, CA or NY) to retrieve active weather alerts for that state.
  • Call get-forecast with latitude and longitude to obtain a forecast for a specific location.
  • Inputs are validated to ensure correct types and shapes before making requests to the external weather API.

How to install

# Prerequisites: Node.js installed on your system
# 1) Clone the project repository
# Replace with your actual repository URL
# git clone <REPOSITÓRIO_URL>
# 2) Install dependencies
npm install
# 3) Build the TypeScript source to JavaScript
npm run build

# Optional: link the CLI if you want to run the server as a binary
# npm link
# weather

Additional setup and running notes

After building, you can start the server in stdio mode and listen for MCP requests. The example shows a complete stdio command to run the server locally. You can adapt the path to your environment if you place the built output elsewhere.

Configuration examples and CLI integration

The following MCP configuration demonstrates how to register the weather server as a stdio-based endpoint using a direct Node.js invocation. This configuration can be used by MCP clients to connect to the local server.

Weather MCP server configuration example

{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": ["C:\\Fontes\\mcp-server-sample\\build\\main.js"]
    }
  }
}

Available tools

get-alerts

Fetches active weather alerts for a given two-letter US state code (e.g., CA, NY) using the external weather service integration. Validates input, calls the NWS API, and returns structured alert data.

get-forecast

Retrieves a weather forecast for specified geographic coordinates (latitude and longitude). Validates input, queries the NWS API, and returns a forecast structure with periods and summaries.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Weather MCP Server - williammian/mcp-server-sample | VeilStrat