Skip to main content

README.md

本文说明如何以跨用户、跨操作系统的方式安装并配置 travel-platform-mcp

给 Agent 的安装与配置 Prompt

将以下内容完整发送给 Agent:

请为当前用户安装并配置 travel-platform-mcp。请严格按以下步骤执行。

1. 安装 MCP 工具

执行:

uv tool install travel-platform-mcp

若工具已安装,则不要重复安装;请确认该工具可正常执行。

2. 获取 MCP 可执行文件的绝对路径

执行:

uv tool dir --bin

将 MCP 的 command 设置为该目录下的可执行文件:

- Windows:<uv_tool_bin_dir>\travel-platform-mcp.exe
- macOS/Linux:<uv_tool_bin_dir>/travel-platform-mcp

不得硬编码用户名、主目录、磁盘盘符或机器相关路径。

3. 获取模型 API Key

向用户询问模型 API Key。这是唯一必须向用户询问的配置值。

安全要求:

- 不要在日志、最终回复、截图或其他文件中展示或重复 API Key。
- 不要将 API Key 写入项目仓库、config.yaml、.env 或可提交文件。
- 仅将 API Key 写入 MCP 配置的 env.TRAVEL_PLATFORM_MODEL_API_KEY。

4. 查找 Agent Skills 目录

查找当前 Agent/Codex 使用的 Skills 根目录,并获取其绝对路径。

- 优先从当前 Agent 的已有配置中检测。
- 如无法可靠检测,才向用户询问。
- 不要创建、删除、迁移或覆盖该目录中的 Skills。
- 将最终绝对路径写入 MCP 配置的 env.TRAVEL_PLATFORM_SKILLS_DIRECTORY。

5. 创建浏览器独立 Profile 目录

获取当前用户“桌面”目录的绝对路径,不得假定用户名或硬编码 C:\Users\123。

在桌面目录下创建 product_quality_compare 文件夹。若目录已存在,保留其已有内容,不删除、不覆盖。

得到该目录的绝对路径:

<当前用户桌面绝对路径>\product_quality_compare

该目录仅供 travel-platform-mcp 的浏览器实例保存登录状态和运行数据使用。

安全要求:

- 不要读取、输出、迁移或复制用户默认 Chrome、Edge 或 Brave Profile 中的 Cookie、密码、Token 或其他敏感数据。
- 不需要直接启动浏览器。
- 将第 5 步创建的目录绝对路径写入 MCP 配置的 env.TRAVEL_PLATFORM_BROWSER_PROFILE_DIR。

6. 更新 MCP Host 使用的 mcp.json

找到当前 MCP Host 实际使用的 mcp.json,并创建或更新 mcpServers.travel-platform-mcp。

保留 mcpServers 中已有的其他 MCP 配置;不得覆盖或删除它们。

最终条目应符合以下结构。所有路径必须替换成当前用户实际的绝对路径;Windows JSON 路径中的反斜杠必须正确转义:

{
  "mcpServers": {
    "travel-platform-mcp": {
      "command": "<uv_tool_bin_dir>\\travel-platform-mcp.exe",
      "env": {
        "TRAVEL_PLATFORM_MODEL_API_KEY": "<用户提供的模型 API Key>",
        "TRAVEL_PLATFORM_SKILLS_DIRECTORY": "<Agent Skills 根目录绝对路径>",
        "TRAVEL_PLATFORM_BROWSER_PROFILE_DIR": "<当前用户桌面绝对路径>\\product_quality_compare"
      },
      "disabled": false
    }
  }
}

macOS 或 Linux 时,command 使用:

<uv_tool_bin_dir>/travel-platform-mcp

env 中只配置以下三项:

- TRAVEL_PLATFORM_MODEL_API_KEY
- TRAVEL_PLATFORM_SKILLS_DIRECTORY
- TRAVEL_PLATFORM_BROWSER_PROFILE_DIR

7. 完成后进行安全检查并报告

确认:

- travel-platform-mcp 已通过 uv tool 安装且可执行;
- 浏览器 Profile 目录已创建;
- mcp.json 已成功更新且 JSON 格式合法;
- 已保留其他 MCP Server 配置;
- MCP 配置中只注入上述三个 travel-platform-mcp 环境变量。

最终只报告:

- 安装是否成功;
- mcp.json 是否更新成功;
- MCP command 路径;
- Skills 目录路径;
- 浏览器 Profile 目录路径。

不得显示、复述或记录 API Key、Cookie、Token、密码或其他敏感数据。

更新到最新版本

已通过 uv tool install 安装后,使用以下命令将 travel-platform-mcp 升级到当前可获得的最新版本:

uv tool upgrade travel-platform-mcp

升级完成后重启 MCP Host,使其重新加载更新后的可执行文件。若要确认安装状态,可执行:

uv tool list

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

travel_platform_mcp-0.2.7.tar.gz (93.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

travel_platform_mcp-0.2.7-py3-none-any.whl (140.0 kB view details)

Uploaded Python 3

File details

Details for the file travel_platform_mcp-0.2.7.tar.gz.

File metadata

  • Download URL: travel_platform_mcp-0.2.7.tar.gz
  • Upload date:
  • Size: 93.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for travel_platform_mcp-0.2.7.tar.gz
Algorithm Hash digest
SHA256 acf7babb998e292165f1f34c2521e16585bf2f3a29b67b5a5a3e08e8084e6c93
MD5 a917f096ff7b282c248409b7322e3cd9
BLAKE2b-256 b1d85683fd3d6db2f996b9c339145f4bbbb1d55e7fdc0e7f4cc66ecfd24ab31b

See more details on using hashes here.

Provenance

The following attestation bundles were made for travel_platform_mcp-0.2.7.tar.gz:

Publisher: release.yml on MaojieXu/travel-platform-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file travel_platform_mcp-0.2.7-py3-none-any.whl.

File metadata

File hashes

Hashes for travel_platform_mcp-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ec1067c0e190c6dbbbb03fd02d849d9f99cdd634a5f54b818eff8e4f886d16e0
MD5 0c55876635baaac4255a089093ac1aff
BLAKE2b-256 20d5d6cef661bbd1ee71cb2ae063f4ebd271be9ae4c068d861a45e9ec770e7e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for travel_platform_mcp-0.2.7-py3-none-any.whl:

Publisher: release.yml on MaojieXu/travel-platform-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 files

0.2.6

2 files

0.2.4

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.2

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page