Skip to main content
Glama

MCP Weather Notes Server

by gwyer
weather.py549 B
# weather.py import requests def get_weather_for_city(city): geo = requests.get( "https://geocoding-api.open-meteo.com/v1/search", params={"name": city, "count": 1} ).json() if "results" not in geo: return {"error": "City not found"} lat = geo["results"][0]["latitude"] lon = geo["results"][0]["longitude"] w = requests.get( "https://api.open-meteo.com/v1/forecast", params={"latitude": lat, "longitude": lon, "current_weather": True} ).json() return w["current_weather"]

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/gwyer/MCPWeather'

If you have feedback or need assistance with the MCP directory API, please join our Discord server