Weather MCP Server
An MCP server integrated with the QWeather API that provides real-time weather forecasts and meteorological warnings for AI assistants. It enables users to query current conditions and disaster alerts for specific cities or coordinates.
README
Weather MCP Server
基于和风天气 API 的 MCP 服务,为 AI 助手提供实时天气查询和气象预警能力。
工具说明
get_weather_warning — 天气预警查询
查询指定地区当前生效的气象灾害预警信息。
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| location | string | 是 | 城市名称(如"北京")、LocationID 或经纬度(如"116.41,39.92") |
get_weather — 城市天气查询
查询指定城市的实时天气 + 未来多天预报。
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| location | string | 是 | 城市名称或经纬度 |
| days | number | 否 | 预报天数,默认 3,最大 7 |
快速开始
1. 申请 API Key
前往 console.qweather.com 注册并创建应用,获取 API Key。 免费版每天 1000 次调用,足够日常使用。
2. 安装依赖并构建
npm install
npm run build
3. 配置 Claude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"weather": {
"command": "node",
"args": ["/absolute/path/to/weather-mcp/dist/index.js"],
"env": {
"QWEATHER_API_KEY": "your_api_key_here"
}
}
}
}
重启 Claude Desktop 即可使用。
项目结构
weather-mcp/
├── src/
│ ├── index.ts # MCP Server 入口
│ ├── tools/
│ │ ├── warning.ts # 天气预警查询逻辑
│ │ └── weather.ts # 城市天气查询逻辑
│ └── utils/
│ └── qweather.ts # 和风天气 HTTP 客户端封装
├── PRD.md # 产品需求文档
├── package.json
└── tsconfig.json
环境变量
| 变量名 | 说明 |
|---|---|
QWEATHER_API_KEY |
和风天气 API Key(必填) |
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.