Reservation System MCP Server
Provides tools to access and manage reservation data within a WeChat Cloud Development environment, enabling AI agents to query records, update reservation statuses, and delete records from the database.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Reservation System MCP Server Show me all successful reservations and cancel JOIN12345 due to a scheduling conflict."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
预约系统 MCP 服务器
这是一个基于 Model Context Protocol (MCP) 的微信云开发预约系统API服务器,允许AI模型安全地访问和管理预约数据。
功能特性
🔧 支持的工具
query_reservations - 查询预约记录
支持按用户ID、状态、预约项目ID筛选
可设置返回记录数限制
返回格式化的预约信息
update_reservation_status - 更新预约状态
取消预约(状态设为10)
恢复预约(状态设为1)
系统取消(状态设为99)
可添加取消理由
delete_reservation - 删除预约记录
永久删除指定预约记录
不可撤销操作,需谨慎使用
📊 预约状态说明
1- ✅ 预约成功10- ❌ 已取消99- ⚠️ 系统取消
Related MCP server: twenty-mcp-server
安装和配置
1. 安装依赖
cd mcp-reservation-server
npm install2. 配置环境变量
复制环境变量示例文件并配置:
cp .env.example .env编辑 .env 文件:
WECHAT_APP_ID=你的微信小程序AppID
WECHAT_APP_SECRET=你的微信小程序Secret
WECHAT_ENV_ID=你的微信云环境ID3. 构建项目
npm run build4. 启动服务器
npm start或开发模式:
npm run dev在AI客户端中使用
配置MCP客户端
在你的AI客户端配置文件中添加这个MCP服务器:
{
"mcpServers": {
"reservation": {
"command": "node",
"args": ["/path/to/mcp-reservation-server/dist/index.js"],
"env": {
"WECHAT_APP_ID": "你的AppID",
"WECHAT_APP_SECRET": "你的Secret",
"WECHAT_ENV_ID": "你的环境ID"
}
}
}
}Claude Desktop 配置示例
{
"mcpServers": {
"reservation": {
"command": "node",
"args": ["C:\\path\\to\\mcp-reservation-server\\dist\\index.js"],
"env": {
"WECHAT_APP_ID": "",
"WECHAT_APP_SECRET": "",
"WECHAT_ENV_ID": ""
}
}
}
}使用示例
查询预约记录
请查询所有状态为成功的预约记录取消预约
请取消预约ID为 JOIN123456 的预约,理由是"用户主动取消"删除预约
请永久删除预约ID为 JOIN123456 的记录API参考
微信云开发API端点
本MCP服务器使用以下微信云开发API:
获取Access Token:
GET https://api.weixin.qq.com/cgi-bin/token数据库查询:
POST https://api.weixin.qq.com/tcb/databasequery数据库更新:
POST https://api.weixin.qq.com/tcb/databaseupdate数据库删除:
POST https://api.weixin.qq.com/tcb/databasedelete
数据库集合
ax_join: 预约记录表
JOIN_ID: 预约记录IDJOIN_USER_ID: 用户IDJOIN_MEET_ID: 预约项目IDJOIN_MEET_TITLE: 预约项目标题JOIN_STATUS: 预约状态JOIN_REASON: 取消理由其他字段...
安全注意事项
环境变量保护: 确保微信AppSecret等敏感信息通过环境变量设置,不要硬编码在代码中
访问权限: 确保只有受信任的AI客户端可以访问此MCP服务器
操作日志: 服务器会记录所有API调用,便于审计
数据备份: 删除操作不可撤销,建议定期备份重要数据
故障排除
常见错误
AccessToken不合法 (40014)
检查AppID和AppSecret是否正确
确认IP白名单设置
AccessToken过期 (42001)
服务器会自动刷新token,如持续出现请检查系统时间
数据库查询失败
检查云环境ID是否正确
确认数据库集合是否存在
调试模式
设置环境变量启用调试日志:
LOG_LEVEL=debug npm start开发
项目结构
mcp-reservation-server/
├── src/
│ ├── index.ts # 主服务器文件
│ ├── wechat-api.ts # 微信API客户端
│ └── types.ts # 类型定义
├── package.json
├── tsconfig.json
├── .env.example
└── README.md构建命令
npm run build- 编译TypeScriptnpm run dev- 开发模式运行npm run clean- 清理构建文件
许可证
MIT License
贡献
欢迎提交Issue和Pull Request!
Available Tools
14 toolscreate_meet_windowB
创建新的预约窗口,包含时间段设置和用户填写资料设置
Inputs: title (required), seat_count (required), meet_days (required), order, +3 more.
delete_meet_windowC
删除预约窗口(谨慎操作)
Inputs: meet_id (required).
delete_reservationC
永久删除预约记录(谨慎操作)
Inputs: record_id (required).
delete_reservation_by_mobileC
根据手机号删除预约记录
Inputs: mobile (required).
delete_reservation_by_nameC
根据预约人姓名删除预约记录
Inputs: name (required).
query_all_reservationsC
查询所有预约记录
Inputs: limit, status.
query_meet_windowsC
查询预约窗口
Inputs: status, limit.
query_reservationsC
查询预约记录,支持按用户ID、状态、预约项目ID等条件筛选
Inputs: user_id, status, meet_id, limit.
query_reservations_by_mobileC
根据手机号查询预约记录
Inputs: mobile (required).
query_reservations_by_nameC
根据预约人姓名查询预约记录
Inputs: name (required).
update_meet_windowC
更新预约窗口
Inputs: meet_id (required), title, seat_count, content, +1 more.
update_reservation_statusC
更新预约状态(取消预约、恢复预约等)
Inputs: record_id (required), new_status (required), reason.
update_reservation_time_by_mobileC
根据手机号更改预约时间
Inputs: mobile (required), new_day (required), new_time_start (required), new_time_end (required), +1 more.
update_reservation_time_by_nameC
根据预约人姓名修改预约时间
Inputs: name (required), new_day (required), new_time_start (required), new_time_end (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Most tools have distinct purposes, but there is some overlap in deletion and query operations. For example, delete_reservation, delete_reservation_by_mobile, and delete_reservation_by_name could be confusing as they target the same resource with minor variations, though descriptions clarify the distinctions. Similarly, query_reservations and its by-mobile/by-name variants might cause misselection if not carefully read.
Tool names follow a highly consistent verb_noun pattern throughout, with clear actions like create, delete, query, and update paired with specific nouns (e.g., meet_window, reservation). All names use snake_case uniformly, making them predictable and easy to parse for an agent.
With 14 tools, this server is well-scoped for a reservation system, covering core operations like creation, deletion, querying, and updates. Each tool appears to serve a specific function without unnecessary redundancy, fitting within the typical 3-15 tool range for such a domain.
The tool set provides strong coverage for reservation management, including CRUD operations for both meet windows and reservations, with support for status updates and time changes. A minor gap is the lack of a tool for creating reservations directly, which might be implied but not explicitly provided, though agents can likely work around this using existing tools.
Maintenance
Related MCP Connectors
A paid remote MCP for AI SDK data query MCP, built to return verdicts, receipts, usage logs, and aud
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Cloud-hosted MCP server for secure AI access to enterprise data sources via CData Connect AI.
MCP server enabling AI agents to manage Bitrix24 features via standardized protocol
Related MCP Servers
- FlicenseAqualityNot gradedmaintenanceAn MCP server for interacting with Saptiva AI's suite of models, offering capabilities such as chat completions, chain-of-thought reasoning, and OCR. It enables users to generate semantic embeddings, access specialized prompts, and manage AI-driven workflows through a standardized interface.7-
- AlicenseNot gradedqualityDmaintenanceA standalone MCP server that integrates with Twenty CRM to provide AI-powered CRM capabilities, enabling CRUD operations and real-time synchronization.164 npmMIT
- FlicenseCqualityDmaintenanceMCP server for reading local WeChat data, enabling AI assistants to query chat history, contacts, sessions, and more via MCP tools.209-
- AlicenseNot gradedqualityCmaintenanceMCP server that enables AI assistants to read and write Tencent Docs (smart tables and online spreadsheets) directly, supporting CRUD operations on records and attachments.504 npmMIT