AI Hotel MCP Server
Provides tools to access flexible document storage for conversation transcripts and AI memories.
Provides tools to query hotel transactional data including guests, rooms, bookings, AI decisions, and more.
Provides caching for guest preferences, recent sentiment, and sensor readings, with performance benchmarking tools.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AI Hotel MCP ServerShow me the profile of guest Alice Smith"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI Hotel MCP Server
Production-quality MCP (Model Context Protocol) server for an AI-driven hotel booking system with hybrid database architecture.
π― Project Overview
This project showcases an intelligent hotel management system where "Poe," an AI entity, orchestrates operations, learns from guest interactions, and makes autonomous decisions. The system demonstrates the benefits of a hybrid database architecture through live performance benchmarking.
Key Features
30+ MCP Tools: Complete hotel operations accessible via Claude Code
Hybrid Architecture: PostgreSQL + MongoDB + Redis working together
Live Benchmarking: Real-time performance comparisons showing 10-20x improvements with caching
Realistic Data: 100 guests, 500 bookings, 1000+ conversations ready for testing
12 Core Queries: All SQL queries from the PDF specification
AI Decision Tracking: Complete learning loop implementation
Related MCP server: travel-mcp-server
π Database Architecture
βββββββββββββββ ββββββββββββββββ βββββββββββ
β PostgreSQL ββββββΆβ MCP Server ββββββΆβ Redis β
β (ACID Data) β β (Python) β β (Cache) β
βββββββββββββββ ββββββββββββββββ βββββββββββ
β
βΌ
ββββββββββββββββ
β MongoDB β
β (Documents) β
ββββββββββββββββDatabase Roles
PostgreSQL: Transactional data (10 tables: Guest, Room, Booking, AIPersonality, AIConversation, AIDecision, AIMemory, GuestProfile, SensorData, ProactiveAction)
MongoDB: Flexible document storage (Conversation transcripts with nested messages, AI memories with rich content)
Redis: Ultra-fast caching layer (Guest preferences, Recent sentiment, Sensor readings)
π Quick Start
Prerequisites
Docker & Docker Compose
Python 3.11+
Claude Code (for MCP client)
1. Start Databases
# Start all services (PostgreSQL, MongoDB, Redis)
docker-compose up -d
# Verify all services are healthy
docker ps
# Check logs
docker-compose logs -f postgres
docker-compose logs -f mongodb
docker-compose logs -f redis2. Verify Database Setup
# Connect to PostgreSQL
docker exec -it hotel-ai-postgres psql -U hotel_admin -d hotel_ai
# List tables (should show 10 tables)
\dt
# Check sample data
SELECT COUNT(*) FROM Guest; -- Should show 100
SELECT COUNT(*) FROM Booking; -- Should show 500
SELECT COUNT(*) FROM AIConversation; -- Should show 1000
\q
# Connect to MongoDB
docker exec -it hotel-ai-mongodb mongosh -u hotel_admin -p hotel_password_2026 --authenticationDatabase admin
use hotel_ai
show collections -- Should show: conversations, ai_memories
db.conversations.countDocuments() -- Should show at least 1
exit
# Connect to Redis
docker exec -it hotel-ai-redis redis-cli
PING -- Should return PONG
exit3. Install Python Dependencies
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt4. Configure Environment
# Copy example environment file
cp .env.example .env
# Edit .env if needed (defaults should work with Docker)
# For local Docker: hosts are already set to localhost5. Run MCP Server
# Start MCP server (connects via stdio to Claude Code)
python src/main.py
# Or run in background
nohup python src/main.py > mcp_server.log 2>&1 &Configure in Claude Code:
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"hotel-ai": {
"command": "python",
"args": ["/absolute/path/to/HotelAiProject/src/main.py"],
"env": {
"POSTGRES_HOST": "localhost",
"POSTGRES_PORT": "5432",
"MONGO_HOST": "localhost",
"REDIS_HOST": "localhost"
}
}
}
}Test MCP Connection:
In Claude Code, you should see 19 available tools:
13 query tools (12 from PDF + get_guest_profile)
6 testing/benchmark tools
π Project Structure
hotel-ai-mcp-server/
βββ docker-compose.yml # Multi-container orchestration
βββ .env.example # Environment template
βββ README.md # This file
βββ requirements.txt # Python dependencies
β
βββ docker/ # Docker configuration
β βββ postgres/init/ # PostgreSQL initialization
β β βββ 01-create-schema.sql # 10 tables (exact from PDF)
β β βββ 02-create-indexes.sql # 14 performance indexes
β β βββ 03-seed-data.sql # Realistic sample data
β βββ mongodb/init/ # MongoDB initialization
β βββ init-collections.js # Conversation & memory collections
β
βββ src/ # Source code
β βββ main.py # MCP server entry point β
β βββ config.py # Configuration management β
β βββ database/ # Database clients
β β βββ postgres_client.py # PostgreSQL (12 queries) β
β β βββ mongodb_client.py # MongoDB operations β
β β βββ redis_client.py # Redis caching β
β β βββ models.py # Pydantic models β
β βββ mcp/ # MCP implementation
β βββ server.py # MCP server setup β
β βββ tools/ # MCP tools
β βββ query_tools.py # 13 query tools β
β βββ testing_tools.py # 6 benchmark tools β
β
βββ tests/ # Test suite
βββ test_database_clients.py # Database tests β
ποΈ Database Schema
PostgreSQL Tables (10 tables)
Core Hotel Data:
Guest: 100 guests with profilesRoom: 150 rooms (10 floors Γ 15 rooms)Booking: 500 bookings (350 completed, 50 active, 100 future)
AI Core:
AIPersonality: Poe's configuration (learning_rate=0.75)AIConversation: 1000 conversations with sentiment analysisAIDecision: 1000 autonomous decisions (~85% success rate)AIMemory: 500 memories about guests, patterns, events
AI Intelligence:
GuestProfile: 100 AI-generated profiles with preferencesSensorData: 10,000+ sensor readings (last 7 days)ProactiveAction: 500 autonomous service actions
Indexes (14 strategic indexes)
All indexes from PDF Section 4.4 implemented:
Guest profile fast retrieval (<100ms)
Conversation timeline
Sensor time-series
Decision analysis
Memory retrieval
Room availability
And 8 more...
π§ Configuration
Edit .env file for custom configuration:
# Toggle Redis for benchmarking
REDIS_ENABLED=true # Set to false to test without cache
# Cache TTLs
CACHE_TTL_GUEST_PREFERENCES=3600 # 1 hour
CACHE_TTL_RECENT_SENTIMENT=1800 # 30 minutes
CACHE_TTL_SENSOR_DATA=60 # 60 seconds
# Benchmark iterations
BENCHMARK_ITERATIONS=100π Sample Data
The system includes realistic sample data for immediate testing:
100 Guests: Mix of frequent (10), regular (10), and new guests (80)
150 Rooms: All 4 types (Single, Double, Suite, Deluxe) across 10 floors
500 Bookings: 70% AI-assigned, 30% manual
350 completed (past 6 months)
50 active (currently checked in)
100 future (confirmed)
1000 Conversations: Various topics, sentiments, channels
1000 AI Decisions: 5 types, 85% success rate
100 Guest Profiles: JSON preferences and behavior patterns
10,000+ Sensor Readings: Temperature, occupancy, sound, light, door status
500 Proactive Actions: With guest response feedback
500 AI Memories: Linked to guests, bookings, conversations
π― MCP Tools (19 Tools Available)
Query Tools (13 tools)
From PDF Section 4.3 (12 queries):
β
search_available_rooms- Find rooms for date rangeβ
get_recent_conversations- Conversation historyβ
get_ai_decision_success_rate- Performance metricsβ
find_low_satisfaction_guests- At-risk guests needing attentionβ
get_proactive_action_counts- Action type frequenciesβ
get_guest_stay_history- Complete booking historyβ
get_recent_sensor_data- IoT sensor readingsβ
count_successful_decisions_month- Monthly success countβ
compare_ai_vs_manual_bookings- AI vs manual assignmentβ
get_recent_memory_access- Recently accessed memoriesβ
find_high_confidence_failures- Learning opportunitiesβ
get_proactive_actions_per_guest- Actions per active guest
Bonus:
13. β
get_guest_profile - Profile with cache demonstration
Testing/Benchmark Tools (6 tools)
β
benchmark_query_with_redis- Measure with cachingβ
benchmark_query_without_redis- Measure without cachingβ
compare_redis_performance- Side-by-side Redis comparison (shows 10-20x speedup)β
validate_performance_requirements- Check <100ms/<500ms SLAsβ
get_cache_statistics- Redis stats (hit rate, memory)β
clear_redis_cache- Clear cache for testing
Example Usage
# Find available rooms
User: "Show me available Double rooms for March 1-5, 2026"
β Calls: search_available_rooms(check_in_date="2026-03-01", check_out_date="2026-03-05", room_type="Double")
# Benchmark Redis performance
User: "Prove that Redis improves performance for guest profile retrieval"
β Calls: compare_redis_performance(guest_id=1, iterations=100)
β Result: "12.1x faster with Redis (12ms vs 145ms), 92% latency reduction"
# Find at-risk guests
User: "Which guests need proactive attention right now?"
β Calls: find_low_satisfaction_guests(threshold=3.0)
# Validate SLAs
User: "Are we meeting our performance requirements?"
β Calls: validate_performance_requirements(guest_id=1, iterations=50)π§ͺ Testing
Manual Database Tests
# Test PostgreSQL queries
docker exec -it hotel-ai-postgres psql -U hotel_admin -d hotel_ai -c "
SELECT r.room_number, r.room_type, r.floor
FROM Room r
WHERE r.status = 'Available'
AND r.room_type = 'Double'
LIMIT 5;
"
# Test MongoDB queries
docker exec -it hotel-ai-mongodb mongosh -u hotel_admin -p hotel_password_2026 --authenticationDatabase admin --eval "
db = db.getSiblingDB('hotel_ai');
db.conversations.findOne();
"
# Test Redis
docker exec -it hotel-ai-redis redis-cli PINGPerformance Benchmarks (Expected)
Based on PDF specifications:
Operation | Without Redis | With Redis | Improvement |
Guest Profile Retrieval | 145ms | 12ms | 12.1x faster |
Room Search | 285ms | N/A | Index optimized |
Conversation History | 420ms (relational) | 95ms (MongoDB) | 4.4x faster |
π Documentation
Based on PDF Specification
This implementation follows the complete database design from:
DB_Semesterprojekt_AI_Hotel.pdf
Key sections implemented:
Section 2: Requirements Analysis (100%)
Section 3: Information Modeling (ER diagram, 10 entities)
Section 4: Relational Implementation (10 tables, 12 queries, 14 indexes)
Section 5: NoSQL Discussion (MongoDB + Redis integration)
Architecture Decisions
PostgreSQL for Transactions: ACID compliance for bookings, ensures no double-bookings
MongoDB for Conversations: Nested message arrays, flexible schema for AI evolution
Redis for Caching: Sub-100ms access to frequently read data
π Troubleshooting
Database Connection Issues
# Check service health
docker-compose ps
# Restart services
docker-compose restart postgres mongodb redis
# View logs
docker-compose logs postgresPort Conflicts
If ports 5432, 27017, or 6379 are already in use:
# Edit docker-compose.yml and change ports:
ports:
- "5433:5432" # PostgreSQL
- "27018:27017" # MongoDB
- "6380:6379" # RedisThen update .env:
POSTGRES_PORT=5433
MONGO_PORT=27018
REDIS_PORT=6380π Development Status
β Phase 1-3: Infrastructure & Database Layer (COMPLETE)
Docker infrastructure (PostgreSQL, MongoDB, Redis)
Database schemas (10 tables, exact from PDF)
Indexes (14 strategic indexes)
Sample data generation (100 guests, 500 bookings, 1000+ items)
MongoDB collections with validation
Configuration management
Pydantic models for type safety
Database clients (PostgreSQL, MongoDB, Redis)
Database client tests (all passing β)
β Phase 4-6: MCP Server Core (COMPLETE)
MCP server with stdio transport
13 query tools (12 from PDF + get_guest_profile)
6 performance benchmarking tools
Redis cache-aside pattern with toggle
Connection pooling for all databases
π Current Capabilities
Total: 19 MCP Tools Ready
Query operations: 13 tools
Testing/benchmarking: 6 tools
Performance: <100ms cached, <500ms queries
Sample data: 100 guests, 500 bookings, 1000+ conversations
π Future Enhancements (Optional)
Mutation tools (create_booking, log_ai_decision, etc.)
Analytics tools (trends, accuracy analysis)
MCP resources (browsable data)
MCP prompts (interaction templates)
Web UI for monitoring
Additional unit tests
π License
This is an academic project for demonstrating database design and MCP server implementation.
π€ Contributing
This is a semester project. For questions or suggestions, please open an issue.
π References
PDF Specification:
DB_Semesterprojekt_AI_Hotel.pdf
Built with: Python, PostgreSQL, MongoDB, Redis, Docker, MCP SDK Purpose: Demonstrate hybrid database architecture with AI-driven hotel operations Author: Iyad Elwy Institution: PSE Master - KnowledgeFoundation@HSReutlingen
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/IyadElwy/hotel_ai_mcp_project'
If you have feedback or need assistance with the MCP directory API, please join our Discord server