Skip to main content
Glama

🎬 BookMyShow MCP Webscraper

Python Version FastAPI MCP Server License Tests

一个用于 BookMyShow 的 Python 爬虫和 API 封装工具,可提取电影列表、影院场次、票价以及场馆位置详情(包括 GPS 纬度和经度)。

它将所有功能打包为一个 FastAPI REST 服务器MCP 工具(供 Claude 或 Cursor 等 AI 助手使用)、一个 CLI 工具以及一个内置 Web 仪表盘


✨ 功能特性

  • 列出电影与活动:获取印度各城市(孟买、德里 NCR、班加罗尔、金奈等)的当前热映或即将上映电影列表,支持语言和类型筛选。

  • 获取场次与票价:拉取影院场次、银幕格式(2D、3D、IMAX、4DX)、票价区间(以 ₹ 计)以及座位可用性。

  • 提取场馆位置与经纬度:获取影院街道地址、精确纬度和经度坐标以及场馆设施(停车场、美食广场、M-ticket 入场)。

  • 获取电影简介与预告片:获取剧情摘要、演职人员信息、评分、海报以及 YouTube 预告片链接。

  • 作为 MCP 服务器运行:通过 bms-mcp(或本地 mcp_server.py)即可与 AI 工具(Claude Desktop、Cursor、Antigravity)开箱即用地配合使用。

  • FastAPI REST 服务器:提供交互式 Swagger API 文档(/docs)。

  • 终端 CLI:用于搜索、列表和导出的终端界面。

  • 导出到文件:将抓取的数据导出为 JSON、CSV 或 Excel(.xlsx)格式。

  • Web 仪表盘:简洁的浅色主题仪表盘,用于浏览电影和测试端点。


Related MCP server: Movie Booking Assistant

🚀 快速开始与安装

git clone https://github.com/m0han-r/bookmyshow-mcp-webscraper.git
cd bookmyshow-mcp-webscraper
pip install -r requirements.txt

🔌 API 与 MCP 工具

REST 端点

MCP 工具名称

参数

描述

GET /api/v1/cities

bms_get_cities

popular_only

支持的印度地区及热门城市

GET /api/v1/movies

bms_get_movies

city, language, genre

当前热映电影列表,支持语言/类型筛选

GET /api/v1/events

bms_get_events

city, category

现场活动、喜剧演出、音乐会和体育赛事

GET /api/v1/movies/{code}

bms_get_movie_details

movie_code, city

剧情简介、演职人员、评分、海报和预告片链接

GET /api/v1/showtimes

bms_get_showtimes

movie_code, city, date, language, format

场次、银幕格式(IMAX/3D/4DX)、票价、座位及语言筛选

GET /api/v1/venues/{code}

bms_get_venue_details

venue_code, city

影院街道地址、精确纬度、经度及设施

GET /api/v1/search

bms_search

query, city

跨搜索电影和现场活动

场馆响应示例(GET /api/v1/venues/PCAN?city=chennai):

{
  "success": true,
  "count": 1,
  "data": {
    "venue_code": "PCAN",
    "venue_name": "PVR: VR Chennai, Anna Nagar",
    "address": "3rd Floor, VR Mall, Metro Zone, Jawaharlal Nehru Road, Anna Nagar, Chennai, Tamil Nadu 600040",
    "latitude": 13.082561,
    "longitude": 80.194803,
    "facilities": ["Ticket Cancellation", "F&B", "MTicket", "Parking Facility", "Food Court"]
  }
}

🌐 运行 REST API 服务器

启动服务器:

python main.py

🤖 MCP 服务器设置

使用 uvx 连接您的 AI 助手(Claude Desktop、Cursor、Antigravity)。uvx 会自动从 GitHub 获取包并执行 pyproject.toml 中注册的 bms-mcp 脚本入口点。

Claude Desktop / Cursor / Antigravity 配置

添加到您的 %APPDATA%\Claude\claude_desktop_config.json(或 .cursor/mcp.json):

{
  "mcpServers": {
    "bookmyshow": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git",
        "bms-mcp"
      ]
    }
  }
}

直接在终端执行

直接在 PowerShell 或命令提示符中运行(uv 在 Windows 上生成并运行 bms-mcp.exe 包装器):

uvx --from git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git bms-mcp

Claude Desktop / Cursor / Antigravity 配置

添加到您的 ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "bookmyshow": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git",
        "bms-mcp"
      ]
    }
  }
}

直接在终端执行

直接在 Linux 终端中运行:

uvx --from git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git bms-mcp

Claude Desktop / Cursor / Antigravity 配置

添加到您的 ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "bookmyshow": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git",
        "bms-mcp"
      ]
    }
  }
}

直接在终端执行

直接在 macOS 终端 / zsh 中运行:

uvx --from git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git bms-mcp

如果您已在本地克隆了仓库:

python mcp_server.py

🐍 Python 用法

from bms_scraper import BookMyShowScraper

scraper = BookMyShowScraper()

# Get active movies
movies = scraper.get_movies(city="mumbai", language="Hindi")

# Get venue coordinates
venue = scraper.get_venue_details(venue_code_or_url="PCAN", city="chennai")
print(f"📍 {venue.venue_name} - Lat: {venue.latitude}, Lon: {venue.longitude}")

# Get showtimes (supports language filters e.g. "tamil", "hindi", "all" and format filters e.g. "IMAX", "2D")
showtimes = scraper.get_showtimes(movie_code_or_url="ET00378770", city="chennai", date="20260827", language="tamil", format="2D")

💻 CLI 用法

通过 uvx 直接执行 CLI,无需安装依赖,或通过 Python 在本地执行:

# List popular cities via uvx
uvx --from git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git bms-cli cities --popular

# Scrape movies in Bengaluru and export to Excel
uvx --from git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git bms-cli movies --city bengaluru --language Hindi --export xlsx

# Scrape showtimes in Chennai for Tamil language with date and export to JSON
uvx --from git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git bms-cli showtimes --code ET00378770 --city chennai --date 20260827 --language tamil --export json
# List popular cities via uvx
uvx --from git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git bms-cli cities --popular

# Scrape movies in Bengaluru and export to Excel
uvx --from git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git bms-cli movies --city bengaluru --language Hindi --export xlsx

# Scrape showtimes in Chennai for Tamil language with date and export to JSON
uvx --from git+https://github.com/m0han-r/bookmyshow-mcp-webscraper.git bms-cli showtimes --code ET00378770 --city chennai --date 20260827 --language tamil --export json
# List popular cities
python -m bms_scraper.cli cities --popular

# Scrape movies in Bengaluru and export to Excel
python -m bms_scraper.cli movies --city bengaluru --language Hindi --export xlsx

# Scrape showtimes with language filter
python -m bms_scraper.cli showtimes --code ET00378770 --city chennai --date 20260827 --language tamil --format 2D

📊 导出数据

from bms_scraper import BookMyShowScraper, DataExporter

scraper = BookMyShowScraper()
movies = scraper.get_movies(city="mumbai")

DataExporter.to_csv(movies, "movies.csv")
DataExporter.to_excel(movies, "movies.xlsx")
DataExporter.to_json(movies, "movies.json")

🧪 运行测试

python -m pytest

⚖️ 许可证

根据 MIT 许可证分发。

Install Server
A
license - permissive license
A
quality
B
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

  • Live Google Maps business search, review, and photo data for AI agents over MCP.

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

  • Free public MCP for AI agents — 193 tools, 44 workflows. No API key.

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/m0han-r/bookmyshow-mcp-webscraper'

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