Skip to main content
Glama
ho-ju
by ho-ju

AMC MCP Server 🎬

一个模型上下文协议(MCP)服务器,为 AMC Theatres 提供全面的电影预订体验。该服务器使对话式 AI 助手能够通过简单的 API 接口帮助用户发现电影、查找放映时间、预订座位和处理付款。

功能 ✨

  • 电影发现:浏览当前上映的电影并获得个性化推荐

  • 放映时间查询:按地点、日期和电影查找可用的放映时间

  • 座位选择:查看交互式座位图并检查可用性

  • 预订管理:通过实时可用性检查预订座位

  • 支付处理:处理带有确认收据的模拟支付交易

  • 多地点支持:跨多个 AMC 影院地点搜索

Related MCP server: Travel Amadeus MCP Server

快速开始 🚀

先决条件

  • Python 3.8+

  • Docker(可选,用于容器化部署)

安装

选项 1:本地安装

  1. 克隆仓库:

git clone <repository-url>
cd amc-mcp
  1. 安装依赖:

pip install -r requirements.txt
  1. 安装包:

pip install -e .
  1. 运行服务器:

python -m amc_mcp.fastmcp_server

选项 2:Docker 部署

  1. 使用 Docker Compose 构建并运行:

docker-compose up --build
  1. 或手动构建并运行:

docker build -t amc-mcp .
docker run -it amc-mcp

MCP 工具参考 🛠️

1. get_now_showing

返回指定地点当前上映的电影列表。

输入:

{
  "location": "Boston, MA"
}

输出:

{
  "location": "Boston, MA",
  "movies": [
    {
      "movie_id": "mv001",
      "title": "Dune: Part Two",
      "rating": "PG-13",
      "duration": 166,
      "genre": "Sci-Fi/Action",
      "description": "Paul Atreides unites with Chani..."
    }
  ]
}

2. get_recommendations

根据心情、类型或偏好推荐电影。

输入:

{
  "genre": "action",
  "mood": "exciting"
}

输出:

{
  "criteria": {"genre": "action", "mood": "exciting"},
  "recommendations": [...]
}

3. get_showtimes

获取特定电影和地点的可用放映时间。

输入:

{
  "movie_id": "mv001",
  "date": "2025-10-28",
  "location": "Boston, MA"
}

输出:

{
  "movie": {"id": "mv001", "title": "Dune: Part Two"},
  "date": "2025-10-28",
  "location": "Boston, MA",
  "showtimes": [
    {
      "showtime_id": "st001",
      "theater_name": "AMC Boston Common 19",
      "theater_address": "175 Tremont Street",
      "time": "14:00",
      "format": "IMAX",
      "price": 18.50
    }
  ]
}

4. get_seat_map

显示特定放映时间的可用座位和已预订座位。

输入:

{
  "showtime_id": "st001"
}

输出:

{
  "showtime_id": "st001",
  "movie": "Dune: Part Two",
  "theater": "AMC Boston Common 19",
  "date": "2025-10-28",
  "time": "14:00",
  "seat_map": [
    {
      "seat_number": "A5",
      "row": "A",
      "column": 5,
      "is_available": true,
      "price_tier": "Standard",
      "price": 18.50
    }
  ]
}

5. book_seats

为用户预订所选座位。

输入:

{
  "showtime_id": "st001",
  "seats": ["A5", "A6"],
  "user_id": "user123"
}

输出:

{
  "booking_id": "booking-uuid",
  "status": "pending",
  "movie": "Dune: Part Two",
  "theater": "AMC Boston Common 19",
  "date": "2025-10-28",
  "time": "14:00",
  "seats": ["A5", "A6"],
  "total_price": 37.00
}

6. process_payment

处理模拟支付交易。

输入:

{
  "booking_id": "booking-uuid",
  "payment_method": "card",
  "amount": 37.00
}

输出:

{
  "payment_id": "payment-uuid",
  "payment_status": "success",
  "booking_id": "booking-uuid",
  "receipt_url": "https://amc.com/receipts/payment-uuid",
  "confirmation": {
    "movie": "Dune: Part Two",
    "theater": "AMC Boston Common 19",
    "date": "2025-10-28",
    "time": "14:00",
    "seats": ["A5", "A6"],
    "total_paid": 37.00
  }
}

示例对话流程 💬

以下是典型的电影预订对话流程:

  1. 用户:“今晚在我附近找一部动作片。”

    • 服务器调用:get_now_showing + get_recommendations

    • 返回:带放映时间的动作片列表

  2. 用户:“预订今晚 8 点《沙丘:第二部》的两个座位。”

    • 服务器调用:get_showtimesget_seat_mapbook_seats

    • 返回:座位选择和预订确认

  3. 用户:“用我的卡支付。”

    • 服务器调用:process_payment

    • 返回:带数字收据的支付确认

架构 🏗️

amc-mcp/
├── src/
│   └── amc_mcp/
│       ├── __init__.py
│       └── server.py          # Main MCP server implementation
├── data/
│   ├── movies.json           # Movie catalog
│   ├── theaters.json         # Theater locations
│   ├── showtimes.json        # Showtime schedules
│   └── seats.json           # Seat maps by showtime
├── config/
│   └── nginx.conf           # Web server configuration
├── Dockerfile               # Container configuration
├── docker-compose.yml       # Multi-service orchestration
├── requirements.txt         # Python dependencies
├── pyproject.toml          # Package configuration
└── README.md               # This file

数据模型 📊

Movie

{
  "movie_id": str,
  "title": str,
  "rating": str,         # PG, PG-13, R, etc.
  "duration": int,       # Minutes
  "genre": str,
  "description": str,
  "poster_url": str
}

Theater

{
  "theater_id": str,
  "name": str,
  "address": str,
  "city": str,
  "state": str,
  "zip_code": str
}

Showtime

{
  "showtime_id": str,
  "movie_id": str,
  "theater_id": str,
  "date": str,           # YYYY-MM-DD
  "time": str,           # HH:MM
  "format": str,         # Standard, IMAX, 3D, Dolby
  "price": float
}

开发 👨💻

添加新电影

编辑 data/movies.json 以添加新电影:

{
  "movie_id": "mv011",
  "title": "New Movie Title",
  "rating": "PG-13",
  "duration": 120,
  "genre": "Action",
  "description": "Description of the movie...",
  "poster_url": "https://example.com/poster.jpg"
}

添加新影院

编辑 data/theaters.json

{
  "theater_id": "th011",
  "name": "AMC New Location 15",
  "address": "123 Main Street",
  "city": "New City",
  "state": "NY",
  "zip_code": "12345"
}

添加放映时间

编辑 data/showtimes.jsondata/seats.json 以添加新的放映时间和相应的座位图。

测试

手动测试

您可以使用 MCP 检查器或连接到任何兼容 MCP 的客户端来测试各个工具。

使用 Claude Desktop 进行测试

  1. 配置 Claude Desktop 以连接到您的 MCP 服务器

  2. 使用自然语言测试预订流程

  3. 示例:“找一部今晚在波士顿上映的科幻电影”

配置 ⚙️

环境变量

  • PYTHONPATH:设置为 /app/src 以确保正确的模块解析

  • PYTHONUNBUFFERED:设置为 1 以实现实时日志记录

  • MCP_LOG_LEVEL:设置日志级别(DEBUG、INFO、WARNING、ERROR)

Docker 配置

服务器运行在轻量级 Python 3.11 容器中,具有:

  • 非 root 用户以确保安全

  • 用于监控的健康检查

  • 用于数据持久化的卷挂载

  • 网络隔离

安全注意事项 🔒

这是一个模拟实现,用于演示目的。在生产环境中:

  1. 支付处理:与真实支付网关(Stripe、PayPal)集成

  2. 身份验证:添加用户身份验证和授权

  3. 数据验证:实现全面的输入验证

  4. 速率限制:添加 API 速率限制

  5. 加密:使用 HTTPS 并加密敏感数据

  6. 数据库:用真实数据库替换 JSON 文件

  7. 日志记录:实现结构化日志记录和监控

未来增强 🔮

  • 真实 AMC API 集成:连接到实际的 AMC Theatres API

  • 用户账户:持久的用户资料和预订历史

  • 团体预订:支持多个用户一起预订

  • 会员计划:AMC Stubs 集成

  • 移动票券:生成用于移动入场的二维码

  • 座位推荐:AI 驱动的优化座位建议

  • 价格提醒:通知用户折扣和促销信息

  • 社交功能:与朋友分享电影计划

  • 无障碍:符合 ADA 标准的座位选择

  • 多语言:国际语言支持

贡献 🤝

  1. Fork 仓库

  2. 创建功能分支:git checkout -b feature/new-feature

  3. 进行更改并添加测试

  4. 提交更改:git commit -am 'Add new feature'

  5. 推送到分支:git push origin feature/new-feature

  6. 提交拉取请求(Pull Request)

许可证 📄

本项目采用 MIT 许可证授权 - 有关详细信息,请参阅 LICENSE 文件。

支持 💬

如有问题、疑问或功能请求:

  • 在 GitHub 仓库中创建 issue

  • 查看文档以获取常见解决方案

  • 查看示例对话流程


祝您预订电影愉快!🍿🎬

Install Server
A
license - permissive license
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Provides a comprehensive movie booking experience for AMC Theatres, enabling users to discover movies, find showtimes, select seats, and process payments through conversational AI. Supports multi-location theater search with real-time seat availability and booking management.
    6
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Discover and book businesses via AI agents.

  • An AI concierge that turns static forms into adaptive AI conversations. From any MCP client.

  • AI marketplace — flights, tours, activities, transport & more via MCP. No auth required.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ho-ju/amc-mcp-hoju'

If you have feedback or need assistance with the MCP directory API, please join our Discord server