@quicktext/booking-engine
v1.0.7
Published
A flexible MCP server for booking engines that supports multiple transport types: Streamable HTTP, Server-Sent Events (SSE), and Standard I/O (stdio).
Readme
Booking Engine MCP Server
A flexible MCP server for booking engines that supports multiple transport types: Streamable HTTP, Server-Sent Events (SSE), and Standard I/O (stdio).
Features
- Support for three transport types:
- Streamable HTTP
- Server-Sent Events (SSE)
- Standard I/O (stdio)
- Environment-based configuration
- Session management for persistent connections
- Booking engine availability tool
Project Structure
be-mcp-server/
├── build/ # Compiled JavaScript files
├── src/
│ ├── server.ts # Main server implementation
│ └── stdio.ts # Standard I/O implementation
├── .env.example # Example environment variables
├── mcp-config.json # MCP server configuration
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # This documentationTransport Types Overview
| Transport Type | Description | Use Case | Port (Default) | | ------------------------ | --------------------------------------------------- | --------------------------------------- | -------------- | | HTTP/Streamable HTTP | Standard HTTP transport with streaming capabilities | Web applications, REST clients | 3000 | | SSE (Server-Sent Events) | Event-based streaming over HTTP | Real-time updates, event streaming | 3500 | | stdio | Standard input/output communication | CLI tools, direct process communication | N/A |
Quick Start Guide
Step 1: Installation
Prerequisites:
- Node.js v18+ and npm
- A
.envfile with your configuration (see.env.example)
Setup:
# 1. Clone the repository
git clone ssh://[email protected]/bes/be-mcp-server.git
cd be-mcp-server
# 2. Install dependencies
npm install
# 3. Build the project
npm run buildStep 2: Running the Server
You can run the server in different modes based on your needs:
Option A: HTTP Transport
# Start the server on port 3000
PORT=3000 npm start
# Or directly with node
PORT=3000 node build/server.jsOption B: SSE Transport
# Start the server on port 3500
PORT=3500 npm start
# Or directly with node
PORT=3500 node build/server.jsOption C: stdio Transport
RUN @modelcontextprotocol/inspector
Step 3: Testing the Server
You can test your server using the MCP Inspector tool:
# Navigate to your project directory
cd be-mcp-server
# Run the MCP Inspector
npx @modelcontextprotocol/inspector click on the link to open th inspector
Open inspector with token pre-filled:
http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=a0bb24c11d8cbef6a71b1c10ed6e1ded45cb205ffa55588de7381b696388ee9a
and chose the transport type u want to test with and click connect then you can see the tool in the inspectorFor stdio transport testing, you'll need to specify the Node.js path:
# Find your Node.js path
which node
# Example output: /usr/bin/node
# Test with the inspector
npx @modelcontextprotocol/inspector /path/to/node build/stdio.jsStep 4: Client Configuration
You can configure various MCP clients to connect to your server:
Claude Desktop Configuration
To use with Claude Desktop, add this to your claude_desktop_config.json:
{
"mcpServers": {
"booking-engine-mcp-stdio": {
"command": "/path/to/node(using which node)",
"args": ["/path/to/build/stdio.js"],
"env": {
"BOOKING_ENGINE_URL": "https://booking-engine.quicktext.local"
}
}
}
}Note: Replace
/path/to/build/stdio.jswith the actual path. You can find your Node.js path usingwhich node.
Using Direct URL Connection
For HTTP connections through mcp-remote:
{
"mcpServers": {
"booking-engine-mcp": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3500/mcp", "--allow-http"]
}
}
}For SSE connections through mcp-remote:
{
"mcpServers": {
"booking-engine-mcp": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:3500/sse", "--allow-http"]
}
}
}Environment Variables
Create a .env file based on .env.example:
PORT=3500 # Server port (default: 3002)
BOOKING_ENGINE_URL=https://your-api.com # API endpoint for booking engineAvailable Tools
This MCP server provides the following tools:
get-availability: Get availability information from booking engines- Parameters: checkIn, nights, rooms, adults, children, babies, teens, promoCode, locale, teamID, clientID
