MCP Weather
Enables querying 7-day weather forecasts for Chinese cities and regions by scraping China Weather website data. Supports both user input and AI model intelligent city/region parameter matching.
README
mcp_weather
项目简介
mcp_weather 是一个基于 MCP(Model Context Protocol)协议的天气查询服务端项目。 它是通过用户输入或者模型智能判断输入城市 地区,使用spider获取中国天气网站未来7天的天气信息。
主要功能
- 城市未来7天天气查询
- 支持用户输入或大模型智能匹配城市/地区参数
- 支持SSE和stdio两种传输方式
- 轻量级部署,易于集成
快速开始
本地运行
1. 克隆仓库
git clone https://github.com/tanghui886/MCP_WEATHER.git
cd MCP_WEATHER
2. 安装依赖
pip install -r requirements.txt
3. 启动服务
python -m mcpserver.get_weather_mcpserver --port 8000 --transport sse
参数说明:
--port: 服务监听端口,默认 8000
--transport: 传输方式,支持 stdio 或 sse
主要接口/工具 • get_weather:查询天气信息 参数:input_str(城市 地区) 输入示例:北京 海淀
MCP sever configuration
{
"mcpServers": {
"MCP_WEATHER": {
"command": "npx",
"args": [
"-y",
"MCP_WEATHER"
]
}
}
}
项目结构
MCP_WEATHER/
├── fc/ # 功能模块
│ └── get_weather.py # 天气获取主逻辑
├── mcpserver/ # MCP服务端
│ ├── __init__.py
│ └── get_weather_mcpserver.py # 服务启动入口
├── spider/ # 爬虫模块
│ ├── get_city_list.py # 城市列表获取
│ └── get_weather_by_cityId.py # 根据城市ID获取天气
├── README.md # 项目文档
└── requirements.txt # 依赖列表
联系方式
维护者github: tanghui886
邮箱: 471450059@qq.com
问题反馈: GitHub Issues
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.