WeatherMCP
WeatherMCP
FastMCP tabanlı basit bir hava durumu MCP sunucusu. Open-Meteo kullanır, API anahtarı gerekmez. stdio taşımacı ChatGPT MCP için, http taşımacı lokal/uzak test için uygundur.
Kurulum
Python 3.10+
Bağımlılıklar:
fastmcp,httpxYükleme:
pip install fastmcp httpx(veyauv pip install fastmcp httpx)
Çalıştırma
HTTP ile:
fastmcp run weather_server.py:mcp --transport http --port 8000Stdio ile (ChatGPT MCP uyumlu):
fastmcp run weather_server.py:mcp
ChatGPT MCP entegrasyonu
~/.mcp/servers/weather.json örneği:
{
"command": ["fastmcp", "run", "/full/path/to/weather_server.py:mcp"],
"transport": { "type": "stdio" },
"name": "WeatherMCP"
}ChatGPT ayarlarından Model Context Protocol → Add a server → bu dosyayı gösterin. Komut örnekleri:
get_weather_by_city city="Istanbul"get_weather lat=41.01 lon=28.97 unit="metric"get_forecast city="Hamburg" day_offset=1(1=yarın, 0=bugün)
Dosyalar
weather_server.py: MCP sunucusu,get_weather,get_weather_by_city,get_forecastaraçları.
Notlar
Open-Meteo ücretsiz ve anahtarsızdır; kota ve gecikme için istek başına 8s timeout tanımlıdır.
İsteğe göre
fetch_weatheriçine retry veya cache eklenebilir; ücretli servis anahtarı kullanmak isterseniz aynı yapı korunur, yalnızca HTTP isteğini değiştirmeniz yeterlidir.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MertArtun/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server