meituan-travel
Enables natural-language travel search for hotels, flights, trains, and attractions, with optional city context for travel planning.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@meituan-travel北京出发,国庆去成都5天,预算5000,推荐酒店和景点"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
✈️ Meituan Travel MCP Server
Travel search for AI agents, powered by Fliggy FlyAI — right inside Claude Desktop, Cursor, and any MCP-compatible client.
Search hotels, flights, trains, attractions with natural language. No browser tabs. Just ask.
Homepage · Quick Start · Configuration · Tools · Examples
🤔 Why this project?
Planning a trip inside an AI conversation used to mean switching back and forth between your agent and a dozen travel websites — comparing hotels, checking flights, looking up train schedules, and pasting results back by hand.
This MCP server brings Fliggy FlyAI — Alibaba's official travel AI search — directly into your agent's toolbox. Ask a question, get an answer, without ever leaving the terminal.
Natural language in, structured results out — describe your trip in plain Chinese or English; the server returns clean, readable results.
Direct to official FlyAI, no third-party proxy — every query calls the official
@fly-ai/flyai-climaintained by Alibaba Fliggy.stdio MCP server, cross-platform — runs on Windows, Linux, and macOS; works with Claude Desktop, Cursor, and any MCP-compatible client.
Debuggable by default — set
MEITUAN_TRAVEL_DEBUG=0to silence logs, or leave it on to trace every CLI call.
Related MCP server: China Travel MCP
📋 Requirements
Dependency | Version | Why |
Python | 3.10+ | Runs the MCP server ( |
Node.js | ≥ 18 | Executes the FlyAI CLI ( |
npm | bundled with Node | Installs the FlyAI CLI package |
FLYAI_API_KEY | — | Your API key from Fliggy FlyAI Open Platform |
Note: This project is open-source server software. The actual travel search capability depends on the Fliggy FlyAI service and your own API key — the repository does not bundle any credentials.
🚀 Quick Start
Step 1 — Install Python dependencies
pip install -r requirements.txtStep 2 — Install the FlyAI CLI
Important: The server resolves
node_modulesrelative tosrc/, so you must runnpm installinside thesrcdirectory.
cd src
npm install @fly-ai/flyai-cli
cd ..This creates src/node_modules/@fly-ai/flyai-cli/, which server.py locates automatically.
Step 3 — Set your API key
Get your key from the Fliggy FlyAI Open Platform console (log in → click avatar → obtain interface key).
Windows (cmd / PowerShell):
set FLYAI_API_KEY=your_api_key_hereLinux / macOS:
export FLYAI_API_KEY=your_api_key_hereStep 4 — Verify the server starts
python src/__main__.pyThe server starts in stdio mode and waits for MCP client connections. No output means it's running correctly (debug logs go to stderr and src/meituan-travel-debug.log by default).
To disable debug logging:
# Windows
set MEITUAN_TRAVEL_DEBUG=0
# Linux / macOS
export MEITUAN_TRAVEL_DEBUG=0🔧 Tools
Tool | Purpose | Required Params |
| Travel search with city context — hotels, attractions, flights, trains, and mixed itineraries. Combines |
|
| Direct FlyAI |
|
Example prompts
"北京出发,国庆去成都 5 天,预算 5000,推荐酒店和景点"
"上海到东京的机票,10 月 1 日出发,10 月 7 日返回"
"杭州周末两日游,带老人小孩,不要太累"
"Find me a boutique hotel in Bangkok near the river, under $150/night"
⚙️ How It Works
┌──────────────┐ stdio ┌──────────────────────┐
│ MCP Client │ ◄────────────► │ python src/__main__ │
│ (Claude/Cursor│ │ .py (FastMCP) │
└──────┬───────┘ └──────────┬───────────┘
│ │
│ tool call │ subprocess
▼ ▼
┌──────────────┐ node ┌──────────────────────┐
│ Agent asks │ ─────────────► │ @fly-ai/flyai-cli │
│ in natural │ │ (official Fliggy) │
│ language │ └──────────┬───────────┘
└──────────────┘ │
│ HTTPS
▼
┌──────────────────────┐
│ Fliggy FlyAI API │
│ flyai.open.fliggy. │
│ com │
└──────────┬───────────┘
│
▼ JSON
┌──────────────────────┐
│ Results rendered to │
│ the agent │
└──────────────────────┘Your MCP client spawns
python src/__main__.pyas a stdio subprocess.__main__.pybootstraps the path (offline bundle or source mode) and importsserver.main.server.pycreates aFastMCP("meituan-travel")instance and registers two tools.When a tool is called, the server resolves the FlyAI CLI entry from
src/node_modules/@fly-ai/flyai-cli.It spawns
node <cli> ai-search --query "..."withFLYAI_API_KEYin the environment.The CLI returns JSON; the server parses, renders, and sends the result back through MCP.
🔌 MCP Client Configuration
Claude Desktop
Edit claude_desktop_config.json (on Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"meituan-travel": {
"command": "python",
"args": ["C:\\absolute\\path\\to\\meituan-travel-mcp\\src\\__main__.py"],
"env": {
"FLYAI_API_KEY": "your_api_key_here"
}
}
}
}Replace
C:\\absolute\\path\\to\\meituan-travel-mcpwith the actual full path to this repository on your machine. Use double backslashes in JSON.
Cursor
Create or edit .cursor/mcp.json in your project root:
{
"mcpServers": {
"meituan-travel": {
"command": "python",
"args": ["C:\\absolute\\path\\to\\meituan-travel-mcp\\src\\__main__.py"],
"env": {
"FLYAI_API_KEY": "your_api_key_here"
}
}
}
}Generic MCP Client
Any MCP-compatible client that supports stdio servers can use this configuration:
{
"mcpServers": {
"meituan-travel": {
"command": "python",
"args": ["/absolute/path/to/meituan-travel-mcp/src/__main__.py"],
"env": {
"FLYAI_API_KEY": "your_api_key_here"
}
}
}
}On Linux/macOS, use forward-slash absolute paths. On Windows, use double-backslash escaped paths in JSON.
📝 Examples
Asking about hotels
"我在杭州,想住西湖附近的精品酒店,预算 800 元以内,两晚"
The agent calls meituan_travel_query(city="杭州", query="想住西湖附近的精品酒店,预算 800 元以内,两晚") and returns hotel recommendations with prices and locations.
Multi-city itinerary
"帮我规划一个成都-重庆-西安的 7 天行程,含交通和住宿建议"
The agent calls flyai_ai_search(query="成都-重庆-西安 7 天行程,含交通和住宿建议") and gets a structured itinerary covering transport options, hotel suggestions, and attraction highlights.
🐛 Troubleshooting
未配置 FLYAI_API_KEY。请在环境变量 FLYAI_API_KEY 中填写飞猪 AI 开放平台 API Key。
The FLYAI_API_KEY environment variable is not set. Follow Step 3 above. On Windows, remember that set only affects the current terminal session — if you launch your MCP client from a different terminal or GUI, set the variable system-wide or in the client's env config.
未找到 Node.js;FlyAI CLI 要求 Node.js >= 18。
Node.js is not in your PATH. Install Node.js ≥ 18 and ensure node --version works in your terminal. If Node is installed but not found, you can set FLYAI_NODE to the absolute path of the Node executable:
set FLYAI_NODE=C:\Program Files\nodejs\node.exe包内缺少 @fly-ai/flyai-cli/package.json
The FlyAI CLI is not installed, or it was installed in the wrong directory. Make sure you ran npm install @fly-ai/flyai-cli inside the src/ directory (see Step 2). The server looks for src/node_modules/@fly-ai/flyai-cli/ specifically.
Server exits immediately with 启动失败
When running from source (not an offline bundle), __main__.py no longer requires a site-packages/<platform> directory — it falls back to using your system Python environment. If you still see this error, ensure pip install -r requirements.txt completed successfully and that python -c "import mcp" works.
Debug logs are too noisy
Set MEITUAN_TRAVEL_DEBUG=0 to disable debug output to stderr and the log file.
📄 License
This project is licensed under the MIT License.
🙏 Acknowledgements
Built with the official Model Context Protocol Python SDK (
mcp.server.fastmcp.FastMCP).Travel search powered by Fliggy FlyAI and the official
@fly-ai/flyai-clipackage.README style inspired by alibaba-flyai/flyai-skill.
This server cannot be deployed
Maintenance
Related MCP Connectors
TravelMind: 8 MCP tools for travel (12306 trains, flights, hotels, geocode, planning, policy).
Travel tools for AI agents: plan and edit real trips, search stays and tours, import travel videos.
AI marketplace — flights, tours, activities, transport & more via MCP. No auth required.
Flight search MCP server providing search, pagination, and itinerary details for AI assistants.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to query flight routes, real-time flight tracking, weather, and transfer flights via standardized MCP tools.10MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI assistants with comprehensive China inbound travel capabilities, including hotel and flight search, attraction discovery, itinerary planning, and travel tips.MIT
- FlicenseNot gradedqualityCmaintenanceEnables travel-related queries and planning including weather, train and flight information, itinerary generation, and travel knowledge retrieval via RAG, using an AI agent with MCP protocol.-
- FlicenseNot gradedqualityAmaintenanceProvides real travel search for AI assistants, enabling flight, hotel, car rental, and ground transportation searches through a single MCP tool, with no API keys required.81-