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!
- 🌍 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
git clone https://github.com/KULLANICI_ADINIZ/weather-mcp.git
cd weather-mcpnpm install
⚠️ Ö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.
.env dosyası oluşturun:
Windows (PowerShell):
copy .env.example .env
notepad .envmacOS/Linux:
cp .env.example .env
nano .envDosyayı açıp API key'inizi ekleyin:
OPENWEATHER_API_KEY=buraya_api_keyinizi_yapiştirinKaydedin ve kapatın.
npm run buildBu komut TypeScript kodunu JavaScript'e çevirecek ve dist/ klasörüne kaydedecektir.
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
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
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"
}
}
}
}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.
Ö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
Claude Desktop açıldıktan sonra, chat kutusuna şu tarz sorular yazın:
İ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
Kod değişikliklerinde otomatik derleme için:
npm run devMCP 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 startA 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!
- 🌍 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
git clone https://github.com/YOUR_USERNAME/weather-mcp.git
cd weather-mcpnpm install
⚠️ 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.
Create a .env file:
Windows (PowerShell):
copy .env.example .env
notepad .envmacOS/Linux:
cp .env.example .env
nano .envOpen the file and add your API key:
OPENWEATHER_API_KEY=your_api_key_hereSave and close.
npm run buildThis command will compile TypeScript code to JavaScript into the dist/ folder.
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
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
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"
}
}
}
}Windows:
cd weather-mcp
cdOutput: 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:
pwdOutput: /Users/user/weather-mcp. Append /dist/index.js.
IMPORTANT: Completely close Claude Desktop:
- Close the window
- Exit from system tray (bottom right / top menu bar)
- Open again
Once Claude Desktop is open, ask questions like:
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
To automatically compile on code changes:
npm run devYou 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