tripwright
开源 · 可本地运行 · 可自行部署Open source · run locally or self-host

把你说过的,
带进每一次安排。
Your preferences,
in every plan.

tripwright 是旅行规划服务,通过 MCP 连接协议供 AI 助手调用。它取出这次该考虑的偏好与决定,给出有来源的交通事实,记录计划为什么改变。由你选择的 AI 助手组织回答。

tripwright is a trip-planning service for AI assistants over the Model Context Protocol (MCP). It brings relevant preferences and decisions into each turn, supplies sourced transport facts, and records what changed and why. Your chosen AI assistant writes the answer.

  • 每问取出相关记忆,避免只看最近一句话。Relevant memories each turn, beyond the latest message.
  • 能查的先查好;拿不到的说明去哪里查。Check what can be checked; show where to find what is missing.
  • 数据存在自己的行程仓或本地库,可查看与导出。Keep a trip repository or local database you can inspect and export.
每次对话的路径From message to plan

记下之后,还要取出来用。A memory needs to be used.

  1. 01

    收到这一问Receive this turn

    保存消息,分清偏好、实况和决定。Store the message and distinguish preferences, facts and decisions.

  2. 02

    取适用记忆Bring in memories

    按人、时段与地点,列出该考虑的条件和问题。Select conditions and questions for these people, times and places.

  3. 03

    核事实范围Check the facts

    交通、天气和已记录来源,查不到就保留未知。Use transport, weather and recorded sources. Keep missing facts unknown.

  4. 04

    说明每次改动Explain changes

    接受的改动留记录,旧结果不能覆盖新计划。Record accepted edits. Stale results cannot overwrite a newer plan.

先问必须项Ask what is a must

排计划前问有没有必须去的地方或必须守的时间。没提就当没有;普通选择可以带理由调整。Before planning, ask about must-go places or fixed times. If none are named, assume none. Other choices may change with a reason.

改动看得见Make edits visible

改了你先前的选择,就说原来是什么、现在改成什么、为什么。被拒绝的改动不会说成已完成。When revising your choice, say what it was, what it becomes and why. A rejected edit is not reported as done.

记忆不是保证Memory is not a guarantee

程序会返回相关记忆与下一步指引;宿主模型还需要实际使用。当前远程服务不包含独立核验模型。The service returns relevant memories and next-step guidance. The host model must still use them. A separate server-side verifier model is not included.

事实与边界Facts and limits

能拿到什么,拿不到什么。What the data can tell you.

由 agent 查好Checked by the agent

覆盖范围内的车次、目的地和按时刻表的换乘,逐程给出;天气有预报来源。营业规则可从保存的资料或宿主读到的官方页面核查。Departures, destinations and timetable transfers within coverage, leg by leg; weather with its forecast source. Opening rules can be checked against saved material or official pages the host reads.

不能假装知道Keep unknowns visible

晚点、站台、临时停运、余位或预约库存没有完整实时保证。工具会在能提供查法时给出操作;需要问人时,先邀请起草,用户要了再给英语与当地语言。Delays, platforms, disruptions, availability and booking inventory have no complete live guarantee. Where possible, tools supply checking steps. Inquiry drafts wait for your request and include English and the local language.

交通主要按时刻表,不是实时。覆盖和有效期识别尚不完整:已知克恩顿本地巴士缺口,日期规则目前只有奥地利。数据未覆盖时说“查不到”,不说“没车”。Transport is primarily timetable-based, not live. Coverage and validity checks are partial: a known Carinthia bus gap, and date rules currently only for Austria. Missing data means “not found”, not “no service”.

真实来源:Live providers: Transitous · © OpenStreetMap contributors · Open-Meteo (CC BY 4.0).
Transitous 路线请求默认最多 720 次/滚动 24 小时,公共 API 条款另行适用。Wiener Linien、VAO 额外实时适配器尚未接入;VAO 如需接入,要用户本人确认合同并申请凭据。Transitous route requests default to 720 per rolling 24 hours, subject to its public API terms. Extra Wiener Linien and VAO adapters are not implemented. VAO access would require the user to arrange a contract and credentials.

怎样连接Connect

自己部署一份,再接进你的 App。Run your own copy. Add it to your app.

没有公共服务,也不开放注册:每人自己部署一份,只给自己用。

There is no public service and no signup. Each person runs their own copy, for themselves.

  1. 起服务:用 Docker(自己的电脑或任意一台机器)或 Railway。服务会生成一串密钥,连接器地址形如 https://<你的域名>/mcp/<密钥>。这个地址就是登录凭据,拿到它的人能读写你的行程。
  2. 连 GitHub 私有仓存行程。这一步可以不做;不做时,行程存在部署里的本地 Git 仓,备份要自己做。
  3. 把地址加进客户端。在 Claude 和 ChatGPT 里,只有账号主人能在 App 的设置里加连接器。
  1. Start the service with Docker (on your own computer or any server) or on Railway. The service creates a secret key, and your connector address is https://<your-host>/mcp/<key>. This address is your login: anyone who has it can read and change your trips.
  2. Connect a private GitHub repository to hold your trips. This step is optional. Without it, the trips stay in a Git repository inside your deployment, and you make the backups yourself.
  3. Add the address to your client. In Claude and ChatGPT, only the account owner can add a connector, in the app's settings.

第一次部署,把仓内的 deploy/SETUP.md 交给你的编码 agent(Claude Code、Codex 等)照做。各客户端的步骤在 deploy/CLIENTS.md。

For the first deployment, give deploy/SETUP.md to your coding agent (Claude Code, Codex or similar) and let it follow the steps. The steps for each client are in deploy/CLIENTS.md.

Claude 网页/桌面/手机Claude web / desktop / mobile完整流程未实测App flow untested

在网页上添加自定义连接器,填你的地址,认证选不登录:网址密钥不需要 OAuth。网页上加好的连接器,手机 App 也能用。免费账号只能加一个自定义连接器。

Add a custom connector on the web with your address, and choose no sign-in: the secret key needs no OAuth. A connector added on the web also works in the mobile app. Free accounts can add only one custom connector.

ChatGPT完整流程未实测App flow untested

自定义 MCP 只能在网页版添加。会写入的工具要 Business、Enterprise 或 Edu 账号。Pro 账号只能用只读工具;tripwright 只有 state、explain 是只读的,所以在 Pro 上只能读行程,不能查交通,也不能改计划。

You can add a custom MCP server on the web only. Tools that write need a Business, Enterprise or Edu account. Pro accounts can use only read-only tools. In tripwright only state and explain are read-only, so on Pro you can read the trip but cannot check transport or change the plan.

Claude Code本机有一次实连Local connection recorded

本机用 stdio;远程用 claude mcp add --transport http 加你的地址。云端会话默认连不到交通数据来源,用 Claude 账号里加的连接器可以绕开。

Use local stdio, or add your address with claude mcp add --transport http. Cloud sessions cannot reach the transport sources by default; a connector added to your Claude account works around this.

Codex按 0.162 核过Checked on 0.162

本机 CLI、桌面 App 和 IDE 插件都用 codex mcp add tripwright --url "<地址>"。查交通的 query 要先批准,也可以在配置里设成自动批准。codex mcp list 会打印完整地址,别在共享屏幕上跑。

The local CLI, desktop app and IDE extension all use codex mcp add tripwright --url "<address>". The transport tool query needs approval first, or you can set automatic approval in the config. codex mcp list prints the full address, so do not run it on a shared screen.

其他 MCP 客户端要支持远程 Streamable HTTP;用了标准协议,不等于每个聊天 App 都已兼容。各家限制按 2026-11-02 的官方文档写,没有逐家完整实测。真实 App 登录、两段接续和回答质量要分别验证;回答质量还在评测中。Other MCP clients need remote Streamable HTTP support; a standard server does not mean every chat app is compatible. Client limits follow the official documentation as of 2026-11-02 and are not tested end to end in every app. App sign-in, continuation between parts and answer quality need separate checks; answer quality is still being evaluated.

行程展示Trip examples

一趟真实走过的行程。A trip that really happened.

2026 年 10 月 25 日至 11 月 1 日,布达佩斯、维也纳与萨尔茨卡默古特,4 人。人名都换成了代号。Budapest, Vienna and the Salzkammergut, 25 October to 1 November 2026, four people. All names are replaced with codes.

本地试用Try locally

先跑虚构示例。Start with fictional data.

从代码仓根目录运行,需要 Python 3.11+ 和 uv。demo 用临时库与虚构数据;stdio 命令供本机 MCP 宿主启动。

From the code repository root, use Python 3.11+ and uv. The demo uses a temporary database and fictional data; the stdio command starts a server for a local MCP host.

uv sync --extra dev
uv run tripwright demo
uv run tripwright serve --stdio

MCP 真实查询需在启动时设置 TRIPWRIGHT_PROVIDERS=live;未设置时是 synthetic。虚构数据不能用于真实出行。For real MCP lookups, set TRIPWRIGHT_PROVIDERS=live at startup; otherwise they are synthetic. Fictional data cannot guide real travel.

自己部署Self-host

把仓内的 deploy/SETUP.md 交给你的编码 agent 照做:它用 Docker 或 Railway 起服务、连行程仓,最后把连接器地址交给你。三步总览见怎样连接。

Give deploy/SETUP.md in the repository to your coding agent and let it follow the steps. It starts the service with Docker or on Railway, connects the trip repository, and gives you the connector address. For the three steps, see Connect.

数据与隐私Data and privacy

自己的记录,明确的边界。Your records, explicit boundaries.

仓库模式将行程、账本和版本写回你配置的 Git 仓;服务器保留镜像与运行库。本机也可仅用 SQLite。宿主 app、Git 托管方与部署者各有自己的数据处理范围。

Repository mode writes trips, records and versions to your configured Git repository; the server retains a mirror and runtime database. Local mode can use SQLite alone. The host app, Git provider and operator each have their own data practices.

不要公开令牌、私钥和未处理的个人行程。当前没有对全部运行日志的正文脱敏保证;部署者需要限制访问与日志内容。

Keep tokens, private keys and unreviewed personal itineraries out of public files. There is no complete body-redaction guarantee across runtime logs; operators must control access and logging.

为什么要在每次回答前取出记忆 →Why each answer needs to read its memories →