Skip to content

learnerInTheFirstStage/mcp-weather-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build a smart weather server which offers two APIs (get_alerts and get_forecast) for Claude for Desktop to use based on MCP (Model Context Protocol).

QuickStart

1. Setup your environment

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

# Create virtual environment and activate it
uv venv
source .venv/bin/activate

# Install dependencies
uv add "mcp[cli] httpx

2. Run the server

uv run weather.py

3. Testing your server with Claude for Desktop

# Confige (MacOS)
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Copy the following code and replace path of weather.py and uv
{
  "mcpServers": {
    "weather": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/weather",
        "run",
        "weather.py"
      ]
    }
  }
}

Restart your Claude for Desktop and you will see two more tools you can select.

What you can see in Claude for Desktop

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages