Returns current weather from OpenWeatherMap, including temperature, humidity, wind speed and sunrise and sunset times.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add weather-server-codebywaqas --env WEATHER_API_KEY='<WEATHER_API_KEY>' -- uv --directory '/<absolute-path>/weather-mcp-server/src/resources' run server.py~/.codex/config.toml
[mcp_servers.weather-server-codebywaqas]
command = "uv"
args = ["--directory", "/<absolute-path>/weather-mcp-server/src/resources", "run", "server.py"]
env = { WEATHER_API_KEY = "<WEATHER_API_KEY>" }
# codex mcp add weather-server-codebywaqas --env WEATHER_API_KEY='<WEATHER_API_KEY>' -- uv --directory '/<absolute-path>/weather-mcp-server/src/resources' run server.py~/.cursor/mcp.json
{
"mcpServers": {
"weather-server-codebywaqas": {
"command": "uv",
"args": [
"--directory",
"/<absolute-path>/weather-mcp-server/src/resources",
"run",
"server.py"
],
"env": {
"WEATHER_API_KEY": "<WEATHER_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"weather-server-codebywaqas": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"/<absolute-path>/weather-mcp-server/src/resources",
"run",
"server.py"
],
"env": {
"WEATHER_API_KEY": "<WEATHER_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"weather-server-codebywaqas": {
"command": "uv",
"args": [
"--directory",
"/<absolute-path>/weather-mcp-server/src/resources",
"run",
"server.py"
],
"env": {
"WEATHER_API_KEY": "<WEATHER_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"weather-server-codebywaqas": {
"command": "uv",
"args": [
"--directory",
"/<absolute-path>/weather-mcp-server/src/resources",
"run",
"server.py"
],
"env": {
"WEATHER_API_KEY": "<WEATHER_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"weather-server-codebywaqas": {
"command": "uv",
"args": [
"--directory",
"/<absolute-path>/weather-mcp-server/src/resources",
"run",
"server.py"
],
"env": {
"WEATHER_API_KEY": "<WEATHER_API_KEY>"
}
}
}
}Environment variables
WEATHER_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.