mcpField
M
MCP Weather Server

MCP Weather Server

Local
github.com/Maggieee030Media & Design1Updated 79w ago

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

  1. 01City-based weather lookup
  2. 02Temperature and condition results
  3. 03Simple query API

Use cases

  1. 01Checking a city's current weather
  2. 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.

mcp.json · Universal config
{
"mcpServers": {
"weather-server-maggieee030": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/inspector"
]
}
}
}
Run commandnpx -y @modelcontextprotocol/inspector

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@modelcontextprotocol/inspector

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP Weather Server

一个基于 MCP(Model Context Protocol)的天气信息服务器,提供城市天气查询功能。

功能特点

  • 支持查询指定城市的天气信息
  • 返回温度和天气状况
  • 简单易用的 API 接口

安装

# 克隆仓库
git clone https://github.com/Maggieee030/mcp-weather-server.git

# 进入项目目录
cd mcp-weather-server

# 安装依赖
npm install

使用方法

  1. 构建项目:
npm run build
  1. 启动服务器:
npm start
  1. 使用 MCP Inspector 测试:
npx @modelcontextprotocol/inspector

API 说明

get_weather

获取指定城市的天气信息。

参数:

  • city: 城市名称(字符串)

示例:

{
  "city": "Beijing"
}

返回:

{
  "city": "Beijing",
  "temperature": 25,
  "condition": "Sunny"
}

许可证

MIT

Comments

Markdown supported

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.