Skip to content

feat(cli): surface the MCP endpoint in the server-ready banner (#3167) - #3239

Merged
os-zhuang merged 1 commit into
mainfrom
claude/mcp-dev-connect-hint
Jul 18, 2026
Merged

feat(cli): surface the MCP endpoint in the server-ready banner (#3167)#3239
os-zhuang merged 1 commit into
mainfrom
claude/mcp-dev-connect-hint

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

#3167 的最后一项(可选 DX)。也是这条线最初动机的兑现:#3167 开篇讲的就是 "discoverability is zero exactly where the platform's pitch is strongest — the dev loop"——MCP 端点默认开着、能用、还自我广播(RFC 9728 + /mcp/skill),但 os dev / os serve 的启动输出里没有任何指引,开发者得先知道它在才连得上。

变更

printServerReady 横幅在 MCP 启用时多打一行 URL + SKILL.md 指引:

 ✓ Server is ready
➜ API: http://localhost:3000/
➜ MCP: http://localhost:3000/api/v1/mcp
connect an AI client (Claude Code, Cursor, …) · skill: http://localhost:3000/api/v1/mcp/skill
  • 门控在 isMcpServerEnabled()——与自动加载插件、门住路由的同一决策点,所以横幅绝不会广播一个没在服务的端点;OS_MCP_SERVER_ENABLED=false 时不显示。
  • 与横幅既有的 API / Console 行同风格,归在端点 URL 组。

验证

运行时验证:开→渲染 URL + skill 行;关→无 MCP 行(见下)。CLI 构建干净、lint 干净、changeset(@objectstack/cli patch)。

=== mcpEnabled: true ===
➜ MCP: http://localhost:3000/api/v1/mcp
connect an AI client (Claude Code, Cursor, …) · skill: http://localhost:3000/api/v1/mcp/skill
=== mcpEnabled: false ===
(无 MCP 行)

合并后 #3167 的四个决策 + 可选 DX 全部完成,建议随之关闭 #3167

Refs #3167#3202#3225

🤖 Generated with Claude Code

https://claude.ai/code/session_01Pbmw3pMqNJfPbkvwh9Fkjs


Generated by Claude Code

The MCP server (/api/v1/mcp) is a default-on core capability, but nothing in
the os dev / os serve boot output pointed to it — a developer had to already
know it was there to connect an AI client. This is the dev-loop discoverability
gap #3167 set out to close: the platform's "let an AI operate the running app"
channel was live but invisible.
printServerReady now prints the MCP URL and the SKILL.md pointer whenever the
surface is enabled — gated on isMcpServerEnabled(), the SAME switch that
auto-loads the plugin and gates the route, so the banner can never advertise an
endpoint that isn't served. Hidden when OS_MCP_SERVER_ENABLED=false.
Runtime-verified: the line renders with the URL + skill pointer when enabled and
is absent when disabled. CLI builds clean; lint clean. Closes the last
(optional, DX) item on #3167 — the admission story itself landed in #3202/#3225.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pbmw3pMqNJfPbkvwh9Fkjs
@vercel

vercelBot commented Jul 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specBuildingBuildingPreview, CommentJul 18, 2026 4:21pm

Request Review

@github-actionsgithub-actionsBot added documentation Improvements or additions to documentation tooling size/s labels Jul 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/cli.

17 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/ai/skills-reference.mdx(via packages/cli)
  • content/docs/api/client-sdk.mdx(via @objectstack/cli)
  • content/docs/api/data-flow.mdx(via @objectstack/cli)
  • content/docs/api/environment-routing.mdx(via @objectstack/cli)
  • content/docs/api/error-catalog.mdx(via @objectstack/cli)
  • content/docs/automation/hook-bodies.mdx(via packages/cli)
  • content/docs/deployment/backup-restore.mdx(via @objectstack/cli)
  • content/docs/deployment/self-hosting.mdx(via @objectstack/cli)
  • content/docs/getting-started/cli.mdx(via @objectstack/cli)
  • content/docs/getting-started/your-first-project.mdx(via @objectstack/cli)
  • content/docs/kernel/runtime-services/data-service.mdx(via packages/cli)
  • content/docs/kernel/runtime-services/index.mdx(via packages/cli)
  • content/docs/permissions/authentication.mdx(via @objectstack/cli)
  • content/docs/plugins/packages.mdx(via @objectstack/cli)
  • content/docs/protocol/kernel/plugin-spec.mdx(via @objectstack/cli)
  • content/docs/protocol/kernel/realtime-protocol.mdx(via @objectstack/cli)
  • content/docs/releases/implementation-status.mdx(via @objectstack/cli)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang
os-zhuang marked this pull request as ready for review July 18, 2026 16:31
@os-zhuang
os-zhuang merged commit 9760844 into mainJul 18, 2026
15 of 16 checks passed
@os-zhuang
os-zhuang deleted the claude/mcp-dev-connect-hint branch July 18, 2026 16:31
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentationsize/stooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@os-zhuang@claude