fhuamancaja
MCP Serverfhuamancajapublic

mcp weather example

Example of mcp weather set up

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

Example of mcp weather set up

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Weather MCP Server

This repository contains a Model Context Protocol (MCP) server for weather forecasting and alerts. Follow the steps below to set it up on your local machine.

Prerequisites

  1. Claude for Desktop

    • Download and install Claude for Desktop from the official website.
    • Ensure it is updated to the latest version.
  2. uv CLI

    • For macOS/Linux: Install the uv CLI by running the following command in your terminal:

      curl -LsSf https://astral.sh/uv/install.sh | sh
      

      Restart your terminal to ensure the uv command is available.

    • For Windows: Install the uv CLI using PowerShell with the following command:

      iwr https://astral.sh/uv/install.ps1 -useb | iex
      

      Restart your terminal to ensure the uv command is available.

  3. Python

    • Install Python 3.10 or higher.

Setup Instructions

  1. Clone this repository:

    git clone <repository-url>
    cd weather
    
  2. Create a virtual environment and activate it:

    uv venv
    source .venv/bin/activate
    
  3. Install dependencies:

    uv add "mcp[cli]" httpx
    
  4. Run the server:

    uv run weather.py
    

Installing Dependencies from requirements.txt

If you prefer to use the requirements.txt file to install dependencies, follow these steps:

  1. Ensure your virtual environment is activated:

    source .venv/bin/activate
    
  2. Install the dependencies:

    pip install -r requirements.txt
    

Configuring Claude for Desktop

  1. Locate the claude_desktop_config.json file in this repository.

  2. Move it to the appropriate configuration directory for Claude for Desktop:

    • On Windows: Place it in %AppData%\\Claude\\claude_desktop_config.json.
    • On MacOS/Linux: Place it in ~/Library/Application Support/Claude/claude_desktop_config.json.
  3. Edit the configuration file to include the absolute path to this repository. For example:

    {
        "mcpServers": {
            "weather": {
                "command": "uv",
                "args": [
                    "--directory",
                    "/ABSOLUTE/PATH/TO/PARENT/FOLDER/weather",
                    "run",
                    "weather.py"
                ]
            }
        }
    }
    
  4. Restart Claude for Desktop to apply the changes.

Testing the Server

  1. Open Claude for Desktop and ensure the MCP server is detected.
  2. Test the server by asking questions like:
    • "What’s the weather in Sacramento?"
    • "What are the active weather alerts in Texas?"

Additional Resources

  • MCP Quickstart Guide
  • Debugging MCP Servers

Feel free to reach out if you encounter any issues!

Quick Start

1

Clone the repository

git clone https://github.com/fhuamancaja/mcp-weather-example
2

Install dependencies

cd mcp-weather-example
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerfhuamancaja
Repomcp-weather-example
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation