Metadata-Version: 2.4
Name: travel-planning-mcp
Version: 0.1.0
Summary: A travel planning intelligent agent MCP server with budget calculation, attraction recommendations, and itinerary generation
Project-URL: Homepage, https://github.com/yourusername/travel-planning-mcp
Project-URL: Repository, https://github.com/yourusername/travel-planning-mcp
Project-URL: Issues, https://github.com/yourusername/travel-planning-mcp/issues
Author-email: BigBen <chaizengyang@kupasai.com>
License: MIT
License-File: LICENSE
Keywords: agent,ai,mcp,planning,tourism,travel
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: mcp[cli]>=1.25.0
Description-Content-Type: text/markdown

# 旅游规划智能体 MCP Server

这是一个基于 MCP (Model Context Protocol) 的旅游规划智能体，提供旅游相关的工具和资源。

## 🎯 功能特性

### 工具 (Tools)
1. **calculate_trip_budget** - 计算旅行预算
2. **suggest_attractions** - 推荐景点
3. **create_itinerary** - 生成旅行行程
4. **check_weather_suggestion** - 查询最佳旅行时间
5. **pack_checklist** - 生成打包清单

### 资源 (Resources)
- **destination://{city}** - 获取目的地信息
- **travel-tips://{category}** - 获取旅行小贴士

### 提示 (Prompts)
- **plan_trip_prompt** - 生成旅行规划提示词
- **emergency_help_prompt** - 紧急情况帮助

## 📦 安装方式

### 方式 1: 从本地安装（开发测试）

```bash
# 在项目目录下
uv pip install -e .
```

### 方式 2: 发布到 PyPI 后安装

```bash
# 构建包
uv build

# 发布到 PyPI (需要 PyPI 账号)
uv publish

# 其他人可以通过 uvx 直接使用
uvx travel-planning-mcp
```

## 🚀 使用方式

### 1. 在 Langflow 中使用

在 Langflow 的 MCP 配置文件中添加：

```json
{
  "mcpServers": {
    "travel-planning": {
      "command": "uvx",
      "args": ["travel-planning-mcp"],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}
```

或者如果是本地开发版本：

```json
{
  "mcpServers": {
    "travel-planning": {
      "command": "python",
      "args": ["-m", "travel_planning_mcp.server"],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
  }
}
```

### 2. 在 Kiro 中使用

在 `.kiro/settings/mcp.json` 中添加相同配置。

### 3. 命令行测试

```bash
# 直接运行
python -m travel_planning_mcp.server

# 或使用 uvx (如果已发布)
uvx travel-planning-mcp
```

### 4. Web 界面使用

```bash
# 启动 Web 界面（直接调用版）
python web_direct.py

# 访问 http://127.0.0.1:5000
```

## 🧪 测试

```bash
# 测试工具函数
python simple_test.py

# 测试 MCP 连接
python test_server.py
```

## 📝 工具使用示例

### 计算旅行预算
```json
{
  "destination": "北京",
  "days": 5,
  "accommodation_level": "中档",
  "include_flights": true
}
```

### 推荐景点
```json
{
  "city": "成都",
  "interests": "美食",
  "days": 3
}
```

### 生成行程
```json
{
  "destination": "上海",
  "start_date": "2026-02-01",
  "days": 3,
  "pace": "轻松"
}
```

## 🔧 开发

### 项目结构
```
mcp_Server/
├── travel_planning_mcp/    # MCP Server 包
│   ├── __init__.py
│   └── server.py           # 主服务器代码
├── templates/              # Web 界面模板
├── web_direct.py          # Web 服务（直接调用）
├── web_client.py          # Web 服务（MCP 协议）
├── simple_test.py         # 简单测试
├── test_server.py         # MCP 连接测试
├── pyproject.toml         # 项目配置
└── README.md
```

### 添加新工具

在 `travel_planning_mcp/server.py` 中：

```python
@mcp.tool()
def your_new_tool(param1: str, param2: int) -> str:
    """工具描述"""
    # 实现逻辑
    return result
```

## 📄 许可证

MIT License

## 🤝 贡献

欢迎提交 Issue 和 Pull Request！
