Hotel_AI_Agent

sidlihe/Hotel_AI_Agent

3.2

If you are the rightful owner of Hotel_AI_Agent and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

An interactive hotel room-service assistant that integrates MongoDB for data storage and OpenAI for dialogue management.

Tools
2
Resources
0
Prompts
0

#Hotel AI Agent

An interactive hotel room-service assistant that stores menu/order data in MongoDB and uses OpenAI for dialogue + tool calls.

####Project Layout src/database/models.py – Pydantic models for menu items, allergens, dietary tags, and orders (defines the schema stored in MongoDB).

src/database/mongodb_client.py – Connection + CRUD wrapper (menu_items and orders collections).

src/services/order_service.py – Business logic for validating menu items, creating orders, estimating delivery, and dietary checks.

src/mcp_server/ai_client.py – OpenAI client wrapper; falls back to rule-based responses if no API key.

src/mcp_server/hotel_order_server.py – Conversation manager; handles function/tool calls for menu lookups and order creation.

test_database.py – Helper to seed sample menu data (create_sample_menu()).

test_mcp_server.py – CLI harness for scripted or interactive conversations (automatically seeds sample menu data each run).

test_simple_mcp.py – Lightweight sanity tests for the MCP server tools.

####Prerequisites Python 3.11+ and virtual environment (python -m venv venv, .\venv\Scripts\activate).

Install deps: pip install -r requirements.txt.

MongoDB running locally (defaults to mongodb://localhost:27017/).

.env with OPENAI_API_KEY= (optional—falls back to rule-based replies if missing).

####Seeding Data test_mcp_server.py calls db_client.initialize_menu(create_sample_menu()) on startup, so every run drops and reloads the menu with sample items.

####Running the Agent Scripted test (default scenarios):

python .\test_mcp_server.py

Interactive mode (recommended for live demos):

python .\test_mcp_server.py --mode interactive --room 304

Type guest requests; the assistant answers in real time using the OpenAI tool flow.

Commands: /room to switch rooms, /exit to quit.