mcp-server-hotelplanet
v1.0.0
Published
MCP Server for HotelPlanet booking operations - AI agent integration for n8n
Maintainers
Readme
HotelPlanet MCP Server
This is a Model Context Protocol (MCP) server that exposes HotelPlanet API operations as AI agent tools. It can be used with n8n's MCP Client node to make your hotel booking operations available to the AI agent.
What is MCP?
Model Context Protocol (MCP) is a standard for AI agents to interact with external tools and data sources. By creating an MCP server, you can make your HotelPlanet API available as tools that AI agents can discover and use.
Installation
1. Install Dependencies
npm install2. Build the Server
npm run build3. Install Globally (Optional)
npm install -g .Usage with n8n
Step 1: Enable AI Agent Tool Usage
Set the environment variable in your n8n instance:
export N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=trueStep 2: Install MCP Client Node
Install the n8n MCP Client node:
npm install -g n8n-nodes-mcpStep 3: Configure MCP Client
In your n8n workflow:
- Add MCP Client node
- Configure the server:
{ "command": "node", "args": ["/path/to/mcp-server-hotelplanet/dist/index.js"], "env": { "HOTELPLANET_API_URL": "http://localhost:3000" } }
Step 4: Use with AI Agent
Now your HotelPlanet tools will be available to n8n's AI agent!
Available Tools
The MCP server exposes these tools:
Hotel Search
get_hotels_by_location- Search by country/city with filterssearch_hotels- Search by query string
Hotel Information
get_hotel_details- Get detailed hotel information
Booking Operations
check_hotel_availability- Check availability for dates/guestsbook_hotel- Book rooms with guest information
Booking Management
get_booking_details- Get specific booking informationcancel_booking- Cancel existing bookingsget_user_bookings- Get all bookings for a user
Example AI Prompts
With this MCP server, the AI agent can now handle requests like:
- "Find hotels in New York with 4+ star rating under $200/night"
- "Check if the Grand Hotel has availability for 2 guests from Jan 15-18"
- "Book a room at hotel-123 for John Doe from Jan 15-18"
- "Show me all bookings for [email protected]"
- "Cancel booking ABC123"
Configuration
Environment Variables
HOTELPLANET_API_URL- Base URL of your HotelPlanet API (default: http://localhost:3000)
API Requirements
Your HotelPlanet API must be running and accessible at the configured URL.
Development
Build
npm run buildWatch Mode
npm run devTest
npm startTroubleshooting
MCP Server Not Starting
- Check that all dependencies are installed
- Verify TypeScript compilation succeeded
- Ensure the HotelPlanet API is running
AI Agent Not Finding Tools
- Verify
N8N_COMMUNITY_PACKAGES_ALLOW_TOOL_USAGE=trueis set - Check MCP Client node configuration
- Restart n8n after configuration changes
API Connection Issues
- Verify
HOTELPLANET_API_URLis correct - Check that your HotelPlanet API is running
- Test API endpoints manually
Integration with Your HotelPlanet Node
This MCP server works alongside your existing HotelPlanet n8n node:
- Manual workflows: Use your HotelPlanet node
- AI agent workflows: Use MCP Client node with this server
- Both approaches: Use the same underlying API
Benefits
- AI Agent Integration: Your hotel operations are now available to AI agents
- Standard Protocol: Uses the official MCP standard
- Flexible: Can be used with any MCP-compatible AI system
- Maintainable: Clean separation between API and AI integration
Next Steps
- Deploy your HotelPlanet API to production
- Update the MCP server with production API URL
- Test AI agent integration in n8n
- Create AI-powered workflows for hotel booking automation
Your HotelPlanet operations are now AI agent ready! 🏨✨
