
Weather Query MCP
A simple MCP service that allows users to query weather conditions for cities worldwide through the Cursor AI assistant.
README
天气查询 MCP 服务
这是一个简单的天气查询MCP(Model Completion Plugin)服务,可以让你通过Cursor AI助手查询全球城市的天气状况。
准备工作
-
注册并获取OpenWeatherMap API密钥:
- 访问 OpenWeatherMap 网站
- 注册一个免费账户
- 获取API密钥
-
配置环境变量:
- 在项目根目录中找到
.env
文件 - 将你的API密钥填入
OPENWEATHER_API_KEY=your_api_key_here
- 在项目根目录中找到
本地运行
- 安装依赖:
npm install
- 启动服务:
npm start
或者使用开发模式(自动重启):
npm run dev
- 服务将在 http://localhost:3001 上运行
- MCP清单: http://localhost:3001/mcp-manifest.json
- OpenAPI规范: http://localhost:3001/openapi.json
部署到公网
为了让Cursor能够使用这个MCP服务,你需要将其部署到公网可访问的地址。以下是几种简单的方法:
使用ngrok进行临时公开(开发测试用)
-
安装ngrok:
- 访问 ngrok.com 注册并下载
- 按照官方指南设置ngrok
-
在本地启动你的服务:
npm start
- 在另一个终端窗口启动ngrok:
ngrok http 3001
- ngrok会提供一个公开URL(例如
https://abc123.ngrok.io
)- 使用这个URL来配置Cursor中的MCP服务
部署到Render.com(免费方案)
-
注册 Render.com 账户
-
创建新的Web服务:
- 连接你的GitHub仓库
- 设置构建命令:
npm install
- 设置启动命令:
npm start
- 添加环境变量:
OPENWEATHER_API_KEY
-
部署完成后,Render会提供一个类似于
https://your-service-name.onrender.com
的URL- 使用这个URL来配置Cursor中的MCP服务
在Cursor中配置MCP服务
- 打开Cursor编辑器
- 点击设置图标
- 选择"MCP服务"
- 点击"添加MCP服务"
- 输入你的MCP清单URL(例如
https://your-service.onrender.com/mcp-manifest.json
) - 保存设置
现在你可以通过Cursor AI助手查询天气了,例如:
- "北京今天的天气怎么样?"
- "查询上海的气温"
- "纽约现在的天气状况"
API使用
如果你想直接调用API,可以使用以下端点:
GET /weather?city={城市名}
示例响应:
{
"city": "北京",
"temperature": 25.6,
"description": "晴",
"humidity": 45,
"wind_speed": 5.7
}
许可证
MIT
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.