About MCP Weather Server
MCP Weather Server is an MCP server for querying weather by city. It returns the temperature and weather conditions for a requested location.
Key features
- 01City-based weather lookup
- 02Temperature and condition results
- 03Simple query API
Use cases
- 01Checking a city's current weather
- 02Providing weather details to an MCP client
MCP support
It exposes a `get_weather` tool that accepts a city name and returns the city, temperature, and weather condition.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP 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
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.