Node.js MCP Weather Server with Azure Deployment
A Model Context Protocol (MCP) server built with Express.js and Node.js that provides weather information using the National Weather Service API. Ready for deployment to Azure App Service with Azure Developer CLI (azd).
🌟 Features
- Express.js Framework: Fast, unopinionated web framework for Node.js
- MCP Protocol Compliance: Full support for JSON-RPC 2.0 MCP protocol
- HTTP Transport: HTTP-based communication for web connectivity
- Weather Tools:
get_alerts
: Get weather alerts for any US stateget_forecast
: Get detailed weather forecast for any location
- Azure Ready: Pre-configured for Azure App Service deployment
- Web Test Interface: Built-in HTML interface for testing
- National Weather Service API: Real-time weather data from official US government source
💻 Local Development
Prerequisites
- Node.js 22+ (or Node.js 18+)
- npm (Node Package Manager)
Setup & Run
- Clone and install dependencies:
- Start the development server:
- Access the server:
- Server: http://localhost:8000
- Health Check: http://localhost:8000/health
- Test Interface: http://localhost:8000/test
🔌 Connect to the Local MCP Server
Using VS Code - Copilot Agent Mode
- Add MCP Server from command palette and add the URL to your running server's HTTP endpoint:
- List MCP Servers from command palette and start the server
- In Copilot chat agent mode, enter a prompt to trigger the tool:
- When prompted to run the tool, consent by clicking Continue
Using MCP Inspector
- In a new terminal window, install and run MCP Inspector:
- CTRL+click the URL displayed by the app (e.g. http://localhost:5173/#resources)
- Set the transport type to
HTTP
- Set the URL to your running server's HTTP endpoint and Connect:
- List Tools, click on a tool, and Run Tool
🚀 Quick Deploy to Azure
Prerequisites
- Azure CLI
- Azure Developer CLI (azd)
- Active Azure subscription
Deploy in 3 Commands
After deployment, your MCP server will be available at:
- Health Check:
https://<your-app>.azurewebsites.net/health
- MCP Capabilities:
https://<your-app>.azurewebsites.net/mcp/capabilities
- Test Interface:
https://<your-app>.azurewebsites.net/test
🔌 Connect to the Remote MCP Server
Follow the same guidance as above, but use your App Service URL instead.
🧪 Testing
Visit /test
endpoint for an interactive testing interface.
🌦️ Data Source
This server uses the National Weather Service (NWS) API:
- Real-time weather alerts and warnings
- Detailed weather forecasts
- Official US government weather data
- No API key required
- High reliability and accuracy
This server cannot be installed
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.
An MCP server that provides weather information like forecasts and alerts for US locations using the National Weather Service API.
Related MCP Servers
- -securityFlicense-qualityThis SSE-based MCP server allows users to connect and interact with National Weather Service APIs to retrieve weather alerts and forecasts.Last updated -90Python
- -securityFlicense-qualityThis is a Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API. Features Get weather alerts for a US state Get weather forecast for a specific location (using latitude and longitude)Last updated -Python
- AsecurityAlicenseAqualityAn MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.Last updated -1PythonMIT 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 -Python