Yolcu360 MCP服务器
用于Yolcu360汽车租赁API的MCP(模型上下文协议)服务器。使AI助手能够搜索、预订和管理租车预订。
特性
- 15工具:位置搜索、汽车搜索、订单管理、付款、Findeks信用验证
- 5资源:汽车类别、燃料类型、变速器类型、交付类型、供应商
- 2提示:汽车搜索工作流、预订工作流
- 2运输:HTTP(流式HTTP)和stdio(适用于Claude Desktop)
先决条件
- 包子 运行时已安装
- Yolcu360 API证书(密钥和机密)
安装
# Install dependencies
bun install
# Configure environment
cp .env.example .env
# Edit .env with your Yolcu360 API credentials配置
编辑 .env 文件:
YOLCU360_API_KEY=your-api-key
YOLCU360_API_SECRET=your-api-secret
YOLCU360_API_URL=https://staging.api.pro.yolcu360.com/api/v1
TRANSPORT=http
PORT=3000运行服务器
HTTP模式(默认)
bun start
# or
bun run start:http服务器终结点:
- 健康:
http://localhost:3000/health - MCP:
http://localhost:3000/mcp
stdio模式
bun run start:stdio可用工具
定位工具
search-locations-搜索接送地点get-location-details-获取位置坐标和详细信息
搜索工具
search-cars-按坐标和日期搜索可用的租车get-car-extras-获得可用的额外服务(保险、GPS、儿童座椅等)
订购工具
create-order-创建新的租赁订单get-order-获取订单详细信息check-cancel-eligibility-检查订单是否可以取消cancel-order-取消订单
支付工具
process-payment-处理付款(信用卡或代理信用)get-installment-info-获取卡的分期付款选项
Findeks工具(信用验证)
check-findeks-eligibility-检查现有信用状态get-findeks-phones-获取注册电话号码generate-findeks-report-开始生成信用报告confirm-findeks-pin-确认短信PINrenew-findeks-pin-请求新PIN
健康工具
check-health-检查API服务状态
可用资源
| 资源 | URI | 描述 |
|---|---|---|
| 汽车类 | yolcu360://helper-data/car-classes | 汽车类别(经济型、SUV等) |
| 燃料类型 | yolcu360://helper-data/fuel-types | 燃料类型(汽油、柴油等) |
| 传输类型 | yolcu360://helper-data/transmission-types | 变速器类型 |
| 交货类型 | yolcu360://helper-data/delivery-types | 交付选项 |
| 供应商 | yolcu360://helper-data/suppliers | 汽车租赁供应商 |
可用提示
| 提示 | 描述 |
|---|---|
| 汽车搜索工作流程 | 搜索租车指南 |
| 预订工作流程 | 完成所选汽车的预订流程 |
Claude桌面集成
添加到您的Claude桌面配置(~/.config/claude/claude_desktop_config.json 在Linux/Mac或 %APPDATA%\Claude\claude_desktop_config.json 在Windows上):
{
"mcpServers": {
"yolcu360": {
"command": "bun",
"args": ["run", "/path/to/yolcu360-mcp-server/src/index.ts"],
"env": {
"YOLCU360_API_KEY": "your-api-key",
"YOLCU360_API_SECRET": "your-api-secret",
"TRANSPORT": "stdio"
}
}
}
}发展
# Run with hot reload
bun dev
# Type check
bun run typecheck
# Run tests
bun test项目结构
src/
├── index.ts # Entry point
├── server.ts # MCP server setup
├── config.ts # Environment config
├── auth/
│ └── manager.ts # Token management
├── tools/
│ ├── index.ts # Tool aggregator
│ ├── health.tools.ts
│ ├── location.tools.ts
│ ├── search.tools.ts
│ ├── order.tools.ts
│ ├── payment.tools.ts
│ └── findeks.tools.ts
├── resources/
│ ├── index.ts
│ └── helper-data.ts
├── prompts/
│ ├── index.ts
│ └── workflows.ts
├── transports/
│ ├── http.ts
│ └── stdio.ts
└── utils/
└── error-handler.ts许可证
麻省理工学院
