Metadata-Version: 2.4
Name: weather-mcp-server-beijing-pycoder-2026
Version: 0.1.0
Summary: A weather MCP MCP Server powered by OpenWeatherMap
Author-email: Your Name <you@example.com>
License: MIT
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp[cli]>=1.0.0
Description-Content-Type: text/markdown

# Weather MCP Server 🌦️

A simple, ready-to-use **MCP (Model Context Protocol) Server** that provides real-time weather information via the OpenWeatherMap API.

Perfect for AI agents, Claude Desktop, TRAE IDE, and any MCP-compatible client.

---

## ✨ Features

- 🌍 Query current weather by city name
- 🧠 Designed for LLM tool calling (MCP)
- ⚡ Fast startup with `uvx`
- 🔐 Secure API key handling via environment variables

---

## 📦 Installation

### Option 1: Run directly (recommended)

```bash
uvx weather-mcp-server
```

### Option 2: Install from PyPI

```bash
pip install weather-mcp-server
weather-mcp-server
```

---

## 🔑 Setup

1. Get a free API key from [OpenWeatherMap](https://openweathermap.org/api).
2. Set the environment variable:

```bash
export OPENWEATHER_API_KEY="your_api_key_here"
```

> On Windows (PowerShell):
> ```powershell
> $env:OPENWEATHER_API_KEY="your_api_key_here"
> ```

---

## 🛠️ Usage with MCP Clients

### Example: TRAE IDE / Claude Desktop

Add this to your MCP configuration:

```json
{
  "mcpServers": {
    "weather": {
      "command": "uvx",
      "args": ["weather-mcp-server"],
      "env": {
        "OPENWEATHER_API_KEY": "your_api_key_here"
      }
    }
  }
}
```

Then ask your assistant:

> “What’s the weather in Beijing?”

---

## 🧩 Available Tools

### `query_weather`

```python
query_weather(city: str) -> str
```

Returns a human-readable weather report.

Example output:
```
Beijing CN 的天气情况：晴，温度：23°C，湿度：45%，风速：3 m/s
```

---

## 🚀 Development

Clone and run locally:

```bash
git clone https://github.com/yourusername/weather-mcp-server.git
cd weather-mcp-server
uv sync
uv run weather-mcp-server
```

---

## 📄 License

MIT License — see [LICENSE](LICENSE)

---

## 🙌 Acknowledgements

- [Model Context Protocol](https://modelcontextprotocol.io/)
- [OpenWeatherMap](https://openweathermap.org/)
- [FastMCP](https://github.com/modelcontextprotocol/python-sdk)

---

Made with ☀️ by [Your Name]
```

📌 **记得修改两处占位符**：
1. `your_api_key_here` → 提醒用户替换（不用真填）
2. `yourusername` → 你的 GitHub 用户名
3. `[Your Name]` → 你的名字

---

## 四、现在你的项目结构长这样 ✅

```
weather-mcp-server/
├── pyproject.toml
├── README.md
├── LICENSE
├── .python-version
└── src/
    └── weather_mcp/
        ├── __init__.py
        └── server.py
```

---

## 五、下一步你可以做什么

1. `uv build` → 构建 wheel
2. `uv publish` → 发布到 PyPI
3. 在 TRAE / Claude Desktop 里用 `uvx weather-mcp-server` 体验“一键运行”

如果你愿意，下一步我可以帮你：
- ✅ 检查 `pyproject.toml` 是否 100% 符合 PyPI 要求
- ✅ 帮你写 `.gitignore`
- ✅ 模拟一次“发布前的最终检查清单”
- ✅ 教你如何给 MCP Server 加版本号和 CHANGELOG

你想继续哪一步？ 😊