Skip to main content
Glama
ruifelixpereira

Weather MCP Server

Weather MCP Server

A TypeScript Model Context Protocol (MCP) Streamable HTTP server that provides real-time US weather data using the NOAA National Weather Service (NWS) API.

Tools

Tool

Description

get_alerts

Get active weather alerts for a US state (two-letter state code, e.g. CA)

get_forecast

Get weather forecast for a US location by latitude and longitude

Note: Only US locations are supported by the NWS API.

Related MCP server: Weather MCP Server

Prerequisites

Setup

  1. Clone the repository and install dependencies:

    git clone <repository-url>
    cd custom-mcp-server
    npm install
  2. Build the TypeScript source:

    npm run build
  3. Run the server:

    npm start

The MCP endpoint is available at http://127.0.0.1:3010/mcp.

Set HOST and PORT to change the listening address. For example:

HOST=0.0.0.0 PORT=8080 npm start

Development

To watch for changes and recompile automatically:

npm run dev

Connecting to an MCP Client

To use this server with an MCP client such as VS Code Copilot, start the server and add its URL to your MCP configuration:

{
  "servers": {
    "weather": {
      "type": "http",
      "url": "http://127.0.0.1:3010/mcp"
    }
  }
}

Container

Build and run the server locally:

docker build -t weather-mcp .
docker run --rm -p 3010:3010 weather-mcp

The health endpoint is available at http://127.0.0.1:3010/healthz.

Deploy to Azure Container Apps

The deployment creates an Azure Container Registry, a Consumption-plan Container Apps environment, Log Analytics, and an externally accessible Container App. The app uses a managed identity with the AcrPull role; registry admin credentials are disabled.

Prerequisites:

  • Azure CLI

  • An Azure account with permission to create resources and role assignments

Sign in and run the deployment:

az login
./scripts/deploy.sh

Customize the deployment with environment variables:

RESOURCE_GROUP=my-weather-rg \
LOCATION=westus2 \
APP_NAME=my-weather-mcp \
IMAGE_TAG=v1 \
./scripts/deploy.sh

Set AZURE_SUBSCRIPTION_ID when the signed-in account has access to multiple subscriptions. The script builds and publishes the image with ACR Tasks, so local Docker is not required.

Project Structure

src/
  index.ts      # Server entry point and tool definitions
build/
  index.js      # Compiled output (generated by npm run build)
infra/
  registry.bicep # Azure Container Registry
  main.bicep     # Container Apps resources
scripts/
  deploy.sh      # Build, publish, and deploy workflow
Dockerfile
package.json
tsconfig.json
F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • Get US weather forecasts, active alerts, and current observations.

  • NOAA Weather MCP — National Weather Service forecasts and alerts

  • Hosted weather data MCP for discovery, validation, and OAuth-protected GribStream queries.

View all MCP Connectors

Latest Blog Posts

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/ruifelixpereira/mcp-http-example'

If you have feedback or need assistance with the MCP directory API, please join our Discord server