
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
一个极简的天气查询 MCP 工具,只需一句话即可查询全球天气。完美集成 Cursor 编辑器,支持中英文自然语言交互。
git clone https://github.com/yourusername/weather-server.git && cd weather-server && pip install -e .
方法一:快速配置(推荐)
复制示例配置文件并修改:
cp env.example .env
然后编辑 .env
文件,将 your_api_key_here
替换为您的 API Key。
方法二:环境变量
macOS/Linux:
export OPENWEATHERMAP_API_KEY="your_api_key"
Windows:
set OPENWEATHERMAP_API_KEY=your_api_key
编辑 ~/.cursor/mcp.json
(Windows: %USERPROFILE%\.cursor\mcp.json
):
{
"weather_fastmcp": {
"command": "python",
"args": ["-m", "weather_server.server"]
}
}
重启 Cursor 即可使用!
直接在 Cursor 中输入:
查询苏州天气
北京明天会下雨吗?
Show me the weather in Tokyo
What's the forecast for London?
就是这么简单!
如果需要更精确的查询,可以指定以下参数:
参数 | 说明 | 默认值 |
---|---|---|
city | 城市名称(中/英文) | 必填 |
days | 预报天数(1-5天) | 5 |
units | 温度单位 (metric/imperial) | metric |
lang | 返回语言 (zh_cn/en) | zh_cn |
无法使用?
找不到城市?
A minimalist weather query MCP tool that allows you to check global weather with just one sentence. Perfectly integrated with Cursor editor, supporting both Chinese and English natural language interaction.
git clone https://github.com/yourusername/weather-server.git && cd weather-server && pip install -e .
Method 1: Quick Setup (Recommended)
Copy the example configuration file and modify it:
cp env.example .env
Then edit the .env
file, replace your_api_key_here
with your API Key.
Method 2: Environment Variables
macOS/Linux:
export OPENWEATHERMAP_API_KEY="your_api_key"
Windows:
set OPENWEATHERMAP_API_KEY=your_api_key
Edit ~/.cursor/mcp.json
(Windows: %USERPROFILE%\.cursor\mcp.json
):
{
"weather_fastmcp": {
"command": "python",
"args": ["-m", "weather_server.server"]
}
}
Restart Cursor and you're ready to go!
Simply type in Cursor:
查询苏州天气
北京明天会下雨吗?
Show me the weather in Tokyo
What's the forecast for London?
That's it!
For more precise queries, you can specify these parameters:
Parameter | Description | Default |
---|---|---|
city | City name (Chinese/English) | Required |
days | Forecast days (1-5) | 5 |
units | Temperature unit (metric/imperial) | metric |
lang | Response language (zh_cn/en) | zh_cn |
Not Working?
City Not Found?
FAQs
一个基于 FastMCP 的天气查询服务
We found that weather-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.