LT

liteapi-travel/mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

4 stars 5 forks 品質 71 トレンド 32

MCP server for LiteAPI using Next.js and mcp-handler (Streamable HTTP). Deploys to Vercel.

概要

MCP server for LiteAPI using Next.js and mcp-handler (Streamable HTTP). Deploys to Vercel. MCP endpoint: http://localhost:3000/api/mcp Send the key on the X-API-Key header. The URL stays free of the secret: ?apiKey= on the URL and Authorization: Bearer still work. Header wins if more than one is set. For the local stdio server, set LITEAPI_API_KEY instead. There is no HTTP header on stdio. With no key, sample calls use the shared sandbox key sand_ca230deb-5a6b-42e7-bb72-869facd8892b. That key only hits sandbox. Send X-API-Key to use your own key. list_endpoints, describe_endpoint, search_docs, and fetch_docs_page stay available either way. OAuth is the path for Lovable, Claude, ChatGPT, and Cursor. The client uses this URL and leaves the client id empty. The browser approves the connection on the Nuitée Connect dashboard session. The resolve secret is built in and matches the dashboard API. Set MCP_OAUTH_SERVICE_TOKEN on both hosts only to replace that default.

README

以下は原文 README の抜粋です。原文を見る。

LiteAPI MCP Server

MCP server for LiteAPI using Next.js and mcp-handler (Streamable HTTP). Deploys to Vercel.

Quick Start

npm install
npm run dev

MCP endpoint: http://localhost:3000/api/mcp

ChatGPT Setup

Send the key on the X-API-Key header. The URL stays free of the secret:

{
  "mcpServers": {
    "liteapi": {
      "url": "https://mcp.liteapi.travel/api/mcp",
      "headers": {
        "X-API-Key": "YOUR_LITEAPI_KEY"
      }
    }
  }
}

?apiKey= on the URL and Authorization: Bearer still work. Header wins if more than one is set.

For the local stdio server, set LITEAPI_API_KEY instead. There is no HTTP header on stdio.

With no key, sample calls use the shared sandbox key sand_ca230deb-5a6b-42e7-bb72-869facd8892b. That key only hits sandbox. Send X-API-Key to use your own key. list_endpoints, describe_endpoint, search_docs, and fetch_docs_page stay available either way.

OAuth is the path for Lovable, Claude, ChatGPT, and Cursor. The client uses this URL and leaves the client id empty. The browser approves the connection on the Nuitée Connect dashboard session. The resolve secret is built in and matches the dashboard API. Set MCP_OAUTH_SERVICE_TOKEN on both hosts only to replace that default. DASHBOARD_API_URL defaults to https://da.liteapi.travel.

https://mcp.liteapi.travel/api/mcp

Features

  • 🔄 Dynamic Tool Generation: Automatically generates MCP tools from OpenAPI specs
  • 📚 Multiple API Modules: Supports Search, Booking, Vouchers, Analytics, Static, Loyalty, and Supply Customization APIs
  • 🔐 API key optional: no key runs sample calls on the shared sandbox key. X-API-Key, ?apiKey=, or Authorization: Bearer uses the caller’s key.
  • 🎯 Type-Safe: Uses Zod for schema validation and type safety
  • 🚀 Easy Integration: Works with Claude Desktop and other MCP-compatible clients

Prerequisites

  • Node.js 18+
  • npm or yarn
  • LiteAPI API key, only if this process should execute live API calls

Installation

  1. Clone the repository and install dependencies:
npm install
  1. Build the TypeScript code:
npm run build
  1. Set your LiteAPI API key as an environment variable:
export LITEAPI_API_KEY=your_api_key_here

Usage

Running the Server

The server runs on stdio (standard input/output) for MCP communication:

npm start

Or for development with auto-reload:

npm run dev

Testing

Quick Test

Test that the server works correctly:

export LITEAPI_API_KEY=your_api_key_here
npm test

This will connect to the server and list all available tools.

MCP Inspector is a browser-based tool for testing and debugging MCP servers. It’s perfect for inspecting tools, testing calls, and debugging without needing Claude Desktop.

  1. Install and run MCP Inspector:
GitHub で README 全文を見る

インストール

npx @modelcontextprotocol/inspector node dist/index.js
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "liteapi": { "url": "https://mcp.liteapi.travel/api/mcp", "headers": { "X-API-Key": "YOUR_LITEAPI_KEY" } } } }