loading…
Search for a command to run...
loading…
Provides a suite of tools for searching movies, checking showtimes, and managing ticket bookings for Bangalore cinemas. It enables AI clients to handle end-to-e
Provides a suite of tools for searching movies, checking showtimes, and managing ticket bookings for Bangalore cinemas. It enables AI clients to handle end-to-end movie theater interactions including seat availability checks and reservation management.
A demo movie booking system for Bangalore cinemas, built to showcase two ways of integrating AI with a Python backend:
demo1/
├── api_v1.py # Movies & Showtimes API
├── api_v2.py # Bookings API
├── api_v3.py # Theatres & Seats API
├── chat.py # Gemini AI terminal chatbot
└── mcp_server.py # MCP server (for Claude / other MCP clients)
| File | Responsibility | Key Functions |
|---|---|---|
api_v1.py |
Movies & showtimes | search_movies, get_movie_details, get_showtimes |
api_v2.py |
Bookings | book_tickets, cancel_booking, get_booking_details, list_user_bookings |
api_v3.py |
Theatres & seats | list_theatres, get_theatre_details, check_seat_availability |
All data is hardcoded in-memory — no database required.
chat.py)You type a message
→ Sent to Gemini API
→ Gemini picks a tool to call (based on function docstrings)
→ Your code runs the function locally
→ Result sent back to Gemini
→ Gemini replies in plain English
Gemini never runs your code directly. It reads the function name, parameters, and docstring to decide what to call — your code executes it and reports back.
mcp_server.py)FastMCP automatically converts each FastAPI app into MCP tools, namespaced as movies_*, bookings_*, and theatres_*. An MCP-compatible client (like Claude Code) connects to the server and calls tools the same way Gemini does — but over the MCP protocol instead.
pip install -r requirements.txt
Create a .env file in the project root:
GEMINI_API_KEY=your_key_here
Get a key at aistudio.google.com.
python chat.py
Example interaction:
You: What sci-fi movies are showing today?
[calling tool: search_movies with {'genre': 'Sci-Fi'}]
Gemini: There are two sci-fi movies showing today — Inception and The Matrix...
You: Book 2 tickets for Inception at PVR Orion Mall
[calling tool: get_showtimes with {'movie_id': 'MOVIE-003'}]
[calling tool: book_tickets with {'showtime_id': 'SHOW-001', 'seats': 2, 'user_name': 'Joshua'}]
Gemini: Done! I've booked 2 tickets for Inception...
Type quit or exit to stop.
python mcp_server.py
Then connect any MCP-compatible client to it. For Claude Code, add it to your MCP settings pointing to this script.
Add this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"movie-booking-assistant": {
"command": "npx",
"args": []
}
}
}