{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_448csarhnm3f","handle":"open-mcp-weather","url":"https://wellknown.network/agents/open-mcp-weather","links":{"self":"https://wellknown.network/agents/open-mcp-weather/record.json","html":"https://wellknown.network/agents/open-mcp-weather","markdown":"https://wellknown.network/agents/open-mcp-weather/record.md","api":"https://wellknown.network/api/v1/agents/open-mcp-weather","status":"https://wellknown.network/api/v1/agents/open-mcp-weather/status","claim":"https://wellknown.network/agents/open-mcp-weather/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/open-mcp-weather/claim.json","badge":"https://wellknown.network/agents/open-mcp-weather/badge.svg","openapi":"https://wellknown.network/openapi.json"},"ard":{"identifier":"urn:air::server:open-mcp-weather","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"open-mcp-weather","summary":"Weather query MCP server using OpenWeatherMap API","description":"# Weather MCP Server \n \n一个基于 Model Context Protocol (MCP) 的天气查询服务器，使用 OpenWeatherMap API 提供实时天气信息和天气预报。 \n \n## 功能特性 \n \n- 🌤️ **实时天气查询**: 获取指定城市的当前天气信息 \n- 📅 **5天天气预报**: 提供未来5天的详细天气预报 \n- 🌍 **全球支持**: 支持全球各地的天气查询 \n- 🌡️ **多单位支持**: 支持摄氏度(metric)和华氏度(imperial) \n- 📍 **智能定位**: 自动解析城市名称并获取准确坐标 \n- 🛠️ **MCP 工具装饰器**: 使用 `@mcp.tool()` 装饰器，便于其他模型通过 MCP 协议调用 \n \n## 安装 \n \n1. 确保你已安装 Python 3.13 或更高版本 \n2. 克隆或下载此项目 \n3. 安装依赖: \n \n```bash \ncd mcp-weather \nuv sync \n``` \n \n## 使用方法 \n \n### 作为 MCP Server 运行 \n \n```bash \n# 直接运行 \npython main.py \n \n# 或者使用 uv \nuv run main.py \n``` \n \n### 在 MCP 客户端中配置 \n \n在你的 MCP 客户端配置文件中添加: \n \n```json \n{ \n  \"mcpServers\": { \n    \"weather\": { \n      \"command\": \"python\", \n      \"args\": [\"path/to/mcp-weather/main.py\"] \n    } \n  } \n} \n``` \n \n### 编程方式调用工具 \n \n你也可以直接在代码中导入和使用这些工具： \n \n```python \nimport asyncio \nfrom main import get_current_weather, get_weather_forecast \n \nasync def example(): \n    # 获取当前天气 \n    weather = await get_current_weather(\"Beijing,CN\", \"metric\") \n    print(weather) \n     \n    # 获取天气预报 \n    forecast = await get_weather_forecast(\"London,GB\", \"metric\") \n    print(forecast) \n \nasyncio.run(example()) \n``` \n \n## 可用工具 \n \n### 1. get_current_weather \n \n获取指定位置的当前天气信息。 \n \n**参数:** \n- `location` (必需): 城市名称，格式如 \"London,GB\" 或 \"Beijing,CN\" \n- `units` (可选): 温度单位，\"metric\" (摄氏度) 或 \"imperial\" (华氏度)，默认为 \"metric\" \n \n**示例:** \n```json \n{ \n  \"location\": \"Beijing,CN\", \n  \"units\": \"metric\" \n} \n``` \n \n**返回信息:** \n- 当前温度 (实际温度和体感温度) \n- 天气状况描述 \n- 湿度百分比 \n- 气压 (hPa) \n- 风速和风向 \n- 能见度 \n- 日出日落时间 \n \n### 2. get_weather_forecast \n \n获取指定位置的5天天气预报。 \n \n**参数:** \n- `location` (必需): 城市名称，格式如 \"London,GB\" 或 \"Beijing,CN\" \n- `units` (可选): 温度单位，\"metric\" (摄氏度) 或 \"imperial\" (华氏度)，默认为 \"metric\" \n \n**示例:** \n```json \n{ \n  \"location\": \"New York,US\", \n  \"units\": \"imperial\" \n} \n``` \n \n**返回信息:** \n- 未来5天的每日天气预报 \n- 每日最高和最低温度 \n- 主要天气状况 \n \n## 支持的城市格式 \n \n支持多种城市名称格式: \n \n- `\"Beijing,CN\"` - 城市名,国家代码 \n- `\"London,GB\"` - 城市名,国家代码 \n- `\"New York,US\"` - 城市名,国家代码 \n- `\"Tokyo,JP\"` - 城市名,国家代码 \n- `\"Paris,FR\"` - 城市名,国家代码 \n \n##…","publisher":null,"homepage":null,"repository":null,"version":"0.1.0","license":null,"protocols":["mcp"],"tags":["mcp"],"pricing":null,"endpoints":[{"url":"pypi:open-mcp-weather","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","summary":"pypi","version":"pypi","description":"pypi"}},"derived":{"capabilities":[{"slug":"data.weather","name":"Weather","confidence":1,"provenance":"derived"}],"categories":["data"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"open-mcp-weather","registry":"pypi","observedAt":"2026-09-10T08:27:46.061Z","publishedAt":"2025-07-28T07:19:49.169975Z","latestVersion":"0.1.0"}},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"open-mcp-weather","url":"https://pypi.org/project/open-mcp-weather/","firstSeenAt":"2026-09-10T08:26:48.270Z","fetchedAt":"2026-09-10T08:26:48.270Z","normalizedAt":"2026-09-10T08:26:48.270Z"}]},"firstSeenAt":"2026-09-10T08:26:48.270Z","updatedAt":"2026-09-10T08:27:46.061Z"}