### Install and Build Project Dependencies Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/MCP_DOCKER_SETUP.md Commands to install project dependencies using Bun and build the project. These are essential steps before running the MCP server locally. ```bash bun install bun run build ``` -------------------------------- ### Quick Install with Bunx or Npx Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Installs and runs the Lodgify MCP Server without local setup using package runner commands. Requires a Lodgify API key as an environment variable. ```json { "mcpServers": { "lodgify": { "command": "bunx", "args": ["-y", "@mikerob/lodgify-mcp"], "env": { "LODGIFY_API_KEY": "your_lodgify_api_api_key_here" } } } } ``` ```json { "mcpServers": { "lodgify": { "command": "npx", "args": ["-y", "@mikerob/lodgify-mcp"], "env": { "LODGIFY_API_KEY": "your_lodgify_api_key_here" } } } } ``` -------------------------------- ### Project Setup and Execution (Bash) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/PRD.md Provides bash commands for setting up and running the Lodgify MCP client. This includes installing dependencies, building the project, configuring environment variables, and starting the server. ```bash npm i npm run build cp .env.example .env # set LODGIFY_API_KEY npm start ``` -------------------------------- ### Source Code Installation and Build Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Details the process of cloning the Lodgify MCP Server repository from GitHub, installing dependencies using Bun or NPM, and building the project for development or deployment. ```bash # Clone repository git clone https://github.com/mikerobgit/lodgify-mcp cd lodgify-mcp # Install dependencies bun install # or npm install # Build the project bun run build # or npm run build ``` -------------------------------- ### Verify Lodgify MCP Client Installation Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Provides commands to verify the installation of the Lodgify MCP client by sending a JSON-RPC request to list tools. Supports global installation, bunx, and Docker. ```bash # If installed globally echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | lodgify-mcp # If using bunx echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | bunx -y @mikerob/lodgify-mcp # If using Docker echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | docker run -i --rm -e LODGIFY_API_KEY="test" ghcr.io/mikerobgit/lodgify-mcp:latest ``` -------------------------------- ### Install Bun Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Instructions for installing the Bun JavaScript runtime environment using curl or npm. ```bash # Install Bun curl -fsSL https://bun.sh/install | bash # Or using npm npm install -g bun ``` -------------------------------- ### Custom Docker Image Build and Run Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Guides through cloning the repository, building a custom Docker image for the Lodgify MCP Server, and then running the custom image with the API key. ```bash # Clone and build git clone https://github.com/mikerobgit/lodgify-mcp cd lodgify-mcp # Build image docker build -t lodgify-mcp . # Run custom image docker run -i \ -e LODGIFY_API_KEY="your_api_key_here" \ lodgify-mcp ``` -------------------------------- ### Manage Specific Lodgify MCP Client Versions Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Demonstrates how to install and use specific versions of the Lodgify MCP client using npm and npx/bunx. ```bash # Install specific version npm install @mikerob/lodgify-mcp@0.1.9 # Use specific version with npx npx @mikerob/lodgify-mcp@0.1.9 # Use specific version with bunx bunx @mikerob/lodgify-mcp@0.1.9 ``` -------------------------------- ### Configure Local MCP Server in .mcp.json Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/MCP_DOCKER_SETUP.md Defines the configuration for running a local MCP server using Node.js. It specifies the command, arguments, and environment variables required for the server to start and operate. ```json { "mcpServers": { "lodgify-local": { "command": "node", "args": ["dist/server.js"], "env": { "LODGIFY_API_KEY": "your_api_key_here", "LOG_LEVEL": "info" } } } } ``` -------------------------------- ### Install Lodgify MCP Client in Air-Gapped Environment Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Steps to install the Lodgify MCP client in an air-gapped environment, involving downloading the package and installing from a local file. ```bash 1. Download the package on a connected machine: npm pack @mikerob/lodgify-mcp 2. Transfer the .tgz file to the air-gapped environment 3. Install from local file: npm install -g ./mikerob-lodgify-mcp-*.tgz ``` -------------------------------- ### Docker Image Installation and Execution Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Demonstrates how to pull and run the pre-built Lodgify MCP Server Docker image, including setting the necessary Lodgify API key environment variable. ```bash # Pull and run docker pull ghcr.io/mikerobgit/lodgify-mcp:latest # Run interactively docker run -i \ -e LODGIFY_API_KEY="your_api_key_here" \ ghcr.io/mikerobgit/lodgify-mcp:latest ``` -------------------------------- ### Global Installation Configuration Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Configures the Lodgify MCP Server to be run using its globally installed command. This simplifies execution by abstracting the package runner. ```json { "mcpServers": { "lodgify": { "command": "lodgify-mcp", "env": { "LODGIFY_API_KEY": "your_lodgify_api_key_here" } } } } ``` -------------------------------- ### Clean Lodgify MCP Client Installation Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Commands to remove existing installations of the Lodgify MCP client globally or locally, and to clean npm/bun caches. ```bash # Global removal npm uninstall -g @mikerob/lodgify-mcp bun remove -g @mikerob/lodgify-mcp # Local removal npm uninstall @mikerob/lodgify-mcp bun remove @mikerob/lodgify-mcp # Clean npm cache npm cache clean --force # Clean bun cache bun cache clean ``` -------------------------------- ### Source Installation Configuration (Bun) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Configures the Lodgify MCP Server to run from source using the Bun runtime, specifying the path to the TypeScript server file and setting necessary environment variables. ```json { "mcpServers": { "lodgify": { "command": "bun", "args": ["/absolute/path/to/lodgify-mcp/src/server.ts"], "env": { "LODGIFY_API_KEY": "your_lodgify_api_key_here" } } } } ``` -------------------------------- ### Check Lodgify MCP Client Versions Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Commands to check the installed versions of the Lodgify MCP client for both global and local npm/bun installations. ```bash # Global installations npm list -g @mikerob/lodgify-mcp bun list -g @mikerob/lodgify-mcp # Local installations npm list @mikerob/lodgify-mcp bun list @mikerob/lodgify-mcp ``` -------------------------------- ### Clone Repository and Install Dependencies (Bash) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Installs project dependencies using Bun or npm after cloning the repository. Ensures the project is ready for development. ```bash git clone https://github.com/mikerobgit/lodgify-mcp cd lodgify-mcp bun install # or npm install ``` -------------------------------- ### Environment Configuration (Bash & Env) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Copies the example environment file and outlines the required Lodgify API key and optional development settings. ```bash cp .env.example .env ``` ```env # Required LODGIFY_API_KEY="your_lodgify_api_key_here" # Optional Development Settings LOG_LEVEL="debug" # Options: error | warn | info | debug DEBUG_HTTP="1" # Set to "1" for verbose HTTP debugging LODGIFY_READ_ONLY="1" # Set to "1" to prevent write operations during development ``` -------------------------------- ### Test MCP Server Locally with stdio Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/MCP_DOCKER_SETUP.md Demonstrates how to test the MCP server locally by piping an initialization request through stdio. This verifies the server's response to MCP protocol messages. ```bash # Build bun run build # Test with MCP protocol echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | \ LODGIFY_API_KEY="your_key" node dist/server.js ``` -------------------------------- ### Local and Global Package Installation Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Installs the Lodgify MCP Server package locally or globally using popular package managers like Bun, NPM, Yarn, and PNPM. This allows for better version control and performance. ```bash # Install locally bun add @mikerob/lodgify-mcp # Or install globally bun install -g @mikerob/lodgify-mcp ``` ```bash # Install locally npm install @mikerob/lodgify-mcp # Or install globally npm install -g @mikerob/lodgify-mcp ``` ```bash # Install locally yarn add @mikerob/lodgify-mcp # Or install globally yarn global add @mikerob/lodgify-mcp ``` ```bash # Install locally pnpm add @mikerob/lodgify-mcp # Or install globally pnpm add -g @mikerob/lodgify-mcp ``` -------------------------------- ### HTTP Streamable Docker Image Build and Run Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Builds and runs a specific Docker image optimized for HTTP streaming, configuring necessary tokens and API keys for operation. ```bash npm run docker:http:build docker run --rm \ -p 3000:3000 \ -e MCP_TOKEN=your_token \ -e LODGIFY_API_KEY="your_api_key_here" \ lodgify-mcp:http ``` -------------------------------- ### Source Installation Configuration (Node.js) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Configures the Lodgify MCP Server to run from source using Node.js, specifying the absolute path to the compiled server script and setting environment variables. ```json { "mcpServers": { "lodgify": { "command": "node", "args": ["/absolute/path/to/lodgify-mcp/dist/server.js"], "env": { "LODGIFY_API_KEY": "your_lodgify_api_key_here" } } } } ``` -------------------------------- ### Update Lodgify MCP Client Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Instructions for updating the Lodgify MCP client to the latest version using npx/bunx, global updates, or local updates. ```bash # NPX/Bunx (always uses latest) bunx -y @mikerob/lodgify-mcp # automatically updates # Global update npm update -g @mikerob/lodgify-mcp bun install -g @mikerob/lodgify-mcp # Local update npm update @mikerob/lodgify-mcp bun update @mikerob/lodgify-mcp ``` -------------------------------- ### Configure npm for Corporate Firewall and Proxy Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md NPM configuration commands for internal registries, proxies, and HTTPS proxies, essential for corporate environments. ```bash # NPM configuration npm config set registry http://internal-npm-registry.company.com/ npm config set proxy http://proxy.company.com:8080 npm config set https-proxy http://proxy.company.com:8080 ``` -------------------------------- ### Lodgify Scenario: Guest Availability Inquiry Example Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/LODGIFY_FRONT_DESK_SYSTEM_PROMPT.md Example workflow for handling a guest's availability inquiry, including property search, availability checks, and rate retrieval. ```bash lodgify_find_properties lodgify_get_property_availability lodgify_daily_rates lodgify_get_property ``` -------------------------------- ### Build Custom MCP Docker Image Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/MCP_DOCKER_SETUP.md Instructions to build a Docker image optimized for MCP communication using a specific Dockerfile. This custom image can then be referenced in the .mcp.json configuration. ```bash # Build the MCP-optimized image docker build -f Dockerfile.mcp -t lodgify-mcp:mcp . # Use in .mcp.json { "mcpServers": { "lodgify-mcp": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "LODGIFY_API_KEY=your_api_key_here", "lodgify-mcp:mcp" ] } } } ``` -------------------------------- ### MCP Client Configuration for Continue (VS Code Extension) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Provides the configuration structure for integrating the Lodgify MCP Server with the Continue VS Code extension, allowing for multiple MCP server definitions. ```json { "mcpServers": [ { "name": "lodgify", "command": "bunx", "args": ["-y", "@mikerob/lodgify-mcp"], "env": { "LODGIFY_API_KEY": "your_lodgify_api_key_here" } } ] } ``` -------------------------------- ### Example Lodgify API Calls (JSON) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/PRD.md Demonstrates how to call various Lodgify API tools using JSON payloads. These examples show the structure for listing properties, getting quotes with specific parameters, and creating booking payment links. ```json # List properties {"tool": "lodgify_list_properties", "arguments": {"page": 1, "size": 50}} # Get quote (illustrative; params depend on account setup) {"tool": "lodgify_get_quote", "arguments": { "propertyId": "12345", "params": { "from": "2025-11-20", "to": "2025-11-25", "roomTypes[0].Id": 999, "guest_breakdown[adults]": 2, "addOns[0].Id": 77 } }} # Create booking payment link {"tool": "lodgify_create_booking_payment_link", "arguments": { "id": "abc-123", "payload": {"amount": 50000, "currency": "USD"} }} ``` -------------------------------- ### Fix npm Permission Errors Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Commands to resolve npm permission errors by configuring the global npm prefix or using sudo for global installations. ```bash # Fix npm permissions npm config set prefix ~/.npm-global export PATH=~/.npm-global/bin:$PATH # Or use sudo (not recommended) sudo npm install -g @mikerob/lodgify-mcp ``` -------------------------------- ### Fix Docker Permission Issues Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Guidance on resolving Docker permission issues, including adding the user to the docker group on Linux or using sudo. ```bash # Add user to docker group (Linux) sudo usermod -aG docker $USER # Or use sudo sudo docker run -i -e LODGIFY_API_KEY="test" ghcr.io/mikerobgit/lodgify-mcp:latest ``` -------------------------------- ### Configure npm for Corporate Firewall Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Commands to configure npm settings for corporate firewalls, including setting the registry and proxy settings. ```bash # Configure npm registry npm config set registry https://registry.npmjs.org/ # Configure proxy if needed npm config set proxy http://proxy.company.com:8080 npm config set https-proxy http://proxy.company.com:8080 ``` -------------------------------- ### Core Development Commands (Bash) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Provides essential commands for running the development server with hot reload, building the project, starting the compiled server, and performing quality checks like testing, linting, and formatting. ```bash # Development bun dev # Run TypeScript directly with hot reload bun run build # Compile TypeScript to dist/ bun start # Run compiled server from dist/ # Quality Checks bun test # Run unit tests bun test --watch # Run tests in watch mode bun test --coverage # Run tests with coverage report bun run lint # Run ESLint bun run typecheck # Run TypeScript type checking bun run format # Format code with Prettier ``` -------------------------------- ### Build and Test with Bun Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Builds the project and runs the test suite using Bun. Prepares the project for publishing. ```shell bun run build bun test ``` -------------------------------- ### Troubleshoot Docker Container Startup in Bash Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/TROUBLESHOOTING.md Commands to diagnose why a Lodgify MCP Docker container might not be starting. Includes checking container logs, verifying environment variables, and accessing the container with a shell. ```bash # Check container logs docker logs lodgify-mcp # Verify environment variables docker run --rm lodgify-mcp:latest env # Test with shell access docker run -it --entrypoint sh lodgify-mcp:latest ``` -------------------------------- ### Connect Custom MCP Client with Stdio Transport Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Demonstrates how to create and connect a custom MCP client using the stdio transport with specific command arguments and environment variables. Requires @modelcontextprotocol/sdk. ```typescript import { Client } from '@modelcontextprotocol/sdk/client/index.js' import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js' const transport = new StdioClientTransport({ command: 'bunx', args: ['-y', '@mikerob/lodgify-mcp'], env: { LODGIFY_API_KEY: 'your_lodgify_api_key_here' } }) const client = new Client( { name: 'lodgify-client', version: '1.0.0' }, { capabilities: {} } ) await client.connect(transport) ``` -------------------------------- ### Configure Docker MCP Server with stdio Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/MCP_DOCKER_SETUP.md Configuration for running an MCP server within a Docker container using stdio communication. This includes specifying the Docker image, environment variables, and the command to run the server inside the container. ```json { "mcpServers": { "lodgify-docker": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "LODGIFY_API_KEY=your_api_key_here", "-e", "LOG_LEVEL=info", "ghcr.io/mikerobgit/lodgify-mcp:latest", "node", "dist/server.js" ] } } } ``` -------------------------------- ### Installation with Bunx - Lodgify MCP Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/README.md This JSON configuration demonstrates how to install and run the Lodgify MCP server using Bunx, a JavaScript runtime. It specifies the command to execute and environment variables required for authentication. ```json { "mcpServers": { "lodgify": { "command": "bunx", "args": ["-y", "@mikerob/lodgify-mcp"], "env": { "LODGIFY_API_KEY": "your_lodgify_api_key_here" } } } } ``` -------------------------------- ### Lodgify Environment Configuration Example Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/PRD.md An example `.env` file showing required environment variables for Lodgify API integration, including API key and logging level. It highlights that the Lodgify base URL is fixed and not configurable via environment variables. ```bash LODGIFY_API_KEY=your_api_key_here LOG_LEVEL=info DEBUG_HTTP=0 LODGIFY_READ_ONLY=1 ``` -------------------------------- ### Optional Environment Variables Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Details optional environment variables that can be configured to control logging, HTTP debugging, read-only mode, request timeouts, and retry attempts. ```env # Logging LOG_LEVEL="info" # Options: error | warn | info | debug DEBUG_HTTP="0" # Set to "1" for verbose HTTP debugging # Security LODGIFY_READ_ONLY="0" # Set to "1" to disable all write operations # Performance REQUEST_TIMEOUT="30000" # Request timeout in milliseconds RETRY_ATTEMPTS="5" # Maximum retry attempts for failed requests ``` -------------------------------- ### Required Environment Variables Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Lists the essential environment variable required for the Lodgify MCP Server to function, primarily the API key for authentication with the Lodgify service. ```env LODGIFY_API_KEY="your_lodgify_api_key_here" ``` -------------------------------- ### Docker Configuration for MCP Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Specifies how to configure the Lodgify MCP Server to run via Docker directly within the MCP configuration, including environment variables and image details. ```json { "mcpServers": { "lodgify": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "LODGIFY_API_KEY=your_api_key_here", "ghcr.io/mikerobgit/lodgify-mcp:latest" ] } } } ``` -------------------------------- ### Installation with NPX - Lodgify MCP Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/README.md This JSON configuration illustrates how to install and run the Lodgify MCP server using NPX, a package runner for Node.js. It includes the command and necessary environment variables for API key authentication. ```json { "mcpServers": { "lodgify": { "command": "npx", "args": ["-y", "@mikerob/lodgify-mcp"], "env": { "LODGIFY_API_KEY": "your_lodgify_api_key_here" } } } } ``` -------------------------------- ### MCP Server - Lodgify Integration Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/README.md Documentation for integrating the Lodgify MCP Server with AI assistants, covering installation, configuration, and HTTP server details. ```APIDOC ## Lodgify MCP Server Setup ### Description Instructions for setting up the Lodgify MCP Server to connect AI assistants with the Lodgify property management API. ### Installation with Bunx (Recommended) ```json { "mcpServers": { "lodgify": { "command": "bunx", "args": ["-y", "@mikerob/lodgify-mcp"], "env": { "LODGIFY_API_KEY": "your_lodgify_api_key_here" } } } } ``` ### Alternative with NPX ```json { "mcpServers": { "lodgify": { "command": "npx", "args": ["-y", "@mikerob/lodgify-mcp"], "env": { "LODGIFY_API_KEY": "your_lodgify_api_key_here" } } } } ``` ### Environment Configuration **Required Environment Variable:** ```env LODGIFY_API_KEY="your_lodgify_api_key_here" ``` **Optional Settings:** - `LODGIFY_READ_ONLY`: "1" (Prevent write operations) - `LOG_LEVEL`: "info" | "error" | "warn" | "debug" - `DEBUG_HTTP`: "0" or "1" (Verbose HTTP debugging) - `MCP_TOKEN`: "your_secret_token" (Required for HTTP mode) - `PORT`: "3000" (Optional HTTP port) ### HTTP Server (Streamable HTTP) Launches an Express server using Streamable HTTP transport. #### Command ```bash npm run start:http ``` #### Endpoint Details - **Method**: `POST` - **Endpoint**: `/mcp` - **Authentication**: `Authorization: Bearer ` header - **Port Configuration**: Use `PORT` environment variable (defaults to 3000). #### Docker Deployment 1. Build the Docker image: ```bash npm run docker:http:build ``` 2. Run the Docker container: ```bash docker run --rm \ -p 3000:3000 \ -e MCP_TOKEN=your_token \ -e LODGIFY_API_KEY=your_lodgify_api_key_here \ lodgify-mcp:http ``` ### API Key Rotation Safely rotate your `LODGIFY_API_KEY` by deploying the new key, verifying server health, and then revoking the old key. A two-step rollout is recommended for zero-downtime rotation. ``` -------------------------------- ### Common Validation Scenarios Examples Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/API_REFERENCE.md Illustrates common validation scenarios with example JSON responses, including LLM cutoff detection, past date warnings, and invalid date ranges. ```APIDOC ## Common Validation Scenarios This section provides examples of common validation feedback scenarios. ### LLM Cutoff Detection Example ```json { "dateValidation": { "feedback": { "message": "The date '2024-02-15' appears to be from a previous year (2024). Current year is 2025.", "severity": "warning", "detectedIssue": "llm_cutoff_suspected", "suggestions": [ "If you meant this year, use: 2025-02-15", "Current date: 2025-08-31" ] } } } ``` ### Past Date Warning Example ```json { "dateValidation": { "feedback": { "message": "The date '2025-08-01' is 30 days in the past. availability operations typically require future dates.", "severity": "warning", "detectedIssue": "date_in_past", "suggestions": [ "Did you mean a future date?", "Today's date: 2025-08-31" ] } } } ``` ### Invalid Date Range *Note: The specific JSON structure for invalid date range feedback is not provided in the input text but is mentioned as a scenario.* ``` -------------------------------- ### Publish to npm Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Publishes the project's package to the npm registry. Requires a successful build and test run. ```shell npm publish ``` -------------------------------- ### Format Code with Bun Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Applies code formatting rules to the project using the Bun runtime. Ensures a consistent and readable codebase. ```shell bun run format ``` -------------------------------- ### List Lodgify Properties Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/HOTEL_EMPLOYEE_ASSISTANT_SYSTEM_PROMPT.md Provides comprehensive listings of all properties, useful for getting an overview or a complete dataset. ```python def lodgify_list_properties(): """Get comprehensive property listings""" pass ``` -------------------------------- ### Development and Production Commands Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/GEMINI.md Provides essential commands for setting up the project, running it in development, building for production, and executing tests and linting. It highlights Bun's native TypeScript support for development. ```bash # Initial setup bun install cp .env.example .env # Configure LODGIFY_API_KEY # Development bun dev # Run TypeScript directly (Bun has built-in TS support) bun run build # Compile TypeScript to dist/ bun test # Run unit tests bun test --watch # Run tests in watch mode bun run lint # Run ESLint bun run typecheck # Run TypeScript type checking # Production bun start # Run compiled server from dist/ ``` -------------------------------- ### Example LLM Cutoff Detection Feedback (JSON) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DATE_VALIDATION.md An example JSON object representing feedback when an LLM cutoff date is suspected. It details the issue, provides suggestions for correction, and indicates that confirmation is required. ```json { "message": "The date '2024-09-15' appears to be from a previous year (2024). Current year is 2025.", "severity": "warning", "currentDate": "2025-08-31T15:30:00Z", "originalInput": "2024-09-15", "detectedIssue": "llm_cutoff_suspected", "suggestions": [ "If you meant this year, use: 2025-09-15", "If you meant the historical date 2024-09-15, please confirm", "Current date: 2025-08-31" ], "confirmationRequired": true, "feedbackStyle": "detailed" } ``` -------------------------------- ### Configure Bun for Corporate Firewall Proxy Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/INSTALLATION.md Environment variable settings for Bun to route traffic through corporate proxy servers. ```bash # Bun configuration export https_proxy=http://proxy.company.com:8080 export http_proxy=http://proxy.company.com:8080 ``` -------------------------------- ### Run Tests with Bun Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Executes the full test suite for the project using the Bun runtime. Ensures all tests pass before submitting changes. ```shell bun test ``` -------------------------------- ### Starting the HTTP Server with npm Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/README.md This command initiates the Lodgify MCP server as an Express-based HTTP server, utilizing Streamable HTTP for transport. It's the recommended method for exposing the server externally. ```bash npm run start:http ``` -------------------------------- ### Build and Run Server (Bash) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Commands to build the project's TypeScript code and run the server. Includes options for development mode with hot reloading. ```bash bun run build # or npm run build bun start # or npm start bun dev # or npm run dev ``` -------------------------------- ### Get Lodgify Property Availability Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/API_REFERENCE.md Retrieves the availability status for a specific property over a given date range. It directly queries the API for the most accurate availability information. Requires a property ID and optionally accepts start and end dates. ```python def lodgify_get_property_availability(propertyId: str, params: dict = None): """Get availability for a specific property over a period.""" pass ``` -------------------------------- ### Testing Commands (Bash) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Details various ways to execute tests, including running all tests, generating coverage reports, using watch mode for continuous testing, running specific files, and debugging tests. ```bash # Run all tests bun test # Run with coverage bun test --coverage # Watch mode for development bun test --watch # Run specific test file bun test src/core/http/http-client.test.ts # Debug tests bun test --inspect-brk ``` -------------------------------- ### API Response Format with Date Validation (JSON) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DATE_VALIDATION.md This JSON structure illustrates a typical API response that includes date validation feedback. It shows the standard 'data' field alongside a 'dateValidation' object containing details about validated start and end dates and any associated feedback messages. ```json { "data": { // Normal API response data }, "dateValidation": { "startDate": { "original": "2024-09-15", "validated": "2024-09-15", "feedback": { "message": "Date appears to be from training cutoff year", "severity": "warning", "suggestions": ["Consider using 2025-09-15 if you meant this year"] } }, "message": "⚠️ Date validation feedback available" } } ``` -------------------------------- ### Troubleshoot Lodgify MCP Build and Test in Node.js/Bun Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/TROUBLESHOOTING.md Commands for troubleshooting development issues with the Lodgify MCP project using Node.js package manager (npm) and Bun. Covers cleaning builds, running type checks, executing tests with verbose output, and checking coverage. ```bash # Clean build rm -rf dist/ node_modules/ npm install npm run build # Check TypeScript errors npm run typecheck # Run tests with verbose output bun test --verbose # Run specific test bun test lodgify.test.ts # Check test coverage bun test --coverage ``` -------------------------------- ### Lodgify Client Method for API Request (TypeScript) Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Defines a client method 'myMethod' for making GET requests to a Lodgify API endpoint. It constructs the URL using a base URL and resource ID, flattens query parameters, and uses an HTTP client to send the request. It returns a Promise resolving to the API response. ```typescript async myMethod(params: MyParams): Promise { const url = `${this.baseUrl}/v2/my-endpoint/${params.id}` const queryParams = this.flattenQueryParams(params.query || {}) return this.httpClient.get(url, { params: queryParams }) } ``` -------------------------------- ### Validation Error Example Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/ERROR_HANDLING.md An example of a validation error response, illustrating how specific input validation failures are reported. ```APIDOC ## Validation Error Examples Input validation provides clear, actionable error messages: ```json { "code": -32602, "message": "Invalid parameters", "data": { "validationErrors": [ "Property ID must be a non-empty string", "Check-in date must be in YYYY-MM-DD format", "Check-out date must be after check-in date" ] } } ``` ``` -------------------------------- ### Enhanced Error Context Example Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/ERROR_HANDLING.md An example of an error response that includes enhanced context for debugging, such as the original Lodgify error details and the request path. ```APIDOC ## Enhanced Error Context Errors include full context for debugging: ```json { "code": -32603, "message": "API Error: Lodgify 404: Property not found", "data": { "status": 404, "path": "/v2/properties/invalid-id", "method": "GET", "lodgifyError": { "code": "PROPERTY_NOT_FOUND", "message": "The specified property does not exist" } } } ``` ``` -------------------------------- ### Lodgify Guest Availability Inquiry Workflow Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/LODGIFY_FRONT_DESK_SYSTEM_PROMPT.md Steps to check property availability, rates, and details for guest inquiries using Lodgify commands. ```bash lodgify_find_properties lodgify_get_property_availability lodgify_daily_rates lodgify_get_property lodgify_list_property_rooms lodgify_create_booking_quote ``` -------------------------------- ### Interacting with Lodgify via Natural Language Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/README.md Examples of natural language queries that can be made to the Lodgify MCP Server for property management, availability, bookings, and pricing. ```APIDOC ## Natural Language Queries for Lodgify ### Description Examples of how to query the Lodgify MCP Server using natural language for various property management tasks. ### Property Management - "Show me all my properties" - "Get details about Ocean View Villa" - "What room types are available in my beach house?" ### Availability & Bookings - "When is the Beach House next available?" - "Show me all bookings for November" - "Is property 123 available December 20-27?" - "Get details for booking BK-2024-001" ### Rates & Pricing - "What are the daily rates for Ocean View Villa in December?" - "Get a quote for 4 adults from Dec 20-27" - "Show me current rate settings for property 123" ### Management Tasks - "Create a payment link for the Smith booking" - "Update key codes for reservation BK001" - "Show me a calendar view of availability for next month" ``` -------------------------------- ### Get Property Availability API Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/TOOL_CATALOG.md Get availability for a specific property over a period. This is the most accurate availability checker that directly queries the property's availability status from the API. Use this for checking before booking or blocking dates. ```APIDOC ## GET /api/properties/{propertyId}/availability ### Description Get availability for a specific property over a period. This is the most accurate availability checker that directly queries the property's availability status from the API. Use this for checking before booking or blocking dates. ### Method GET ### Endpoint /api/properties/{propertyId}/availability ### Parameters #### Path Parameters - **propertyId** (string) - Required - Property ID #### Query Parameters - **from** (string) - Optional - Start date (accepts YYYY-MM-DD or ISO 8601 date-time) - **to** (string) - Optional - End date (accepts YYYY-MM-DD or ISO 8601 date-time) Note: When ISO 8601 date-time values are provided for `from`/`to`, the server normalizes them to `YYYY-MM-DD` for validation and request processing. ### Request Example ```json { "propertyId": "123", "params": { "from": "2024-03-01", "to": "2024-03-31" } } ``` ``` -------------------------------- ### Check Linting with Bun Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/DEVELOPMENT.md Runs the linter to check for code style and potential errors using the Bun runtime. Helps maintain code quality and consistency. ```shell bun run lint ``` -------------------------------- ### Lodgify API Error Model Example Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/PRD.md An example JSON structure for API errors returned by Lodgify. It includes fields for error status, a descriptive message, the HTTP status code, the request path, and a placeholder for detailed error information. ```json { "error": true, "message": "Lodgify GET /v2/properties -> 401 Unauthorized", "status": 401, "path": "/v2/properties", "detail": { /* pass-through Lodgify error JSON if available */ } } ``` -------------------------------- ### Best Practices for API Usage Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/API_REFERENCE.md Provides recommendations for efficient interaction with the Lodgify API, covering property discovery, booking management, and data fetching. ```APIDOC ## Best Practices Follow these best practices for efficient and effective use of the Lodgify API. ### Efficient Property Discovery 1. **Use `lodgify_find_properties`**: Utilize this method when you do not have specific property IDs. 2. **Cache Property Details**: Store property details locally to avoid redundant API calls. 3. **Refine Search Terms**: Employ specific search criteria to narrow down results and improve query performance. ### Booking Management 1. **Check Availability First**: Always verify property availability before attempting to create a booking. 2. **Use Read-Only Mode**: During development, enable read-only mode to prevent accidental modifications to live data. 3. **Filter Bookings**: Apply filters for status and date ranges when retrieving bookings to minimize response payload size. ``` -------------------------------- ### Lodgify Booking Creation and Management Workflow Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/LODGIFY_FRONT_DESK_SYSTEM_PROMPT.md Commands for creating bookings, processing payments, and managing booking details including access codes. ```bash lodgify_daily_rates lodgify_create_booking lodgify_create_booking_payment_link lodgify_get_booking lodgify_update_key_codes ``` -------------------------------- ### Run Lodgify MCP Server from Distribution Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/GEMINI.md Illustrates the command to execute the Lodgify MCP server directly from its compiled distribution files, typically used after a build process. ```bash node dist/server.js ``` -------------------------------- ### lodgify_get_booking Source: https://github.com/mikerobgit/lodgify-mcp/blob/main/docs/TOOL_CATALOG.md Get detailed information about a specific booking. ```APIDOC ## GET lodgify_get_booking ### Description Get detailed information about a specific booking. ### Method GET ### Endpoint /lodgify/bookings/{id} ### Parameters #### Path Parameters - **id** (string) - Required - Unique booking/reservation ID to retrieve ### Request Example ```json { "id": "BK001" } ``` ### Response #### Success Response (200) - **bookingDetails** (object) - Detailed information about the booking. #### Response Example ```json { "bookingDetails": { "id": "BK001", "guestName": "John Doe", "checkInDate": "2024-04-10" } } ``` ```