Skip to main content
Glama
KatouMegumii

vac-product-recommend-mcp

by KatouMegumii

vac-product-recommend-mcp

Local stdio MCP server: searches products for group trips in the Ctrip lists "Избранные/Общие" according to requirements and recommends TopN based on the useful score, sales, price, etc., returning a unified Markdown table (with links to the web/mobile versions).

Implemented purely using Python's standard library, no third-party dependencies, runs on Python 3.10+.

Tools

Tool

Purpose

recommend_tours

By keyword + multiple filters, returns TopN products with good sales and reviews

search_tours

Searches the list and returns Markdown table

get_filter_options

Gets currently available filters and their values, for mapping

get_departure_cities

Gets Ctrip departure city ID by city name/pinyin (only when needed)

Related MCP server: 12306 Train Ticket Search MCP Server

Getting values for the filter

When you need to map the user request to specific filter values, first call get_filter_options:

{ "keyword": "川西" }

Return each option group and its possible values from fastFilters, the Agent can choose based on that and pass it to search_tours/recommend_tours.

get_departure_cities is only used if the user mentions a departure city and you need the ID; otherwise the default depart_city_id is used.

Just install uv first:

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows PowerShell
irm https://astral.sh/uv/install.ps1 | iex

Then install via the git link:

uv tool install git+https://github.com/KatouMegumii/vac-product-recommend-mcp

Or you can directly run the installation script in the repository:

./scripts/install.sh
# Windows: powershell -File scripts/install.ps1

uv will automatically download Python and dependencies on first run; the target machine does not need Python preinstalled.

Update

For installed users, update in the way you installed:

# 用 uv tool 安装的
uv tool upgrade vac-product-recommend-mcp
# 如果上面没拉到最新,强制重装:
uv tool install --force git+https://github.com/KatouMegumii/vac-product-recommend-mcp

# 克隆仓库 + pip install -e . 安装的
cd vac-product-recommend-mcp && git pull

If the client config uses uvx --from git+..., first clear the cache and then restart the MCP client:

uv cache clean

After updating, you need to restart/re-connect MCP for new tools and instructions to take effect.

If the installation/update is done by the Agent, you must:

  1. Strictly check this readme's "Important: have the Agent strictly keep the output format" and "Specific: every inquiry is fully independent" limitations for changes;

  2. Sync the latest limitations into the Agent's personalization / memory / Rules / system prompt;

  3. After restarting/reconnecting MCP, confirm the tool list has been updated.

Client config

With Claude Desktop as example, edit claude_desktop_config.json:

{
  "mcpServers": {
    "vac-product-recommend": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/KatouMegumii/vac-product-recommend-mcp",
        "vac-product-recommend-mcp"
      ],
      "env": {
        "CTRIP_COOKIE": "",
        "CTRIP_GUID": ""
      }
    }
  }
}

config_examples/ contains example config configurations for Claude Desktop / Cursor / Cline.

Environment variables:

Variable

Required

Description

CTRIP_COOKIE

no

Full cookie string copied from the browser, can also work without (may trigger risk control)

CTRIP_GUID

no

Can be left empty; if empty uses built-in default

CTRIP_W_PAYLOAD_SOURCE

no

Risk control signature, not required by current API

CTRIP_X_CTX_WCLIENT_REQ

no

Rotation token, not required by current API

Main parameters

recommend_tours / search_tours

Parameter

Description

keyword

Destination/theme, e.g. "Turkey", "广西"

depart_city_id

The department departure city ID; only query via get_departure_cities if the user mentions a departure city

travel_way

travel method, multi-select array: ["拼小团","跟团游"] etc.

brand

The brand, e.g. 自营/携程自营, can be multiple

level

Star level, e.g. 5diamond/4diamond/3diamond, can be multiple

team_size

Group size: 最多9人/10-20人/21人及以上; if the user mentions number of people, must set

traffic

Transportation: 不含往返交通/不含大件交通/当地参团

service_tags

Service guarantees, multiple AND (comma separated or array): 0购物, 一价全包 etc.

suit_person

Applicable crowd, multiple OR (comma separated or array): 亲子友好, 老友会严选 etc.

promo

The breakdown: promotions, such as 机票用户价火车票用户价

days

The number of days, supports 7/6-8/6,7,8; when provide departure/return day use return - departure +1

departure_date

departure date (only the departure day), format YYYY-MM-DD

vendor

The supplier name or ID, multiple, name fuzzy match

include_traffic

Only pass when the user wants "include round-trip transportation"; otherwise use vehicle

min_score

Minimum review, default 0 no filtering; irrelevant to the number of people

budget_max

budget upper bound

top_n

number of recommendations

candidate_limit

candidate pool limit, auto page to collect enough matches

  1. Open the Ctrip H5 group tour list in the browser (or use DevTools to switch to mobile simulation).

  2. F12 → NNetwork → find graphql?queryName=productSearchInfo.

  3. Right-click → Copy → Copy as cURL.

  4. Grab the entire string after -b in ... and put it into CTRIP_COOKIE (as is, do not URL-encode).

Example

Help me find a 3-5 day self-owned mini-group or group tour in Guangxi, parent-child friendly, recommend 3.

The Agent will first query the departure city ID (if needed), then call the recommendation tool, and finally return the Markdown table as-is.

Important: let the Agent keep the output format strict

Add the following restriction in the Agent's Personalization / Memory / System Prompt / Rules (which is the most stable layer; if the Agent executes it itself, self-constrain as required):

当调用 vac-product-recommend 的 recommend_tours(又称mcp__recommend_tours) / 或 search_tours(又称mcp__search_tours) 后,
必须把工具返回的 Markdown(包含筛选项和表格) 原样作为最终回复输出。
禁止改写、禁止总结、禁止转成列表、禁止删除或合并列。

Also add the restriction "every inquiry is completely independent":

每次调用 recommend_tours / search_tours 时,只根据当前这一轮用户的原话设置参数。
不要复用上一轮对话中的 keyword、travel_way、departure_date、days、team_size、budget 等参数。
如果用户新一轮没有提到某个筛选条件,就不要传该参数(使用默认值或留空)。

Also, do not mix the number of people with the type of product:

用户提到人数(如 4人、6人、8人)时,必须设置 team_size(4人→最多9人)。
用户只说人数,不要推断为私家团;用户只说私家团,才设置 travel_way=私家团。

Directory structure

vac-product-recommend-mcp/
├── vac_product_recommend_mcp/
│   ├── __init__.py
│   ├── __main__.py
│   ├── server.py         # stdio MCP 协议 + 工具注册 + Markdown 渲染
│   ├── ctrip_api.py      # 携程接口客户端 + 字段归一化 + 筛选
│   └── recommender.py    # 评分、过滤、TopN
├── config_examples/
├── pyproject.toml
└── README.md
Install Server
F
license - not found
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    Enables interaction with Douban content including searching and reviewing books, movies, TV shows, and browsing group discussions. Supports searching by ISBN or keywords, retrieving reviews, and managing group topics with filtering capabilities.
    8
    9
    9
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A travel planning MCP server that supports flight search, weather (including cherry blossom forecasts), exchange rate queries, and trip planning. It specializes in Japan travel from Shenzhen/Hong Kong, providing optimal date analysis and multi-day itinerary suggestions.
    11
    ISC

View all related MCP servers

Related MCP Connectors

  • TravelMind: 8 MCP tools for travel (12306 trains, flights, hotels, geocode, planning, policy).

  • Search and book theatre, attractions, tours across 681 cities. 13,090+ products.

  • China & Asia travel eSIM specialist. 200+ countries. No-VPN internet in China.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/KatouMegumii/vac-product-recommend-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server