mcp-wheather

mcp-wheather

Provides real-time weather information for any location using the Open-Meteo API, enabling AI models to query current weather data through the Model Context Protocol.

Category
Visit Server

README

MCP Weather Server 🌤️

A Model Context Protocol (MCP) server that provides real-time weather information using the Open-Meteo API.

📋 Description

This project implements an MCP server that allows AI models to obtain current weather information for any location worldwide. The server uses Open-Meteo's free APIs for geocoding and weather data.

🔍 Documentation

Check out the documentation for more details on how to work with this server.

✨ Features

  • 🌍 Global coverage: Get weather information from any location worldwide
  • 🔄 Real-time data: Up-to-date weather information
  • 📊 Complete data: Temperature, humidity, precipitation, wind, cloud cover
  • 🚀 Fast and efficient: Quick responses with structured JSON data
  • 🔧 Easy integration: Compatible with any MCP client

🛠️ Installation

Prerequisites

  • Bun (recommended) or Node.js 20+

Installation Steps

  1. Clone the repository

    git clone https://github.com/zkjon/mcp-weather.git
    cd mcp-weather
    
  2. Install dependencies

    bun install
    # or
    npm install
    
  3. Run the server

    bunx -y tsx src/main.ts
    # or
    npx -y tsx src/main.ts
    

🚀 Usage

MCP Configuration

To use this server with an MCP client, add the following configuration to your mcp.json file:

{
    "mcpServers": {
        "Weather": {
            "command": "bunx",
            "args": [
                "-y",
                "tsx",
                "C:\\full\\path\\to\\project\\src\\main.ts"
            ]
        }
    }
}

Available Tools

get-weather

Gets weather information for a specific location.

Parameters:

  • location (string): Location name (city, country, etc.)

Usage Example:

// Request
{
    "tool": "get-weather",
    "arguments": {
        "location": "Madrid"
    }
}

// Response
{
    "content": [
        {
            "type": "text",
            "text": "{
                \"latitude\": 40.4375,
                \"longitude\": -3.6875,
                \"current\": {
                    \"temperature_2m\": 18.7,
                    \"relative_humidity_2m\": 54,
                    \"precipitation\": 0,
                    \"rain\": 0,
                    \"cloud_cover\": 4,
                    \"wind_speed_10m\": 6.1
                }
            }"
        }
    ]
}

Workflow

  1. Request reception: Server receives a request with a location
  2. Geocoding: Location coordinates are obtained using Open-Meteo API
  3. Weather query: Weather data is queried using the coordinates
  4. Structured response: Data is returned in structured JSON format

Code Structure

  • Imports: MCP SDK and necessary libraries
  • Server configuration: MCP server definition with name and version
  • Tool definition: Implementation of the get-weather tool
  • Connection: Transport configuration and server connection

🌐 APIs Used

📝 License

This project is licensed under the MIT License. See the LICENSE file for more details.

🤝 Contributing

Contributions are welcome! Please read our contribution guide for more information.

🔒 Security

If you find any security vulnerability, please check our security file to know how to report it.

📞 Support

If you have questions or need help:

🙏 Acknowledgments


Made with ❤️ by zkjon

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured