Windows MCP Weather Example
A Windows-compatible implementation of the Model Context Protocol (MCP) Weather example for Claude Desktop integration.
Overview
This project demonstrates how to create a simple MCP server that provides weather functionality to Claude Desktop on Windows. The server offers two main tools:
- get-alerts: Fetch weather alerts for a specified US state
- get-forecast: Get a weather forecast for a specific location by latitude and longitude
This example uses the National Weather Service (NWS) API to fetch real weather data.
Prerequisites
- Node.js version 18 or higher
- Claude Desktop with MCP support
- Windows 10 or 11
Installation
-
Clone this repository:
git clone https://github.com/JBAgent/windows-mcp-weather-example.git cd windows-mcp-weather-example -
Install dependencies:
npm install -
Build the project:
npm run build
Running the Weather Server with Claude Desktop
-
First, start Claude Desktop
-
Run the server (use Command Prompt or PowerShell):
npm start -
In Claude Desktop, click the puzzle piece icon (🧩) in the top-right corner to open the MCP server selector
-
Select "Add MCP Server" and enter
weatherwhen prompted for the server name -
You should see confirmation that the weather server has connected successfully
Using the Weather Tools
Once connected, you can ask Claude to use the weather tools with natural language, for example:
- "What are the current weather alerts in CA?"
- "Can you tell me the weather forecast for latitude 37.7749 and longitude -122.4194?"
Troubleshooting Windows Issues
If you encounter issues:
-
Path Issues: Ensure the Node.js executable and npm are in your system's PATH variable
-
Permission Errors: Try running the Command Prompt or PowerShell as Administrator
-
Connection Errors: Make sure you've clicked the "Allow" button when Claude Desktop prompts for MCP permission
-
Persistence: The MCP permission needs to be granted each time you restart Claude Desktop
Development
To modify the server or add new features:
- Edit the files in the
srcdirectory - Rebuild with
npm run build - Restart the server with
npm start
License
MIT
Acknowledgements
This project is based on the Model Context Protocol Weather example and adapted for Windows compatibility.
