Skip to content

ihhadjal/MCP_SERVER

Repository files navigation

MCP Thaïs Server

A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with the Thaïs Hotel API for managing hotel and restaurant reservations through natural language conversations.

Overview

This MCP server acts as a bridge between Large Language Models (LLMs) and the Thaïs Hotel Management API, allowing AI assistants to:

  • Check room availability with flexible date parsing (natural language support)
  • List available room types and their details
  • Create hotel e-reservations (pre-bookings)
  • Cancel existing reservations
  • Make restaurant bookings

Features

🏨 Hotel Management

  • Availability Check: Query room availability for specific dates with support for natural language date inputs (e.g., "tomorrow", "début février", "in 5 days")
  • Room Types: List all available room categories with capacity and details
  • E-Reservations: Create pre-bookings that require hotel confirmation
  • Cancellations: Delete existing e-reservations with reason tracking

🍽️ Restaurant Management

  • Table Reservations: Book restaurant tables with date, time, and party size

🌐 Smart Date Parsing

Supports multiple date formats:

  • ISO format: 2026-02-06
  • French format: 06/02/2026
  • Natural language (French/English): "demain", "tomorrow", "début février", "in 5 days"
  • Relative dates: "aujourd'hui", "après-demain"
  • Period expressions: "début mars", "mi-janvier", "fin février"

🔐 Authentication

  • Automatic JWT token management with expiration handling
  • Secure credential storage via environment variables

Technical Stack

  • TypeScript: Type-safe server implementation
  • MCP SDK: Model Context Protocol for LLM integration
  • Zod: Schema validation for tool parameters
  • Stdio Transport: Communication with Claude via STDIN/STDOUT

How It Works

  1. Claude sends a natural language request
  2. The MCP server exposes tools that Claude can invoke
  3. Tools make authenticated API calls to Thaïs Hotel API
  4. Responses are formatted into human-readable text
  5. Claude receives structured data to respond to the user

Available Tools

  • thais_check_availability - Check room availability for dates
  • thais_list_room_types - Get all available room categories
  • thais_create_e_reservation - Create a new hotel pre-booking
  • thais_delete_e_reservation - Cancel an existing reservation
  • thais_make_restaurant_booking - Reserve a restaurant table

Configuration

Requires environment variables:

  • THAIS_BASE_URL - API base URL
  • THAIS_USERNAME - Partner API username
  • THAIS_PASSWORD - Partner API password

About

A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with the Thaïs Hotel API for managing hotel and restaurant reservations through natural language conversations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors