Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .changeset/mcp-dev-connect-hint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@objectstack/cli': patch
---

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

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. The server-ready banner now prints
the MCP URL and the `SKILL.md` pointer whenever the surface is enabled
(`isMcpServerEnabled()`, the same switch that auto-loads the plugin and gates
the route), so an agent can operate the running app straight from the dev loop.
Hidden when `OS_MCP_SERVER_ENABLED=false`.
5 changes: 5 additions & 0 deletions packages/cli/src/commands/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2455,6 +2455,11 @@ export default class Serve extends Command {
multiTenant: resolveMultiOrgEnabled(),
seededAdmin,
automation: automationSummary,
// #3167 — surface the default-on MCP endpoint in the dev loop, where an
// AI client can connect to operate the running app. Same decision point
// that auto-loads the plugin + gates the route, so the banner never
// advertises an endpoint that isn't served.
mcpEnabled: isMcpServerEnabled(),
});

// ── Publish the actually-bound port ────────────────────────────
Expand Down
12 changes: 12 additions & 0 deletions packages/cli/src/utils/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,14 @@ export interface ServerReadyOptions {
* armed. Collected from the live engine after runtime.start().
*/
automation?: AutomationReadySummary;
/**
* Whether the MCP server surface (`/api/v1/mcp`) is on (#3167). Default-on
* core capability, but nothing in the dev loop surfaces it — an AI client
* (Claude Code, Cursor, …) can operate the running app the instant a
* developer knows the endpoint is there. The banner is where they look, so
* print the URL + the SKILL.md pointer when it's live.
*/
mcpEnabled?: boolean;
}

export interface AutomationReadySummary {
Expand Down Expand Up @@ -233,6 +241,10 @@ export function printServerReady(opts: ServerReadyOptions) {
if (opts.uiEnabled && opts.consolePath) {
console.log(chalk.cyan(' ➜') + chalk.bold(' Console: ') + chalk.cyan(base + opts.consolePath + '/'));
}
if (opts.mcpEnabled) {
console.log(chalk.cyan(' ➜') + chalk.bold(' MCP: ') + chalk.cyan(base + '/api/v1/mcp'));
console.log(chalk.dim(` connect an AI client (Claude Code, Cursor, …) · skill: ${base}/api/v1/mcp/skill`));
}
if (opts.seededAdmin) {
console.log('');
console.log(
Expand Down