WeatherMCP

WeatherMCP

Provides weather information using Open-Meteo API without requiring an API key. Supports weather queries by city name or coordinates with customizable temperature units.

Category
Visit Server

README

MCP Weather Assistant

Doğal dil ile hava durumu sorgulama sistemi. Model Context Protocol (MCP) ve OpenAI GPT kullanarak "Yarın Hamburg'da hava kaç derece olacak?" gibi sorulara yanıt verir.

Özellikler

  • Doğal Dil Anlama: Türkçe, İngilizce ve Almanca sorguları anlayabilir
  • Anlık Hava Durumu: Herhangi bir şehir için anlık hava bilgisi
  • Hava Tahmini: 1-7 günlük hava durumu tahmini
  • Ücretsiz API: Open-Meteo API kullanır (API key gerektirmez)
  • AWS Lambda Ready: Serverless deployment desteği

Mimari

Lokal Kullanım

[Kullanıcı] → [OpenAI GPT] → [MCP Server (lokal)] → [Open-Meteo API]

AWS Lambda Deployment

[Kullanıcı] → [OpenAI GPT] → [Lambda Function URL] → [Open-Meteo API]

Hızlı Başlangıç (Lokal)

1. Kurulum

git clone https://github.com/MertArtun/MCP.git
cd MCP
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

2. API Key Ayarla

cp .env.example .env
# .env dosyasını düzenle ve OpenAI API key'ini ekle

3. Server'ı Başlat

python weather_server.py --http

4. Client'ı Çalıştır (Yeni Terminal)

source venv/bin/activate
python client.py

AWS Lambda Deployment

Gereksinimler

  • AWS CLI yapılandırılmış
  • Node.js ve npm
  • Docker (serverless-python-requirements için)

1. Serverless Framework Kur

npm install -g serverless
cd MCP4
npm init -y
npm install serverless-python-requirements

2. AWS Credentials

aws configure
# AWS Access Key ID, Secret Access Key, Region girin

3. Environment Variables

# API Key oluştur (opsiyonel ama önerilen)
export MCP_API_KEY="your-secure-api-key-here"

4. Deploy

serverless deploy

5. Lambda URL'yi Al

serverless info
# Çıktıdaki URL'yi not al:
# endpoint: https://xxxxxxxx.lambda-url.eu-central-1.on.aws

6. Client ile Test

export MCP_SERVER_URL="https://xxxxxxxx.lambda-url.eu-central-1.on.aws/mcp"
export MCP_API_KEY="your-secure-api-key-here"
python client.py

Proje Yapısı

MCP4/
├── .env                  # API anahtarları (gitignore'da)
├── .env.example          # Örnek env dosyası
├── requirements.txt      # Python bağımlılıkları
├── weather_server.py     # FastMCP hava durumu sunucusu
├── lambda_handler.py     # AWS Lambda entry point
├── client.py             # OpenAI + MCP client
├── serverless.yml        # Serverless Framework config
└── README.md             # Bu dosya

MCP Tools

get_weather(city)

Belirtilen şehir için anlık hava durumunu döner.

Örnek: "Hamburg'da hava nasıl?"
Yanıt: "Hamburg, Almanya: 4.3°C, Hafif yağmur, Rüzgar: 15.7 km/s"

get_forecast(city, days)

Belirtilen şehir için hava durumu tahminini döner.

Örnek: "İstanbul için 5 günlük tahmin ver"
Yanıt: "İstanbul, Türkiye için 5 günlük tahmin:
  2025-11-27: 14.0°C - 18.9°C (Bulutlu)
  ..."

Güvenlik

Lokal Kullanım

  • Auth devre dışı (varsayılan)

AWS Lambda

  • API Key authentication (önerilen)
  • CORS yapılandırması
  • Lambda Function URL (IAM auth opsiyonel)

Çok Dilli Destek

Sistem otomatik olarak kullanıcının dilinde yanıt verir:

Dil Örnek Soru
Türkçe "Hamburg'da hava nasıl?"
English "What's the weather in Hamburg?"
Deutsch "Wie ist das Wetter in Hamburg?"

Teknolojiler

  • Python 3.11+
  • FastMCP - MCP Server framework
  • OpenAI GPT-4 - Doğal dil işleme
  • Open-Meteo API - Hava durumu verileri
  • Mangum - ASGI → Lambda adapter
  • Serverless Framework - AWS deployment

Lisans

MIT License

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
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
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
Qdrant Server

Qdrant Server

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

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured