Provides current conditions and hourly forecasts for a location from the AccuWeather API.
接入配置
选择客户端,复制配置,再按项目文档补齐环境变量。
claude mcp add weather --env ACCUWEATHER_API_KEY='<ACCUWEATHER_API_KEY>' -- uvx --from git+https://github.com/adhikasp/mcp-weather.git mcp-weather~/.codex/config.toml
[mcp_servers.weather]
command = "uvx"
args = ["--from", "git+https://github.com/adhikasp/mcp-weather.git", "mcp-weather"]
env = { ACCUWEATHER_API_KEY = "<ACCUWEATHER_API_KEY>" }
# codex mcp add weather --env ACCUWEATHER_API_KEY='<ACCUWEATHER_API_KEY>' -- uvx --from git+https://github.com/adhikasp/mcp-weather.git mcp-weather~/.cursor/mcp.json
{
"mcpServers": {
"weather": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/adhikasp/mcp-weather.git",
"mcp-weather"
],
"env": {
"ACCUWEATHER_API_KEY": "<ACCUWEATHER_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"weather": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/adhikasp/mcp-weather.git",
"mcp-weather"
],
"env": {
"ACCUWEATHER_API_KEY": "<ACCUWEATHER_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"weather": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/adhikasp/mcp-weather.git",
"mcp-weather"
],
"env": {
"ACCUWEATHER_API_KEY": "<ACCUWEATHER_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"weather": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/adhikasp/mcp-weather.git",
"mcp-weather"
],
"env": {
"ACCUWEATHER_API_KEY": "<ACCUWEATHER_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"weather": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/adhikasp/mcp-weather.git",
"mcp-weather"
],
"env": {
"ACCUWEATHER_API_KEY": "<ACCUWEATHER_API_KEY>"
}
}
}
}需要的环境变量
ACCUWEATHER_API_KEY
把占位值换成你自己的密钥;不要把密钥提交到代码仓库。