mcp-weather-server
If you are the rightful owner of mcp-weather-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
MCP Weather Server is a weather information server based on the Model Context Protocol, providing city weather query functionality.
MCP Weather Server
一个基于 MCP(Model Context Protocol)的天气信息服务器,提供城市天气查询功能。
功能特点
- 支持查询指定城市的天气信息
- 返回温度和天气状况
- 简单易用的 API 接口
安装
# 克隆仓库
git clone https://github.com/Maggieee030/mcp-weather-server.git
# 进入项目目录
cd mcp-weather-server
# 安装依赖
npm install
使用方法
- 构建项目:
npm run build
- 启动服务器:
npm start
- 使用 MCP Inspector 测试:
npx @modelcontextprotocol/inspector
API 说明
get_weather
获取指定城市的天气信息。
参数:
- city: 城市名称(字符串)
示例:
{
"city": "Beijing"
}
返回:
{
"city": "Beijing",
"temperature": 25,
"condition": "Sunny"
}
许可证
MIT