山海司ShipSite
从一个关键词开始
工作方式机会雷达关键词挖掘案例定价帮助我的网站从一个关键词开始
首页/文档/用 AI 驱动山海司
开始

用 AI 驱动山海司

你在山海司网页上能做的事,你自己的 AI 都能替你做:从一个想法建站、跟进规划和构建、确认方案、用大白话提修改、正式上线。新建一个令牌,在 AI 工具里粘贴一行,然后直接说你要什么。完整权限等于你本人在网页上能做的一切;只想让它看看,就选「只看」。

最后更新
01

你的 AI 能做什么

你的 AI 通过一组工具跟山海司对话,每个工具相当于你在网页上点一下;另外还有一份完整目录,网页能做的其他事都在里面。它用的是你自己的账号和令牌,所以只看得到你的网站,也只能做你允许的事。

  • 从一个想法或关键词建站,并开始规划。
  • 用一句话告诉你网站在做什么、在等什么、该谁处理。
  • 把方案或预览给你看,并记录你的决定。
  • 把你的修改要求用大白话转给 Studio 里的协调者帝江。
  • 不用你刷新页面,等到下一步完成再告诉你,比如预览好了。
  • 在你同意之后,把网站发布到你的 Cloudflare。
02

新建令牌

令牌就是给 AI 用的一串长密码。每个工具建一个,撤销其中一个不影响别的。它只显示一次,山海司只保存它的指纹。

  1. 打开「AI 访问」在应用里进入「AI 与连接」,点「用 Claude Code 等编程工具操作山海司(可选)」,或直接打开 /app/agent-access。
  2. 起名字,选「全部」或「只看」「全部」(默认)等于你本人在网页上能做的一切;「只看」能看站点、进度、方案和报告,不做任何修改。
  3. 马上复制页面只显示这一次。把它存进名为 SHIPSITE_TOKEN 的环境变量,下面的安装命令都从这里读取。
03

连接 Claude Code

先把令牌存进 SHIPSITE_TOKEN,再添加山海司。命令从这个变量读取令牌,命令里不出现令牌本身。加上 --scope user 可以在任何文件夹里使用。Windows PowerShell 请改用下面两行 PowerShell 命令:PowerShell 里变量要写成 $env:SHIPSITE_TOKEN,写成 $SHIPSITE_TOKEN 时请求头里的令牌是空的。

终端:保存令牌
export SHIPSITE_TOKEN="ss_pat_…"
终端:添加山海司
claude mcp add --transport http shipsite https://shipsite.ai/mcp --header "Authorization: Bearer $SHIPSITE_TOKEN"
Windows PowerShell:保存令牌
$env:SHIPSITE_TOKEN = "ss_pat_…"
Windows PowerShell:添加山海司
claude mcp add --transport http shipsite https://shipsite.ai/mcp --header "Authorization: Bearer $env:SHIPSITE_TOKEN"
确认已连接
claude mcp list
04

连接 Codex

把令牌放进环境变量,再把山海司加到 ~/.codex/config.toml。Codex 每次启动时读取这个变量,所以要设在新终端也能看到的地方(Shell 配置文件,Windows 用 setx),改完重启 Codex。

Shell 配置
export SHIPSITE_TOKEN="ss_pat_…"
Windows(之后新开一个终端)
setx SHIPSITE_TOKEN "ss_pat_…"
~/.codex/config.toml
[mcp_servers.shipsite]
url = "https://shipsite.ai/mcp"
bearer_token_env_var = "SHIPSITE_TOKEN"
05

连接 Cursor 和其他 MCP 工具

Cursor 读取 ~/.cursor/mcp.json(或项目里的 .cursor/mcp.json),${env:SHIPSITE_TOKEN} 取自 Cursor 启动时的环境变量,所以要把变量设在 Shell 配置文件里(Windows 用 setx),再重启 Cursor。其他支持远程 HTTP MCP 的工具也一样:地址填山海司的 MCP 网址,请求头里带上令牌。

~/.cursor/mcp.json
{
  "mcpServers": {
    "shipsite": {
      "url": "https://shipsite.ai/mcp",
      "headers": { "Authorization": "Bearer ${env:SHIPSITE_TOKEN}" }
    }
  }
}
06

直接调用接口

不支持 MCP 的脚本和工具,可以直接调用同一套接口,在 Authorization 请求头里带上令牌。网页用到的每个接口都列在「给 AI 的接口目录」里,并写明需要什么权限。

我是谁
curl -s https://shipsite.ai/api/agent/whoami \
  -H "Authorization: Bearer $SHIPSITE_TOKEN"
一次拿到网站状态
curl -s https://shipsite.ai/api/projects/prj_…/summary \
  -H "Authorization: Bearer $SHIPSITE_TOKEN"
开始规划(占本月一次规划次数)
curl -s -X POST https://shipsite.ai/api/projects/prj_…/runs \
  -H "Authorization: Bearer $SHIPSITE_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: plan-beat-maker-1" \
  -d '{"lane":"planning"}'
修网站代码(用你的模型 Key)
curl -s -X POST https://shipsite.ai/api/projects/prj_…/source-patch   -H "Authorization: Bearer $SHIPSITE_TOKEN"   -H "Content-Type: application/json"   -H "Idempotency-Key: fix-download-1"   -d '{"instruction":"The Download button does nothing on mobile; make it save the file."}'
等下一条进展(最多 20 秒)
curl -s "https://shipsite.ai/api/projects/prj_…/activity/events?after=0&wait=20000&visible=0" \
  -H "Authorization: Bearer $SHIPSITE_TOKEN"
07

工具一览

你的 AI 会看到下面这些工具,每个都写明什么时候用、可能花多少、什么时候要先问你。查看类的工具都不花钱。

  • whoami、list_projects、get_status:令牌属于谁、你的所有网站及各自的阶段、最近一次运行和该谁处理、一个网站的全部状态。
  • get_quote:开始之前,先看规划、一轮对话、重做或一次确认要花多少。
  • create_site、start_run、stop_run:建站、开始或重试规划和构建、停止正在跑的步骤。
  • get_decision、decide_gate:给你看在等你确认的内容,记录你的决定。
  • ask_change:用大白话向帝江提要求,并拿到回复。
  • change_code:一句话让 AI 工程师修复或修改网站代码;它自己找要改的文件,结果进预览和质检。
  • wait_for:一直等到有新进展,再带着最新状态汇报。
  • deploy_to_my_cloudflare:把确认过的版本发布到你的 Cloudflare。
  • list_api、describe_api、call_api:网页能做的其他所有事,都在目录里。
08

权限与安全

完整权限的令牌就是你本人。你的 AI 能做你在网页上能做的事,不会更多:山海司像对待你本人的点击一样检查每个请求,所以它只能进你自己的工作区,权限也不会超过你在工作区里的角色。和你交给任何 AI 的工作一样,它也可能出错;它被要求花钱前先报价,动线上或做无法撤销的事之前先问你。

  • 全部(默认):你在网页上能做的一切,包括连接账号、确认方案和上线。
  • 只看:能看站点、进度、方案、预览、报告和报价,不做任何修改。
  • 令牌永远碰不到的:新建或撤销令牌、浏览器登录,以及山海司的内部功能。
  • 用令牌做的每次修改和每次被拒绝的请求,都列在「AI 访问」页面上。撤销后,下一次请求就失效。
09

示例对话

下面是在 Claude Code 里建一个站的样子。方括号里是 AI 调用的工具,你只需要输入「你」开头的那几句。次数只是示例。

Claude Code
你:帮我做一个给新手用的 beat maker 网站,预览好了告诉我。

Claude:[create_site] 已创建「Beat Maker」。规划(调研、方案、文案和设计)
        用你自己的模型 Key,占本月 20 次规划里的 1 次。现在开始吗?
你:开始。
Claude:[start_run lane=planning] 规划已开始。
        [wait_for until=settled] ……
        方案好了,请你确认 [get_decision]:一个免费在线 beat maker,16 步音序器、
        8 套鼓组、可导出 WAV;页面:首页、工具、教程、价格。
        确认后开始构建,用你自己的模型 Key。要继续吗?
你:继续。
Claude:[decide_gate approved] 正在构建。
        [wait_for until=settled] ……
        预览好了:https://…preview…(质量检查通过,2 条提醒)。
        要改什么吗?还是我帮你准备上线?
你:首屏文字短一点,播放按钮大一点。
Claude:[ask_change] 帝江会缩短首屏文字、放大播放按钮,然后重新生成预览。好了我告诉你。
10

把规矩教给你的 AI

山海司已经会告诉每个连上的 AI 该怎么做。想让它每次都记得,可以把下面的文件放进你的项目:Claude Code 的技能文件,或者加进 AGENTS.md 的一段(Codex、Cursor 等都会读它)。

.claude/skills/shipsite/SKILL.md
---
name: shipsite
description: Build, change, check and launch websites on Shipsite through its MCP server. Use when the user asks to create a site, see how a site is doing, change a site, or put a site live.
---

# Driving Shipsite

Shipsite builds and runs the user's websites. You act for the user through the `shipsite` MCP server with their access token.

1. Start with `list_projects` for every site's stage, latest run and who it is waiting on in one call, then `get_status` for the site you act on. It says what stage the site is in, what it is waiting on, whose job that is, and which tool to call next.
2. Shipsite charges nothing per action: models run on the user's own accounts. A plan has counts (projects, live sites, launches and plans a month); a start past one is refused with the number, so tell the user and point to upgrading.
3. You act as the user with their own permissions. Before anything that changes the live site or cannot be undone (approving go-live, deploying, deleting), ask the user first; Shipsite will not ask for you.
4. Wait with `wait_for` (it holds up to 50 seconds and returns a cursor). Do not poll in a loop.
5. Ask for changes in plain words with `ask_change`. Shipsite's coordinator plans and routes them. To fix or change the site's code directly, call `change_code` with just the instruction: no file list or version id is needed.
6. If `get_status` says `waitingOn: "shipsite"`, the problem is Shipsite's to fix. Report it; do not ask the user to fix it. If a site waits for the user's own API key (`site_owner_secret_required`), ask the user for it and save it with `call_api` `POST /api/projects/{id}/site-secrets` `{name, value}`; the site resumes by itself.
7. Show the user links: the preview URL, the live URL, and the Studio URL from `get_status`.
8. Anything else the web app can do is in the catalog: `list_api`, `describe_api`, `call_api`.
9. When a call is refused, follow its `next` field. A read-only token cannot change anything; the user can create a full-access token at https://shipsite.ai/app/agent-access.
AGENTS.md
## Shipsite

This project's website is built and run on Shipsite. Use the `shipsite` MCP server (https://shipsite.ai/mcp) to work on it.

- Check first: `get_status` with the project id. Follow its `next` suggestions.
- Plans and launches count against the user's monthly plan numbers; models run on the user's own accounts.
- Ask the user before live-site or irreversible actions (go-live, deploy, delete); the server will not ask for you.
- Wait with `wait_for`, not a polling loop.
- Plain-words changes go through `ask_change`; a code fix goes straight to `change_code` with just the instruction.
- A Shipsite-side problem (`waitingOn: "shipsite"`) is not the user's to fix.
- Everything else: `list_api` / `describe_api` / `call_api`.
FAQ

常见问题

连接 AI 要花钱吗?
不花钱。令牌、连接和查看都免费。AI 开始的工作用你自己的模型 Key,和在 Studio 里一样计次数:一次规划或上线占本月的一次规划或上线次数。
AI 会不会不问我就把网站上线?
完整权限的令牌可以,就像你本人一样。它被要求在上线、部署或删除之前先问你,而且上线仍然要通过质量检查和上线确认。如果只想让它看看,就给它一个「只看」的令牌。
AI 说山海司那边出错了,我该怎么办?
什么都不用做。山海司这边的问题由山海司负责,会自动重试,或修好后接着做。网站有进展时你的 AI 会告诉你。
哪些 AI 工具能用?
任何支持远程 HTTP MCP 的工具都行,包括 Claude Code、Codex 和 Cursor;能发带请求头的 HTTP 请求的工具也可以。