Weather MCP Server
Enables real-time weather queries via Claude Desktop using OpenWeatherMap API, providing current conditions and 24-hour forecasts for any city.
README
Weather MCP Server 🌦️
<a name="türkçe"></a>
Türkçe
OpenWeatherMap API kullanarak gerçek zamanlı hava durumu verisi sağlayan Model Context Protocol (MCP) sunucusu.
Claude Desktop ile entegre ederek, sohbet sırasında doğrudan hava durumu sorgulayabilirsiniz!
✨ Özellikler
- 🌍 Güncel Hava Durumu: Herhangi bir şehir için anlık hava durumu
- 📅 24 Saatlik Tahmin: Detaylı saatlik hava tahmini
- 🌡️ Esnek Birim Sistemi: Metrik (°C) veya Imperial (°F) desteği
- 💨 Kapsamlı Bilgiler: Sıcaklık, nem, rüzgar, basınç, gün doğumu/batımı
- 🚀 Kolay Kurulum: Dakikalar içinde kullanıma hazır
📋 Gereksinimler
🚀 Kurulum
1️⃣ Projeyi İndirin
git clone https://github.com/KULLANICI_ADINIZ/weather-mcp.git
cd weather-mcp
2️⃣ Bağımlılıkları Yükleyin
npm install
3️⃣ OpenWeatherMap API Key Alın
⚠️ ÖNEMLİ: API key'inizi asla GitHub'a yüklemeyin veya başkalarıyla paylaşmayın!
- OpenWeatherMap sitesine gidin
- Sign Up butonuna tıklayıp ücretsiz hesap oluşturun
- Email adresinizi doğrulayın
- API Keys sayfasına gidin
- Varsayılan API key'i kopyalayın veya yeni bir tane oluşturun
Not: API key'in aktif olması 1-2 saat sürebilir.
4️⃣ Ortam Değişkenlerini Ayarlayın
.env dosyası oluşturun:
Windows (PowerShell):
copy .env.example .env
notepad .env
macOS/Linux:
cp .env.example .env
nano .env
Dosyayı açıp API key'inizi ekleyin:
OPENWEATHER_API_KEY=buraya_api_keyinizi_yapiştirin
Kaydedin ve kapatın.
5️⃣ Projeyi Derleyin
npm run build
Bu komut TypeScript kodunu JavaScript'e çevirecek ve dist/ klasörüne kaydedecektir.
🖥️ Claude Desktop ile Entegrasyon
1️⃣ Claude Desktop'ı İndirin ve Kurun
Eğer henüz kurulu değilse:
- Claude Desktop İndir sayfasına gidin
- İşletim sisteminiz için uygun versiyonu indirin
- Kurulumu tamamlayın ve uygulamayı açın
- Hesabınızla giriş yapın
2️⃣ Config Dosyasını Bulun Eğer Dosya Yoksa Oluşturun
Config dosyasının konumu işletim sistemine göre değişir:
Windows:
%APPDATA%\Claude\claude_desktop_config.json
Dosyayı açmak için:
Win + Rtuşlarına basın%APPDATA%\Claudeyazıp Enter'a basınclaude_desktop_config.jsondosyasını Not Defteri veya VS Code ile açın
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json
3️⃣ MCP Server'ı Ekleyin
Config dosyasını açtığınızda içinde başka ayarlar olabilir veya boş olabilir.
Eğer dosya boş veya sadece {} varsa, tüm içeriği şununla değiştirin:
{
"mcpServers": {
"weather": {
"command": "node",
"args": [
"BURAYA_TAM_YOLU_YAZIN/weather-mcp/dist/index.js"
],
"env": {
"OPENWEATHER_API_KEY": "buraya_api_keyinizi_yazin"
}
}
}
}
Eğer dosyada zaten başka MCP server'lar varsa, sadece "weather" kısmını mcpServers içine ekleyin:
{
"mcpServers": {
"existing-server": {
...
},
"weather": {
"command": "node",
"args": [
"BURAYA_TAM_YOLU_YAZIN/weather-mcp/dist/index.js"
],
"env": {
"OPENWEATHER_API_KEY": "buraya_api_keyinizi_yazin"
}
}
}
}
Tam Yol Nasıl Bulunur?
Windows:
cd weather-mcp
cd
Çıktı: D:\Projeler\weather-mcp gibi bir şey olacak. Sonuna \dist\index.js ekleyin.
NOT: Windows'ta \ karakterini \\ olarak yazmalısınız:
"D:\\Projeler\\weather-mcp\\dist\\index.js"
macOS/Linux:
pwd
Çıktı: /Users/kullanici/weather-mcp. Sonuna /dist/index.js ekleyin.
4️⃣ Claude Desktop'ı Yeniden Başlatın
ÖNEMLİ: Claude Desktop'ı tamamen kapatın:
- Pencereyi kapatın
- Sistem tepsisinden (sağ alt köşe / üst menü çubuğu) de çıkış yapın
- Tekrar açın
🎯 Kullanım
Claude Desktop açıldıktan sonra, chat kutusuna şu tarz sorular yazın:
Örnek Sorgular
İstanbul'un hava durumu nasıl?
Ankara'da şu an kaç derece?
New York'un 24 saatlik hava tahmini nedir?
Londra'da yarın hava nasıl olacak?
Tokyo'nun hava durumunu Fahrenheit cinsinden göster
🛠️ Geliştirme
Watch Mode (Otomatik Derleme)
Kod değişikliklerinde otomatik derleme için:
npm run dev
Manuel Test
MCP server'ı doğrudan çalıştırıp test edebilirsiniz:
# Windows
set OPENWEATHER_API_KEY=your_api_key_here
npm start
# macOS/Linux
export OPENWEATHER_API_KEY=your_api_key_here
npm start
<a name="english"></a>
English
A Model Context Protocol (MCP) server providing real-time weather data using the OpenWeatherMap API.
Integrate with Claude Desktop to ask about the weather directly in your chat!
✨ Features
- 🌍 Current Weather: Instant weather conditions for any city
- 📅 24-Hour Forecast: Detailed hourly weather forecast
- 🌡️ Flexible Units: Support for Metric (°C) or Imperial (°F)
- 💨 Comprehensive Info: Temperature, humidity, wind, pressure, sunrise/sunset
- 🚀 Easy Setup: Ready to use in minutes
📋 Requirements
🚀 Installation
1️⃣ Clone the Project
git clone https://github.com/YOUR_USERNAME/weather-mcp.git
cd weather-mcp
2️⃣ Install Dependencies
npm install
3️⃣ Get OpenWeatherMap API Key
⚠️ IMPORTANT: Never upload your API key to GitHub or share it with others!
- Go to OpenWeatherMap
- Click Sign Up to create a free account
- Verify your email address
- Go to API Keys page
- Copy the default API key or create a new one
Note: It may take 1-2 hours for the API key to become active.
4️⃣ Set Environment Variables
Create a .env file:
Windows (PowerShell):
copy .env.example .env
notepad .env
macOS/Linux:
cp .env.example .env
nano .env
Open the file and add your API key:
OPENWEATHER_API_KEY=your_api_key_here
Save and close.
5️⃣ Build the Project
npm run build
This command will compile TypeScript code to JavaScript into the dist/ folder.
🖥️ Integration with Claude Desktop
1️⃣ Download and Install Claude Desktop
If not already installed:
- Go to Claude Desktop Download page
- Download the appropriate version for your OS
- Complete installation and open the app
- Log in with your account
2️⃣ Locate or Create Config File
The config file location depends on your OS:
Windows:
%APPDATA%\Claude\claude_desktop_config.json
To open:
- Press
Win + R - Type
%APPDATA%\Claudeand press Enter - Open
claude_desktop_config.jsonwith Notepad or VS Code
macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Linux:
~/.config/Claude/claude_desktop_config.json
3️⃣ Add MCP Server
If the file is empty or only {}, replace content with:
{
"mcpServers": {
"weather": {
"command": "node",
"args": [
"FULL_PATH_TO/weather-mcp/dist/index.js"
],
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}
}
}
If you already have other MCP servers, add "weather" inside mcpServers:
{
"mcpServers": {
"existing-server": {
...
},
"weather": {
"command": "node",
"args": [
"FULL_PATH_TO/weather-mcp/dist/index.js"
],
"env": {
"OPENWEATHER_API_KEY": "your_api_key_here"
}
}
}
}
How to Find Full Path?
Windows:
cd weather-mcp
cd
Output: Something like D:\Projects\weather-mcp. Append \dist\index.js.
NOTE: On Windows, you must escape backslashes \ as \\:
"D:\\Projects\\weather-mcp\\dist\\index.js"
macOS/Linux:
pwd
Output: /Users/user/weather-mcp. Append /dist/index.js.
4️⃣ Restart Claude Desktop
IMPORTANT: Completely close Claude Desktop:
- Close the window
- Exit from system tray (bottom right / top menu bar)
- Open again
🎯 Usage
Once Claude Desktop is open, ask questions like:
Example Queries
What is the weather in Istanbul?
What is the temperature in Ankara right now?
What is the 24-hour forecast for New York?
How will the weather be in London tomorrow?
Show Tokyo weather in Fahrenheit
🛠️ Development
Watch Mode (Auto-compile)
To automatically compile on code changes:
npm run dev
Manual Testing
You can run and test the MCP server directly:
# Windows
set OPENWEATHER_API_KEY=your_api_key_here
npm start
# macOS/Linux
export OPENWEATHER_API_KEY=your_api_key_here
npm start
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.