Skip to main content
Glama
booking-mcp

booking-mcp

by LuoZihYuan

booking-mcp

booking-mcp 是一个用于管理餐厅预订的 Model Context Protocol 服务器,通过 Streamable HTTP 提供服务。它提供了预订餐桌、检查可用性和取消预订的工具;用于读取预订簿的资源;以及用于起草确认消息的提示词。预订时,服务器会通过引导交互从用户那里收集客人的联系信息。

要求

  • Python 3.13

  • uv

Related MCP server: mcp-booking-bridge

用法

设置

创建虚拟环境,安装 SDK(mcp[cli,rich])和依赖项,并以可编辑模式安装包:

uv sync

服务器

启动服务器,该服务器在 http://127.0.0.1:8000/mcp 上提供 Streamable HTTP 服务:

uv run booking-mcp

演练

一个运行在进程内的独立交互式客户端,因此无需运行其他任何内容。它会为你提供操作菜单,并允许你自行回答引导提示。

uv run python scripts/walkthrough.py

[!TIP]

默认情况下,预订会持久化到 var/bookings.json。设置 BOOKING_DB_PATH 可将其存储到其他位置:

BOOKING_DB_PATH=/tmp/demo.json uv run python scripts/walkthrough.py

MCP 表面

Kind

Name

Notes

工具

book_table(date, time, party_size)

从用户处引导获取姓名、电话和备注

工具

cancel_booking(id)

将预订标记为已取消

工具

check_availability(date, time)

某个时段剩余的桌数

资源

bookings://all

所有预订,以 JSON 格式

资源

bookings://{id}

单个预订,以 JSON 格式

资源

availability://{date}

某日各时段的容量,以 JSON 格式

提示词

confirmation_message(id)

起草客人确认消息

布局

booking-mcp/
├── src/booking_mcp/
│   ├── app.py               # the shared MCPServer instance
│   ├── config.py            # storage path + capacity limits
│   ├── models.py            # Reservation domain model
│   ├── store.py             # JSON file repository
│   ├── server.py            # entrypoint: registers features, runs the server
│   └── features/
│       ├── reservations.py  # book/cancel + reservation resources + prompt
│       └── availability.py  # availability tool + resource
├── scripts/
│   └── walkthrough.py       # manual interactive client
└── var/                     # runtime state, gitignored (holds bookings.json)

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables restaurant reservation management through SevenRooms API, allowing users to create reservations and query available time slots with guest details and party size information.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables managing restaurant table bookings through natural language conversations with an AI assistant, with built-in safety measures like no deletion and explicit write enable.
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to manage restaurant reservations through typed MCP tools, including checking table availability, creating and canceling reservations, and listing the day's confirmed bookings.
      -