Skip to main content
Glama

MCP Weather Server

by ramonbnuezjr
config.py1.02 kB
# app/core/config.py from pydantic_settings import BaseSettings, SettingsConfigDict from functools import lru_cache # For caching the settings instance class Settings(BaseSettings): OPENWEATHERMAP_API_KEY: str # Specifies that settings should be loaded from an .env file # For pydantic-settings v2.x.x and later: model_config = SettingsConfigDict(env_file=".env", env_file_encoding='utf-8', extra='ignore') # For older versions of pydantic (before v2) or older pydantic-settings, # you might use a nested class `Config`: # class Config: # env_file = ".env" # env_file_encoding = 'utf-8' # extra = 'ignore' # Allows other env vars not defined in this model # The lru_cache decorator caches the result of this function. # This means the Settings object is created only once, the first time it's called. @lru_cache def get_settings() -> Settings: return Settings() # You can also instantiate settings directly if you prefer, for simpler cases # settings = Settings()

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/ramonbnuezjr/mcp-weather-server'

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