proteum 2.2.9 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/AGENTS.md +10 -4
  2. package/README.md +58 -15
  3. package/agents/project/AGENTS.md +53 -10
  4. package/agents/project/DOCUMENTATION.md +1326 -0
  5. package/agents/project/app-root/AGENTS.md +2 -2
  6. package/agents/project/diagnostics.md +12 -7
  7. package/agents/project/optimizations.md +1 -0
  8. package/agents/project/root/AGENTS.md +24 -9
  9. package/agents/project/tests/AGENTS.md +7 -0
  10. package/agents/project/tests/e2e/AGENTS.md +13 -0
  11. package/agents/project/tests/e2e/REAL_WORLD_JOURNEY_TESTS.md +192 -0
  12. package/cli/commands/connect.ts +40 -4
  13. package/cli/commands/dev.ts +148 -25
  14. package/cli/commands/diagnose.ts +138 -5
  15. package/cli/commands/doctor.ts +24 -4
  16. package/cli/commands/explain.ts +134 -6
  17. package/cli/commands/mcp.ts +133 -0
  18. package/cli/commands/orient.ts +93 -3
  19. package/cli/commands/perf.ts +118 -13
  20. package/cli/commands/runtime.ts +234 -0
  21. package/cli/commands/trace.ts +116 -21
  22. package/cli/mcp/router.ts +1010 -0
  23. package/cli/presentation/commands.ts +93 -26
  24. package/cli/presentation/devSession.ts +2 -0
  25. package/cli/presentation/help.ts +1 -1
  26. package/cli/runtime/commands.ts +215 -24
  27. package/cli/runtime/devSessions.ts +328 -2
  28. package/cli/runtime/mcpDaemon.ts +288 -0
  29. package/cli/runtime/ports.ts +151 -0
  30. package/cli/utils/agentOutput.ts +46 -0
  31. package/cli/utils/agents.ts +194 -51
  32. package/cli/utils/appRoots.ts +232 -0
  33. package/common/dev/diagnostics.ts +1 -1
  34. package/common/dev/inspection.ts +22 -7
  35. package/common/dev/mcpPayloads.ts +1150 -0
  36. package/common/dev/mcpServer.ts +287 -0
  37. package/docs/agent-routing.md +137 -0
  38. package/docs/dev-commands.md +2 -0
  39. package/docs/dev-sessions.md +4 -1
  40. package/docs/diagnostics.md +70 -24
  41. package/docs/mcp.md +206 -0
  42. package/docs/migrate-from-2.1.3.md +14 -6
  43. package/docs/request-tracing.md +12 -6
  44. package/package.json +11 -3
  45. package/server/app/devMcp.ts +204 -0
  46. package/server/services/router/http/cache.ts +116 -0
  47. package/server/services/router/http/index.ts +94 -35
  48. package/server/services/router/index.ts +8 -11
  49. package/server/services/router/request/ip.test.cjs +0 -1
  50. package/tests/agents-utils.test.cjs +92 -14
  51. package/tests/cli-mcp-command.test.cjs +262 -0
  52. package/tests/codex-mcp-usage.test.cjs +307 -0
  53. package/tests/dev-sessions.test.cjs +113 -0
  54. package/tests/dev-transpile-watch.test.cjs +117 -9
  55. package/tests/eslint-rules.test.cjs +0 -1
  56. package/tests/inspection.test.cjs +66 -0
  57. package/tests/mcp.test.cjs +873 -0
  58. package/tests/router-cache-config.test.cjs +73 -0
  59. package/vitest.config.mjs +9 -0
@@ -21,6 +21,8 @@ export const proteumCommandNames = [
21
21
  'orient',
22
22
  'diagnose',
23
23
  'perf',
24
+ 'runtime',
25
+ 'mcp',
24
26
  'trace',
25
27
  'command',
26
28
  'session',
@@ -49,7 +51,7 @@ export type TProteumCommandDoc = {
49
51
 
50
52
  export const proteumRecommendedFlow: TRow[] = [
51
53
  { label: '1. proteum orient <query>', value: 'Start here for multi-repo, generated, or connected work before reading code.' },
52
- { label: '2. proteum dev', value: 'Start the compiler, SSR server, and hot reload loop.' },
54
+ { label: '2. proteum runtime status', value: 'Reuse an existing tracked dev session before starting a new one.' },
53
55
  { label: '3. proteum diagnose <path> --hit <path>', value: 'Validate the smallest trustworthy request surface before broader checks.' },
54
56
  { label: '4. proteum check', value: 'Refresh, typecheck, and lint before you commit or push.' },
55
57
  ];
@@ -57,7 +59,7 @@ export const proteumRecommendedFlow: TRow[] = [
57
59
  export const proteumCommandGroups: Array<{ title: string; names: TProteumCommandName[] }> = [
58
60
  { title: 'Daily workflow', names: ['dev', 'refresh', 'build'] },
59
61
  { title: 'Quality gates', names: ['typecheck', 'lint', 'check', 'e2e'] },
60
- { title: 'Manifest and contracts', names: ['connect', 'doctor', 'explain', 'orient', 'diagnose', 'perf', 'trace', 'command', 'session', 'verify'] },
62
+ { title: 'Manifest and contracts', names: ['connect', 'doctor', 'explain', 'orient', 'diagnose', 'perf', 'runtime', 'mcp', 'trace', 'command', 'session', 'verify'] },
61
63
  { title: 'Project scaffolding', names: ['init', 'configure', 'create', 'migrate'] },
62
64
  ];
63
65
 
@@ -126,7 +128,7 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
126
128
  notes: [
127
129
  'This command is interactive. It asks whether the current Proteum app belongs to a monorepo and, if so, which ancestor path should receive the reusable root instruction files.',
128
130
  'Standalone mode writes tracked instruction files into the current Proteum app root.',
129
- 'Monorepo mode writes reusable root documents such as `AGENTS.md`, `CODING_STYLE.md`, `diagnostics.md`, and `optimizations.md` into the chosen monorepo root, then writes only app-root and area instruction files into the current Proteum app root.',
131
+ 'Monorepo mode writes reusable root documents such as `AGENTS.md`, `DOCUMENTATION.md`, `CODING_STYLE.md`, `diagnostics.md`, and `optimizations.md` into the chosen monorepo root, then writes only app-root and area instruction files into the current Proteum app root.',
130
132
  'Every managed instruction file contains a `# Proteum Instructions` section with the full embedded Proteum project instruction corpus.',
131
133
  'Existing content outside `# Proteum Instructions` is preserved. Directories and foreign symlinks are replaced only after confirmation.',
132
134
  ],
@@ -168,11 +170,14 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
168
170
  { description: 'Start the app on its configured router port', command: 'proteum dev' },
169
171
  {
170
172
  description: 'Start a worktree or sibling checkout without changing your shell directory',
171
- command: 'proteum dev --cwd /path/to/platform-worktree --port 3101 --replace-existing',
173
+ command: 'proteum dev --cwd /path/to/platform-worktree --port 3101',
172
174
  },
173
- { description: 'Replace the tracked dev session on another port', command: 'proteum dev --port 3101 --replace-existing' },
174
175
  {
175
176
  description: 'Start a tracked dev session with an explicit session file for an agent task',
177
+ command: 'proteum dev --port 3101 --session-file var/run/proteum/dev/agents/task.json',
178
+ },
179
+ {
180
+ description: 'Restart the exact tracked session file from the current task',
176
181
  command: 'proteum dev --port 3101 --session-file var/run/proteum/dev/agents/task.json --replace-existing',
177
182
  },
178
183
  {
@@ -191,8 +196,9 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
191
196
  notes: [
192
197
  'Use `--cwd` when the target Proteum app lives in another worktree or checkout and you do not want to `cd` first.',
193
198
  'Proteum writes a machine-readable dev session file under `var/run/proteum/dev/<port>.json` by default; override it with `--session-file` when an agent needs a stable path.',
199
+ 'Before registering a new session, Proteum removes stale same-worktree session files and fails fast if another live tracked session remains.',
194
200
  'Before the dev loop starts, Proteum ensures tracked instruction files contain the current managed `# Proteum Instructions` section.',
195
- 'Use `--replace-existing` when retries should stop the previously tracked matching session before starting a new one.',
201
+ 'Use `--replace-existing` only when retrying the exact requested session file.',
196
202
  '`proteum dev list` inspects tracked sessions for the current app root. Add `--stale` to show only orphaned or dead sessions.',
197
203
  '`proteum dev stop` targets the current session file by default. Add `--all` to stop every tracked session for the current app root.',
198
204
  '`proteum dev` clears the interactive terminal once at startup, then shows `CTRL+R` reload and `CTRL+C` shutdown hotkeys in the session banner.',
@@ -310,16 +316,17 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
310
316
  name: 'connect',
311
317
  category: 'Manifest and contracts',
312
318
  summary: 'Inspect connected-project config, cached contracts, and imported controllers.',
313
- usage: 'proteum connect [--controllers] [--json] [--strict]',
319
+ usage: 'proteum connect [--controllers] [--full|--human] [--strict]',
314
320
  bestFor:
315
321
  'Auditing the current app connect setup without manually stitching together refresh, explain, env inspection, and contract checks.',
316
322
  examples: [
317
- { description: 'Print a human-readable connected-project summary', command: 'proteum connect' },
323
+ { description: 'Print a compact connected-project summary', command: 'proteum connect' },
318
324
  { description: 'Include imported connected controllers', command: 'proteum connect --controllers' },
319
- { description: 'Emit machine-readable connect output', command: 'proteum connect --json' },
325
+ { description: 'Emit the full connect payload', command: 'proteum connect --full' },
320
326
  { description: 'Fail when connect diagnostics exist', command: 'proteum connect --strict' },
321
327
  ],
322
328
  notes: [
329
+ 'Default output is compact `proteum-agent-v1` JSON.',
323
330
  'Proteum refreshes generated typings before reading the connect manifest state.',
324
331
  'This command inspects explicit `proteum.config.ts` connected sources and URLs, cached `.proteum/connected/*.json` files, and imported connected controllers.',
325
332
  '`--strict` is intended for CI or framework validation when connected contracts must be present and usable.',
@@ -330,39 +337,49 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
330
337
  name: 'doctor',
331
338
  category: 'Manifest and contracts',
332
339
  summary: 'Inspect the generated Proteum manifest diagnostics.',
333
- usage: 'proteum doctor [--contracts] [--json] [--strict]',
340
+ usage: 'proteum doctor [--contracts] [--full|--human] [--strict]',
334
341
  bestFor:
335
342
  'Auditing manifest warnings and errors, especially in CI or when route/controller generation behaves unexpectedly.',
336
343
  examples: [
337
- { description: 'Print a human-readable diagnostic summary', command: 'proteum doctor' },
344
+ { description: 'Print a compact diagnostic summary', command: 'proteum doctor' },
338
345
  { description: 'Inspect missing generated contracts and source files', command: 'proteum doctor --contracts' },
339
346
  { description: 'Fail if any diagnostics exist', command: 'proteum doctor --strict' },
340
- { description: 'Emit machine-readable diagnostics', command: 'proteum doctor --json' },
347
+ { description: 'Emit the full diagnostic payload', command: 'proteum doctor --full' },
348
+ ],
349
+ notes: [
350
+ 'Default output is compact `proteum-agent-v1` JSON.',
351
+ '`--strict` is intended for CI and pre-release verification.',
352
+ '`--contracts` checks manifest-owned source files and expected generated artifacts on disk.',
341
353
  ],
342
- notes: ['`--strict` is intended for CI and pre-release verification.', '`--contracts` checks manifest-owned source files and expected generated artifacts on disk.'],
343
354
  status: 'stable',
344
355
  },
345
356
  explain: {
346
357
  name: 'explain',
347
358
  category: 'Manifest and contracts',
348
359
  summary: 'Explain the generated Proteum manifest.',
349
- usage: 'proteum explain [owner <query>] [--all|--app|--conventions|--env|--connected|--services|--controllers|--commands|--routes|--layouts|--diagnostics] [--json]',
360
+ usage: 'proteum explain [owner <query>] [--manifest|--full|--human|--all|--app|--conventions|--env|--connected|--services|--controllers|--commands|--routes|--layouts|--diagnostics]',
350
361
  bestFor:
351
- 'Inspecting how source files became generated routes, controllers, commands, layouts, services, and diagnostics without reading compiler internals.',
362
+ 'Inspecting the compact generated-app summary first, then opening selected manifest sections only when needed.',
352
363
  examples: [
353
- { description: 'Show the default human summary', command: 'proteum explain' },
364
+ { description: 'Show the default compact agent summary', command: 'proteum explain' },
354
365
  {
355
- description: 'Inspect generated routes, controllers, and commands together',
366
+ description: 'Summarize generated routes, controllers, and commands together',
356
367
  command: 'proteum explain --routes --controllers --commands',
357
368
  },
358
369
  {
359
- description: 'Inspect configured connected projects and imported controllers',
370
+ description: 'Emit selected route/controller/command arrays only when needed',
371
+ command: 'proteum explain --routes --controllers --commands --full',
372
+ },
373
+ {
374
+ description: 'Summarize configured connected projects and imported controllers',
360
375
  command: 'proteum explain --connected --controllers',
361
376
  },
362
377
  { description: 'Resolve the most likely manifest owner for a path or file', command: 'proteum explain owner /api/Auth/CurrentUser' },
363
- { description: 'Emit the selected manifest sections as JSON', command: 'proteum explain --routes --json' },
378
+ { description: 'Emit the full manifest only when needed', command: 'proteum explain --manifest' },
364
379
  ],
365
380
  notes: [
381
+ 'Default output is compact `proteum-agent-v1` JSON because the CLI is optimized for agents.',
382
+ 'Explicit section flags summarize those sections by default; add `--full` or use `--manifest` for raw manifest arrays.',
366
383
  'Legacy positional section selection remains supported, for example `proteum explain routes services`.',
367
384
  '`proteum explain owner <query>` ranks matching routes, controllers, services, commands, layouts, and diagnostics from the manifest.',
368
385
  'Connected projects are emitted from explicit `proteum.config.ts` `connect.<Namespace>.*` values plus the resolved connected contract.',
@@ -373,17 +390,17 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
373
390
  name: 'orient',
374
391
  category: 'Manifest and contracts',
375
392
  summary: 'Resolve owners, guidance files, connected boundaries, and next steps before opening code.',
376
- usage: 'proteum orient <query> [--port <port>|--url <baseUrl>] [--json]',
393
+ usage: 'proteum orient <query> [--port <port>|--url <baseUrl>] [--full|--human]',
377
394
  bestFor:
378
395
  'Starting multi-repo, generated-artifact, or connected-project work with one explicit orientation step instead of guessing the first files to read.',
379
396
  examples: [
380
397
  { description: 'Orient around a generated controller path', command: 'proteum orient /api/Auth/CurrentUser' },
381
398
  { description: 'Orient around a connected namespace or route', command: 'proteum orient Product.Stats.general' },
382
- { description: 'Use a running dev server when the local manifest is unavailable', command: 'proteum orient /domains --port 3101 --json' },
399
+ { description: 'Use a running dev server when the local manifest is unavailable', command: 'proteum orient /domains --port 3101' },
383
400
  ],
384
401
  notes: [
385
- 'This command combines manifest owner lookup, local or fallback guidance resolution, connected-boundary hints, and three recommended next commands.',
386
- 'Use it before reading source when the query might map to generated code, connected imports, or framework-owned files.',
402
+ 'Default output is compact `proteum-agent-v1` JSON with `mustRead`, triggered instruction files, conditional docs, owner matches, and next commands.',
403
+ 'Use it before reading source when the query might map to generated code, connected imports, framework-owned files, or area instructions.',
387
404
  'When `--port` or `--url` is provided, Proteum can read the manifest from a running dev server instead of only from disk.',
388
405
  ],
389
406
  status: 'experimental',
@@ -392,7 +409,7 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
392
409
  name: 'diagnose',
393
410
  category: 'Manifest and contracts',
394
411
  summary: 'Combine owner lookup, doctor output, contract checks, traces, and server logs into one report.',
395
- usage: 'proteum diagnose [<query>] [--hit <path>] [--method <verb>] [--data-json <json>] [--session-email <email>] [--session-role <role>] [--port <port>|--url <baseUrl>] [--json]',
412
+ usage: 'proteum diagnose [<query>] [--hit <path>] [--method <verb>] [--data-json <json>] [--session-email <email>] [--session-role <role>] [--port <port>|--url <baseUrl>] [--full|--human]',
396
413
  bestFor:
397
414
  'Collapsing the usual explain + doctor + trace + session + server log loop into one structured debugging pass.',
398
415
  examples: [
@@ -401,6 +418,8 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
401
418
  { description: 'Diagnose an API call with a JSON payload', command: 'proteum diagnose /api/Auth/CurrentUser --hit /api/Auth/CurrentUser --method POST --data-json "{}"' },
402
419
  ],
403
420
  notes: [
421
+ 'Default output is compact `proteum-agent-v1` JSON and omits raw request events, payloads, and SQL text.',
422
+ 'Use `--full` only when the compact response says lower-level detail is required.',
404
423
  'This command talks to the running app over the dev-only diagnostics, trace, and session endpoints.',
405
424
  'When `--hit` is omitted, Proteum diagnoses the latest matching request trace if one already exists.',
406
425
  ],
@@ -410,7 +429,7 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
410
429
  name: 'perf',
411
430
  category: 'Manifest and contracts',
412
431
  summary: 'Inspect shared performance rollups built from live request traces on a running Proteum dev server.',
413
- usage: 'proteum perf [top|request <requestId|path>|compare|memory] [--since <window>] [--baseline <window>] [--target <window>] [--group-by <path|route|controller>] [--limit <n>] [--port <port>|--url <baseUrl>] [--json]',
432
+ usage: 'proteum perf [top|request <requestId|path>|compare|memory] [--since <window>] [--baseline <window>] [--target <window>] [--group-by <path|route|controller>] [--limit <n>] [--port <port>|--url <baseUrl>] [--full|--human]',
414
433
  bestFor:
415
434
  'Finding the routes or controllers with the biggest response-time, CPU, SQL, render, and memory impact without manually stitching traces together.',
416
435
  examples: [
@@ -426,17 +445,63 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
426
445
  },
427
446
  ],
428
447
  notes: [
448
+ 'Default output is compact `proteum-agent-v1` JSON with capped rows and next commands.',
429
449
  'Perf data is derived from the same dev-only request trace buffer used by `proteum trace` and the profiler.',
430
450
  'Window values accept `1h`, `6h`, `24h`, `today`, `yesterday`, or an ISO timestamp.',
431
451
  'Older traces captured before the perf runtime metrics were added may not include CPU or memory deltas.',
432
452
  ],
433
453
  status: 'experimental',
434
454
  },
455
+ runtime: {
456
+ name: 'runtime',
457
+ category: 'Manifest and contracts',
458
+ summary: 'Inspect the current app manifest, tracked dev sessions, and runtime health in one compact response.',
459
+ usage: 'proteum runtime status [--session-file <path>] [--full]',
460
+ bestFor:
461
+ 'Reusing a live dev session and avoiding repeated dev-list, manifest, and health-check commands before request diagnostics.',
462
+ examples: [
463
+ { description: 'Resolve the current runtime status', command: 'proteum runtime status' },
464
+ { description: 'Inspect one explicit session file', command: 'proteum runtime status --session-file var/run/proteum/dev/agents/task.json' },
465
+ ],
466
+ notes: [
467
+ 'Default output is compact `proteum-agent-v1` JSON with the selected session, health, and next command.',
468
+ 'When no tracked session exists, the configured router and HMR ports are inspected before suggesting Start Dev.',
469
+ 'If the same app already responds on the configured port, the next action uses or repairs that runtime instead of starting a second server.',
470
+ 'The selected live session includes its dev-hosted MCP URL when available.',
471
+ 'Use this command instead of curling page routes to identify port ownership.',
472
+ 'Use `--full` to include every tracked session field.',
473
+ ],
474
+ status: 'experimental',
475
+ },
476
+ mcp: {
477
+ name: 'mcp',
478
+ category: 'Manifest and contracts',
479
+ summary: 'Start or attach to the machine-scope MCP router for live Proteum dev projects.',
480
+ usage: 'proteum mcp [status|stop] [--stdio|--daemon] [--port <port>]',
481
+ bestFor:
482
+ 'Registering a single MCP server in an LLM and keeping one managed machine daemon available while dev servers run.',
483
+ examples: [
484
+ { description: 'Start or reuse the managed machine MCP daemon from a terminal', command: 'proteum mcp' },
485
+ { description: 'Force stdio MCP transport for an MCP client', command: 'proteum mcp --stdio' },
486
+ { description: 'Inspect the managed machine MCP daemon', command: 'proteum mcp status' },
487
+ ],
488
+ notes: [
489
+ '`proteum dev` ensures one managed machine MCP daemon is running before the app dev loop starts.',
490
+ '`proteum mcp` is a router, not an app dev server. It discovers live `proteum dev` sessions from the machine registry and can resolve offline app candidates from `cwd`.',
491
+ 'Agents should call MCP `workflow_start` with `cwd` or a known `projectId`; use `project_resolve { cwd }` when routing is ambiguous or no live dev server exists yet.',
492
+ 'When an offline app candidate is returned, start exactly one `proteum dev` from that app root before runtime diagnose, trace, or perf reads.',
493
+ 'After an MCP read succeeds, agents should not run the equivalent CLI command or broad owner search for the same runtime state.',
494
+ 'App runtime data still comes from the selected dev-hosted `/__proteum/mcp` endpoint.',
495
+ 'Only one managed machine MCP daemon may run at a time; stale daemon records are cleaned automatically.',
496
+ 'MCP remains read-only and optimized for compact `proteum-mcp-v1` payloads.',
497
+ ],
498
+ status: 'experimental',
499
+ },
435
500
  trace: {
436
501
  name: 'trace',
437
502
  category: 'Manifest and contracts',
438
503
  summary: 'Inspect live in-memory request traces from a running Proteum dev server.',
439
- usage: 'proteum trace [latest|show <requestId>|requests|arm|export <requestId>] [--port <port>|--url <baseUrl>] [--json]',
504
+ usage: 'proteum trace [latest|show <requestId>|requests|arm|export <requestId>] [--port <port>|--url <baseUrl>] [--events|--full|--human]',
440
505
  bestFor:
441
506
  'Debugging route resolution, context creation, SSR payloads, renders, and runtime errors without attaching a debugger.',
442
507
  examples: [
@@ -447,6 +512,8 @@ export const proteumCommands: Record<TProteumCommandName, TProteumCommandDoc> =
447
512
  { description: 'Target a custom dev base URL directly', command: 'proteum trace latest --url http://127.0.0.1:3010' },
448
513
  ],
449
514
  notes: [
515
+ 'Default output is compact `proteum-agent-v1` JSON with counts, errors, hot calls, and hot SQL only.',
516
+ 'Use `--events` or `--full` to print the raw event stream, payload summaries, and SQL text.',
450
517
  'This command talks to the running app over the dev-only `__proteum/trace` HTTP endpoints.',
451
518
  'Traces are stored in a bounded in-memory buffer with payload summarization and sensitive-field redaction.',
452
519
  'Use `--port` when the app is not running on the router port declared in `PORT`, or `--url` when the host itself is non-standard.',
@@ -35,6 +35,7 @@ export const renderDevSession = async ({
35
35
  { label: 'root', value: appRoot },
36
36
  { label: 'router', value: `http://localhost:${routerPort}` },
37
37
  { label: 'hmr', value: `http://localhost:${devEventPort}/__proteum_hmr` },
38
+ { label: 'mcp', value: `http://localhost:${routerPort}/__proteum/mcp` },
38
39
  ...(connectedProjects && connectedProjects.length > 0
39
40
  ? connectedProjects.map((connectedProject) => ({
40
41
  label: `connect ${connectedProject.namespace}`,
@@ -91,6 +92,7 @@ export const renderServerReadyBanner = async ({
91
92
  createElement(Text, { dimColor: true }, `Diagnose /: proteum diagnose / --port ${routerPort}`),
92
93
  createElement(Text, { dimColor: true }, `Perf top: proteum perf top --port ${routerPort}`),
93
94
  createElement(Text, { dimColor: true }, `Trace latest: proteum trace latest --port ${routerPort}`),
95
+ createElement(Text, { dimColor: true }, `MCP: ${publicUrl}/__proteum/mcp`),
94
96
  );
95
97
  });
96
98
 
@@ -174,7 +174,7 @@ export const renderCommandHelp = async ({
174
174
  const notes = [...(command.notes ?? [])];
175
175
 
176
176
  if (commandName === 'init') notes.push(getInitAvailabilityNote(initAvailable));
177
- if (commandName !== 'init' && !isLikelyProteumAppRoot(workdir)) {
177
+ if (commandName !== 'init' && commandName !== 'mcp' && !isLikelyProteumAppRoot(workdir)) {
178
178
  notes.push(
179
179
  'This command expects to run inside a Proteum app root. The current directory does not contain the usual `client/` and `server/` folders.',
180
180
  );