MCPInstall
windows-mcp-weather-example logo

windows-mcp-weather-example

by JBAgent JBAgent/windows-mcp-weather-example

A Windows-compatible implementation of the Model Context Protocol Weather example for Claude Desktop integration

READMEmain

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:

  1. get-alerts: Fetch weather alerts for a specified US state
  2. 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

Installation

  1. Clone this repository:

    git clone https://github.com/JBAgent/windows-mcp-weather-example.git
    cd windows-mcp-weather-example
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    

Running the Weather Server with Claude Desktop

  1. First, start Claude Desktop

  2. Run the server (use Command Prompt or PowerShell):

    npm start
    
  3. In Claude Desktop, click the puzzle piece icon (🧩) in the top-right corner to open the MCP server selector

  4. Select "Add MCP Server" and enter weather when prompted for the server name

  5. 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:

  1. Path Issues: Ensure the Node.js executable and npm are in your system's PATH variable

  2. Permission Errors: Try running the Command Prompt or PowerShell as Administrator

  3. Connection Errors: Make sure you've clicked the "Allow" button when Claude Desktop prompts for MCP permission

  4. Persistence: The MCP permission needs to be granted each time you restart Claude Desktop

Development

To modify the server or add new features:

  1. Edit the files in the src directory
  2. Rebuild with npm run build
  3. 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.