
使用Next.js和mcp-handler(Streamable HTTP)为LiteAPI提供的MCP服务器. 部署到韦尔塞尔.
概览
使用Next.js和mcp-handler(Streamable HTTP)为LiteAPI提供的MCP服务器. 部署到韦尔塞尔 MCP 端点 : http://localhost:3000/api/mcp 发送X-API-Key标题上的密钥. URL没有隐藏秘密 : apiKey=在URL和授权上: Bearer仍然工作. 如果设定了一个以上, 则标题获胜 。 对于本地stdio服务器,设置LITEAPI API KEY代替. Stdio上没有 HTTP 标题 。 在没有键的情况下,抽样呼叫使用共享的沙盒键相接砂 ca230deb-5a6b-42e7-bb72-869facd8892b. 钥匙只撞到沙盒 发送 X-API-Key 使用自己的密钥. 列表后端点、描述后端点、搜索后端点和获取后端点。 OAuth是Lovable,Claude,ChatGPT,和Cursor的路径. 客户端使用此 URL 并留下客户端 ID 空. 浏览器批准在"纽伊特"连接仪表板会话中的连接. 解析密被构建在内并匹配仪表盘 API. 在两个主机上设置 MCP OOTITH SERVICE TOKEN 仅用于替换默认值 .
概述(AI 翻译)
使用Next.js和mcp-handler(Streamable HTTP)为LiteAPI提供的MCP服务器. 部署到韦尔塞尔
□ 快开始
MCP 端点 :
- 完整(文件+活的API工具):
http://localhost:3000/api/mcp - 只有知识(文件+目录+仪表板-kb,无活API呼叫):
http://localhost:3000/api/knowledge
□ ChatGPT 设置
在 X-API-Key 标题上发送密钥 。 URL没有隐藏秘密 :
[T3]在URL和Authorization: Bearer上仍然有效. 如果设定了一个以上, 则标题获胜 。
对于本地 stdio 服务器,设置 [[T5] 取而代之. Stdio上没有 HTTP 标题 。
由于没有密钥,抽样呼叫使用共享的沙盒密钥sand_ca230deb-5a6b-42e7-bb72-869facd8892b. 钥匙只撞到沙盒 发送 [[T7] 以使用自己的密钥。 发现工具以两种方式保留:[[T8]、[T9]、[T10]、[T11]、[T12]、[[T13]、[T14]]。 Dashboard-kb工具调用DASHBOARD_API_URL (默认 [T16]),用于公共连接产品指南.
- 仅限知识的MCP
应读作docs但不能调用预订/搜索API的代理人应当使用:
本页由 AI 翻译,技术细节请以原文为准。
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 endpoints:
- Full (docs + live API tools):
http://localhost:3000/api/mcp - Knowledge only (docs + catalog + dashboard-kb, no live API calls):
http://localhost:3000/api/knowledge
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. Discovery tools stay available either way: list_endpoints, describe_endpoint, search_docs, fetch_docs_page, fetch_documentation, search_dashboard_kb, fetch_dashboard_feature. Dashboard-kb tools call DASHBOARD_API_URL (default https://da.liteapi.travel) for public Connect product guides.
Knowledge-only MCP
Agents that should read docs but not call booking/search APIs should use:
https://mcp.liteapi.travel/api/knowledge
That surface registers the seven discovery/docs/KB tools only — no per-endpoint execute tools. No API key required. Slack Connect bot stays on Ask Connect’s in-process tools (same intent; it does not HTTP to this URL).
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=, orAuthorization: Beareruses 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
- Clone the repository and install dependencies:
npm install
- Build the TypeScript code:
npm run build
- Set your LiteAPI API key as an environment variable:
安装
npx @modelcontextprotocol/inspector node dist/index.js配置
{
"mcpServers": {
"liteapi": {
"url": "https://mcp.liteapi.travel/api/mcp",
"headers": {
"X-API-Key": "YOUR_LITEAPI_KEY"
}
}
}
}