1. Conduid
  2. Maps
  3. Weather Tool
MCP server · Maps

Weather Tool

MCP Weather Tool

Unclaimed last commit 6 months ago mapsmcpmcp-server
53Fair

Scored 4 months ago · breakdown

About Weather Tool

Weather Tool is an MCP server published by Namangarg-01 in the Maps category: mCP Weather Tool. It has been installed 0 times through Conduid.

Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx mcp-server-weather-tool

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Weather Tool

Powered by Claude · Grounded in docs

I know everything about Weather Tool. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

README

Weather MCP Tool 🌤️

A Model Context Protocol (MCP) server that provides real-time weather information using the wttr.in API. This project was created during the learning phase of understanding MCP systems.

Weather Tool Screenshot


📖 About This Project

This is a custom MCP tool that demonstrates the core concepts of building MCP servers. The tool:

  1. Takes a location as user input (string format)
  2. Constructs a weather API URL using wttr.in
  3. Fetches real-time temperature and weather data
  4. Returns formatted results to the MCP client (Claude)

🎓 Key Learnings

  • How to create a custom MCP Tool - Understanding MCP server architecture and tool registration
  • Using MCP Inspector - Testing and debugging MCP tools locally before deployment
  • Connecting MCP tools with Claude - Configuration through .config files to integrate with Claude Desktop
  • Working with FastMCP - Simplified MCP server creation with decorators
  • Async Python patterns - Using async/await for non-blocking I/O operations

🌟 Features

  • 🌤️ Real-time weather information for any location worldwide
  • 🌍 No API key required - Uses the free wttr.in service
  • 🔧 Easy MCP integration with Claude Desktop
  • Fast and lightweight - Uses Python's built-in urllib
  • 📚 Beginner-friendly codebase - Perfect for learning MCP concepts
  • 🎯 Production-ready - One-command setup and execution

📋 Prerequisites

  • Python 3.8 or higher
  • Internet connection (to fetch weather data)
  • Claude Desktop (optional, for integration)

No API keys needed!


🚀 Quick Start

Option 1: Automatic Setup (Recommended)

Windows:

setup.bat
run.bat

Linux/Mac:

chmod +x setup.sh run.sh
./setup.sh
./run.sh

Option 2: Manual Setup

  1. Clone the repository
   git clone https://github.com/Namangarg-01/Mcp-server-weather-tool.git
   cd Mcp-server-weather-tool
  1. Create virtual environment
   python -m venv .venv
   
   # Activate:
   # Windows:
   .venv\Scripts\activate
   # Linux/Mac:
   source .venv/bin/activate
  1. Install dependencies
   pip install -r requirements.txt
  1. Run the server
   python main.py

💻 Usage

Testing with MCP Inspector

Test your tool locally before connecting to Claude:

# Install MCP Inspector (one-time)
npm install -g @modelcontextprotocol/inspector

# Run inspector
npx @modelcontextprotocol/inspector python main.py

This opens a web interface where you can:

  • View available tools
  • Test the check_weather function
  • See request/response in real-time

Connecting to Claude Desktop

To use this MCP server with Claude Desktop, update your configuration file:

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add this configuration:

{
  "mcpServers": {
    "weather": {
      "command": "python",
      "args": ["C:/Users/YourName/Desktop/Mcp-server-weather-tool/main.py"]
    }
  }
}

Important:

  • Use absolute path to main.py
  • Replace YourName with your actual username
  • Use forward slashes / even on Windows

After updating, restart Claude Desktop.

Using in Claude

Once connected, ask Claude:

"What's the weather in London?"
"Check the temperature in Tokyo"
"Tell me about the weather in Paris, France"
"How's the weather in Mumbai right now?"

Claude will automatically use your MCP tool to fetch real-time weather data! 🎉


🔍 How It Works

Architecture Overview

User Query → Claude Desktop → MCP Server → wttr.in API → Response
                  ↓              ↓              ↓
              (stdio)      check_weather()   HTTP GET

Code Flow

  1. User asks Claude about weather
  2. Claude calls MCP tool with location parameter
  3. MCP server receives the request via stdio
  4. check_weather() tool is invoked
  5. get_weather() function:
    • URL-encodes the location
    • Constructs wttr.in URL
    • Fetches weather data via HTTP
  6. Response returned to Claude
  7. Claude formats and displays to user

Key Components

main.py - MCP Server

@mcp.tool()
async def check_weather(location: str) -> Dict[str, Any]:
    """Get weather info for specific location."""
    return get_weather(location)

tools/weather.py - Weather Fetcher

def get_weather(location: str) -> dict:
    """Fetches weather using wttr.in API"""
    url = f"https://wttr.in/{location}?format=3"
    # Returns: "London: ⛅️  +15°C"

📁 Project Structure

Mcp-server-weather-tool/
├── tools/
│   └── weather.py          # Weather fetching logic
├── main.py                 # MCP server entry point
├── requirements.txt        # Python dependencies
├── .gitignore             # Git ignore rules
├── setup.bat              # Windows setup script
├── setup.sh               # Linux/Mac setup script
├── run.bat                # Windows run script
├── run.sh                 # Linux/Mac run script
├── Screenshot 2026-02-13 205352.png
└── README.md              # This file

🐛 Troubleshooting

Server Won't Start

Error: ModuleNotFoundError: No module named 'mcp'

# Reinstall dependencies
pip install -r requirements.txt

Claude Can't Connect

Error: MCP server not responding

  1. Check that the path in claude_desktop_config.json is absolute
  2. Verify Python is accessible: python --version
  3. Restart Claude Desktop after config changes
  4. Check server runs manually: python main.py

Weather Data Not Fetching

Error: urllib.error.URLError

  • Check your internet connection
  • Try accessing https://wttr.in/London in your browser
  • The service might be temporarily down

MCP Inspector Issues

# If npx command not found, install Node.js first
# Then install inspector globally:
npm install -g @modelcontextprotocol/inspector

🚀 Future Enhancements

Potential features to add:

  • Multi-day forecast support
  • Weather alerts and warnings
  • Historical weather data
  • Support for coordinates (lat/long)
  • Caching for frequently requested locations
  • Unit conversion (Celsius ↔ Fahrenheit)
  • More detailed weather information (humidity, wind, pressure)

🤝 Contributing

This is a learning project, and contributions are welcome!

How to contribute:

  1. Fork the repository
  2. Create your feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Test thoroughly with MCP Inspector
  5. Commit: git commit -m 'Add amazing feature'
  6. Push: git push origin feature/amazing-feature
  7. Open a Pull Request

Areas for contribution:

  • Documentation improvements
  • Error handling enhancements
  • Additional weather features
  • Testing and bug fixes
  • Performance optimizations

📄 License

MIT License - see LICENSE file for details.


📧 Contact

Naman Garg


🙏 Acknowledgments

  • Built while learning Model Context Protocol (MCP)
  • Weather data provided by wttr.in
  • Thanks to Anthropic for Claude and MCP documentation
  • Special thanks to the FastMCP library for simplifying MCP server creation

📊 Project Stats

  • Language: Python 3.8+
  • Dependencies: 2 (mcp, fastmcp)
  • Lines of Code: ~50
  • Setup Time: < 2 minutes
  • API Keys Required: 0 ✨

Made with ❤️ during the MCP learning journey

Happy weather checking! 🌤️

README mirrored from the source repository 4 months ago. The original is authoritative.

Questions

About Weather Tool

How do I install Weather Tool?

Run npx mcp-server-weather-tool, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Weather Tool safe to use with an AI agent?

Its trust score is 53 out of 100 (fair). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Weather Tool still maintained?

The last commit was 6 months ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.