Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
feat(mcp): expose complete ChatGPT tool surface
Rahman16860d9f210d
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.mdindex fe858a26..add94c57 100644--- a/docs/ARCHITECTURE.md+++ b/docs/ARCHITECTURE.md@@ -191,7 +191,7 @@ park a visible Approve/Deny card. The complete semantic contract is`lib/mcp/`; access is controlled by the OAuth token scope rather than Alfa approval cards.Capability execution is transport-neutral: `lib/capabilities/` owns shared execution policy, while `lib/mcp/`, `lib/a2a/`, and agent surfaces remain adapters. Guarded filesystem/exec/project operations are exposed through narrow `lib/host/*-api.ts` facades rather than one giant host import surface.-The exact full transport catalog and compact ChatGPT profile are generated from source in [`generated/MCP-CATALOG.md`](./generated/MCP-CATALOG.md). Project function/MCP names remain data behind `project_capabilities`, `project_function_call`, `project_mcp_tools`, and `project_mcp_call`; they never rewrite the global tool prefix. `GET /mcp` reports the live full and ChatGPT signatures.+The exact full transport catalog and ChatGPT model profile are generated from source in [`generated/MCP-CATALOG.md`](./generated/MCP-CATALOG.md). Project function/MCP names remain data behind `project_capabilities`, `project_function_call`, `project_mcp_tools`, and `project_mcp_call`; they never rewrite the global tool prefix. `GET /mcp` reports the live full and ChatGPT signatures.See `docs/MCP.md` for protocol/security internals, `docs/A2A.md` for peer-agent delegation, and `docs/CHATGPT-PLUGIN.md` for theChatGPT-facing setup and diagrams.diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 52ed25e0..2c731e68 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -4,6 +4,12 @@Newest first. `docs/PROGRESS.md` is the source of truth for *why* a change was made;this is the *what*, and it is what Settings → About shows as “What's new”.+## 2026-09-10++**Added**++- `mcp` expose complete ChatGPT tool surface+## 2026-09-09**Added**diff --git a/docs/CHATGPT-PLUGIN.md b/docs/CHATGPT-PLUGIN.mdindex 43458af4..7b04bcd9 100644--- a/docs/CHATGPT-PLUGIN.md+++ b/docs/CHATGPT-PLUGIN.md@@ -8,9 +8,9 @@ The exact current server/toolset identity plus the full MSO and compact ChatGPTBrowser-hosted MCP probes from ChatGPT are allowed only when they target the configured public `OS_PUBLIC_ORIGIN`; arbitrary origins and ChatGPT-origin requests aimed at loopback remain denied. Additional trusted browser hosts can be added explicitly with comma-separated `OS_MCP_BROWSER_ORIGINS`. Public OAuth discovery and DCR responses carry CORS metadata; authenticated `/mcp` echoes only an approved exact origin.-The compact descriptor regression currently measures **67,496 JSON bytes** for the current generated ChatGPT profile (roughly 16.9k tokens at a 4-byte/token estimate), with the largest individual descriptor **2,615 bytes**. CI keeps the profile below 72 KiB and each descriptor below 8 KiB. Bytes are the deterministic contract; token estimates vary by tokenizer.+The full generic descriptor regression currently measures about **95 KiB JSON** for the generated ChatGPT model profile (roughly 23.5k tokens at a 4-byte/token estimate), while each individual descriptor remains below 8 KiB. CI keeps the complete profile below 96 KiB and each descriptor below 8 KiB. Bytes are the deterministic contract; token estimates vary by tokenizer.-## Why ChatGPT gets a compact profile+## Why ChatGPT gets the full generic profileThe full MSO catalog remains available to generic MCP clients. ChatGPT action scanning is different: it freezes names, titles, descriptions, JSON Schemas, safety annotations and security metadata into a cached action snapshot. Sending every internal MSO capability wastes scan/model context and makes refreshes more fragile.@@ -50,7 +50,7 @@ The ChatGPT projection compacts verbose descriptions/schema descriptions without## Exact ChatGPT model tool profile-The exact current ChatGPT profile is generated under **ChatGPT static profile** in [`generated/MCP-CATALOG.md`](./generated/MCP-CATALOG.md). Its source is `CHATGPT_TOOL_NAMES` in `lib/mcp/tool-contract.ts`; CI fails if that profile references a missing global tool. The profile remains fail-closed at both `tools/list` and `tools/call`, while OAuth `read < write < exec` is enforced independently.+The exact current ChatGPT profile is generated under **ChatGPT model profile** in [`generated/MCP-CATALOG.md`](./generated/MCP-CATALOG.md). It automatically projects every MSO-owned generic model/operator tool registered in `lib/mcp/tools.ts`; only the two compatibility bridges marked app-only remain outside model tool calling. Project-owned MCP names still never enter the global catalog. OAuth `read < write < exec` remains enforced independently.The restored Original MSO operator primitives (`sys_*`, `fs_usage` + full bounded filesystem CRUD, `apps_*`, browser power/status, and Dokploy/Cloudflare/Hostinger operations) are again first-class ChatGPT actions. Fresh 3 adds `vps_status`, project snapshot/diff/history/knowledge, private project-agent message/status, connection inventory, and Convex database seams without removing the lower-level primitives. This is intentional: aggregate tools optimize common turns; bounded primitives preserve direct operator control.@@ -104,7 +104,7 @@ Project `.mso/functions.json` remains a separate generic seam: `project_capabiliEach ChatGPT conversation is bound to a separate durable MSO AgentSession using a privacy-safe hash of the host conversation id. Raw ChatGPT conversation ids are not persisted.-The compact profile includes:+The ChatGPT model profile includes:- `local_agents_list`- `local_agent_message_send`@@ -114,7 +114,7 @@ The compact profile includes:`local_agent_inbox(wait_ms=1..20000)` keeps only the current foreground MCP request open, registers the existing in-process Local Agent receiver, and returns early when another same-principal session sends a message. Durable file-backed mailbox state remains authoritative and closes the read→subscribe race. There is no DB, webhook, broker, WebSocket or spawned worker in this path.-A completely idle ChatGPT conversation still cannot be awakened by a remote MCP server. Its durable mail is delivered on its next MCP call. `local_agent_request` and `agent_subagent_run` remain full-catalog worker primitives and are intentionally not part of the compact ChatGPT profile.+A completely idle ChatGPT conversation still cannot be awakened by a remote MCP server. Its durable mail is delivered on its next MCP call. `local_agent_request` and `agent_subagent_run` are part of the ChatGPT model profile; their existing scope, isolation, and server-side authorization rules remain authoritative.## OAuth contractdiff --git a/docs/MCP.md b/docs/MCP.mdindex 61cfce00..e4291eb8 100644--- a/docs/MCP.md+++ b/docs/MCP.md@@ -114,7 +114,7 @@ restarting a daemon does not require handing one over either.`tools/list` is filtered by the token's scope, and `tools/call` re-checks it — aclient that calls a tool it was never shown still gets refused.-**Scope remains the permission boundary, while a client profile may advertise a smaller static catalog for compatibility/context budget.** The ChatGPT profile is fail-closed at both list and call time; it never grants anything the token scope does not already allow. Project-specific capabilities remain dynamic data rather than global names. `lib/host` path/command guards remain authoritative for every operation. Every operational tool carries an OPTIONAL+**Scope remains the permission boundary.** The ChatGPT profile advertises the complete MSO-owned generic model/operator catalog and never grants anything the token scope does not already allow. App-only compatibility bridges remain app-only, and project-specific capabilities remain dynamic data rather than global names. `lib/host` path/command guards remain authoritative for every operation. Every operational tool carries an OPTIONAL`workflow_id`: it correlates steps, it never gates a capability. `lib/mcp/global-tools.test.ts`pins all of this, including that a token's visible list matches its callable set exactly.@@ -154,7 +154,7 @@ The catalog has a stable server version plus a schema-derived toolset signature.Settings → MCP shows the current version/hash/count and stores a browser-local acknowledgement when the operator marks ChatGPT refreshed. A later signature change becomes an explicit stale-snapshot warning. This does not mutate ChatGPT remotely; it makes the required refresh visible instead of relying on memory.-The exact current server/toolset identity, full transport/model counts, compact ChatGPT profile, scope counts and tool names are generated in [`generated/MCP-CATALOG.md`](./generated/MCP-CATALOG.md). `GET /mcp` remains the live deployed authority and additionally exposes schema-derived full/profile hashes. See [`CHATGPT-PLUGIN.md`](./CHATGPT-PLUGIN.md) for ChatGPT-specific behavior.+The exact current server/toolset identity, full transport/model counts, ChatGPT model profile, scope counts and tool names are generated in [`generated/MCP-CATALOG.md`](./generated/MCP-CATALOG.md). `GET /mcp` remains the live deployed authority and additionally exposes schema-derived full/profile hashes. See [`CHATGPT-PLUGIN.md`](./CHATGPT-PLUGIN.md) for ChatGPT-specific behavior.`agent_memory_search` is the typed-memory retrieval surface. It resolves semantic/episodic/procedural claims at an optional point in time, returns confidence/provenance and competing effective claims, and can expose superseded/retracted history when explicitly requested. `agent_memory_remember` remains the write surface and now accepts typed metadata; raw ChatGPT conversation ids are never stored as provenance.@@ -166,7 +166,7 @@ The ChatGPT client profile additionally supplies a DRY output contract for every`toolDescriptor()` is the SSOT normalization layer for every MCP host. It guarantees a human-readable `title`, complete `readOnlyHint` / `destructiveHint` / `openWorldHint` booleans, optional `idempotentHint`, and matching top-level plus `_meta.securitySchemes`. Individual tool declarations may override safety semantics; otherwise conservative MSO defaults are applied from scope/operation class.-The OAuth scope remains the permission boundary. A client profile may expose fewer MSO-owned generic names for compatibility/context budget, and the dispatcher rejects hidden names when called directly. ChatGPT is the first compact profile: it is derived from `CHATGPT_TOOL_NAMES`, independently hashed, and regression-tested for total/per-tool descriptor size. Full MCP clients keep the complete generic catalog.+The OAuth scope remains the permission boundary. ChatGPT now receives the complete MSO-owned generic model/operator catalog; the dispatcher still rejects app-only compatibility bridges and unknown/project-owned global names. The ChatGPT descriptor projection is independently hashed and regression-tested for total/per-tool size. Project-owned MCP capabilities remain dynamic behind the generic project bridge.### RASMIC repo-local orchestration memorydiff --git a/docs/generated/MCP-CATALOG.md b/docs/generated/MCP-CATALOG.mdindex 6ee95b24..c1ac2be7 100644--- a/docs/generated/MCP-CATALOG.md+++ b/docs/generated/MCP-CATALOG.md@@ -1,16 +1,16 @@# Generated MCP catalog-> **Generated file — do not edit manually.** Source of truth: `lib/mcp/tools.ts`, its registered `tools-*` modules, `lib/mcp/toolset.ts`, and the compact ChatGPT name set in `lib/mcp/tool-contract.ts`. Regenerate with `node scripts/gen-mcp-catalog.mjs`. The live deployed authority remains `GET /mcp`.+> **Generated file — do not edit manually.** Source of truth: `lib/mcp/tools.ts`, its registered `tools-*` modules, `lib/mcp/toolset.ts`, and the ChatGPT app-only exclusions in `lib/mcp/tool-contract.ts`. Regenerate with `node scripts/gen-mcp-catalog.mjs`. The live deployed authority remains `GET /mcp`.## Full MSO catalog-<!-- mcp-toolset: server=1.12.3 version=2026.09.09.1 tools=97 read=47 write=30 exec=20 -->+<!-- mcp-toolset: server=1.12.3 version=2026.09.10.1 tools=97 read=47 write=30 exec=20 -->| Fact | Current source value ||---|---:|| MCP server | `1.12.3` |-| Toolset | `2026.09.09.1` |-| Toolset changed at | `2026-09-09T05:55:00Z` |+| Toolset | `2026.09.10.1` |+| Toolset changed at | `2026-09-10T02:40:00Z` || Transport tools | **99** || Model/operator tools | **97** || Read | **47** |@@ -129,29 +129,37 @@- `render_mso_surface`- `workflow_status`-## ChatGPT static profile+## ChatGPT model profile-<!-- mcp-chatgpt-profile: server=1.12.3 version=2026.09.09.1 tools=71 read=37 write=21 exec=13 app-only=2 total=73 -->+<!-- mcp-chatgpt-profile: server=1.12.3 version=2026.09.10.1 tools=97 read=47 write=30 exec=20 app-only=2 total=99 -->-The ChatGPT profile is a fail-closed static projection defined by `CHATGPT_TOOL_NAMES`. OAuth scope is still enforced independently; project-owned MCP tool names remain dynamic data behind the generic project bridge.+The ChatGPT profile automatically projects the complete MSO-owned generic model/operator catalog. OAuth scope is still enforced independently; app-only compatibility bridges stay app-only, and project-owned MCP tool names remain dynamic data behind the generic project bridge.| Fact | Current source value ||---|---:|-| ChatGPT transport tools | **73** |-| ChatGPT model/operator tools | **71** |-| Read | **37** |-| Write | **21** |-| Exec | **13** |+| ChatGPT transport tools | **99** |+| ChatGPT model/operator tools | **97** |+| Read | **47** |+| Write | **30** |+| Exec | **20** || App-only bridges | **2** |-### ChatGPT read (37)+### ChatGPT read (47)+- `a2a_agent_discover`+- `a2a_agents_list`+- `a2a_task_get`+- `agent_memory_read`+- `agent_memory_search`- `agent_session_current`+- `agent_session_resume`+- `agent_sessions_list`- `apps_list`- `apps_logs`- `browser_status`- `cloudflare_zones_list`- `connections_list`+- `dokploy_applications_list`- `dokploy_projects_list`- `exec_job_status`- `fs_list`@@ -171,6 +179,7 @@ The ChatGPT profile is a fail-closed static projection defined by `CHATGPT_TOOL_- `project_diff`- `project_get`- `project_knowledge_get`+- `project_memory_search`- `projects_list`- `read_pipeline`- `render_mso_block`@@ -182,13 +191,20 @@ The ChatGPT profile is a fail-closed static projection defined by `CHATGPT_TOOL_- `skills_search`- `sys_processes`- `sys_stats`+- `tool_forge_candidates`- `vps_status`-### ChatGPT write (21)+### ChatGPT write (30)+- `a2a_agent_register`+- `a2a_agent_remove`+- `agent_memory_forget`+- `agent_memory_remember`+- `agent_session_note`- `agent_session_rename`- `apps_power`- `cloudflare_dns_upsert`+- `dokploy_application_public_env_upsert`- `dokploy_project_ensure`- `fs_copy`- `fs_delete`@@ -202,19 +218,27 @@ The ChatGPT profile is a fail-closed static projection defined by `CHATGPT_TOOL_- `local_agent_message_send`- `local_agent_reply`- `project_knowledge_set`+- `project_memory_upsert`+- `project_script_run`- `session_artifact_register`- `session_artifacts_cleanup`+- `tool_forge_propose`- `workflow_cancel`- `workflow_finish`- `workflow_start`-### ChatGPT exec (13)+### ChatGPT exec (20)+- `a2a_handoff`+- `a2a_message_send`+- `a2a_task_cancel`+- `agent_subagent_run`- `browser_power`- `exec_job_cancel`- `exec_job_start`- `exec_run`- `integration_execute`+- `local_agent_request`- `project_agent_run`- `project_database_call`- `project_database_query`@@ -223,6 +247,8 @@ The ChatGPT profile is a fail-closed static projection defined by `CHATGPT_TOOL_- `project_function_call`- `project_mcp_call`- `project_mcp_tools`+- `tool_forge_evaluate`+- `tool_forge_promote`### ChatGPT app-only bridges (2)diff --git a/docs/integrations/CHATGPT-UI.md b/docs/integrations/CHATGPT-UI.mdindex e1e3893e..98eb8021 100644--- a/docs/integrations/CHATGPT-UI.md+++ b/docs/integrations/CHATGPT-UI.md@@ -75,7 +75,7 @@ The canonical `resources/list` response advertises only Block and Page. Previous4. Sandboxed Pages use the standard `tools/call` bridge for native data refreshes. ChatGPT-only helpers such as display mode, private widget state, follow-up messages, and `openExternal` are feature-detected.5. The dedicated UI origin is deployment-derived: explicit `OS_MCP_UI_ORIGIN` wins; otherwise an `mso.<domain>` public origin derives `mso-ui.<domain>`, and other safe public origins are reused. Standard CSP fields live only in `_meta.ui.csp`; the legacy `openai/widgetCSP` object retains only `redirect_domains` for `Open in MSO`.-Current ChatGPT transport profile: **66 tools** — 64 model-visible actions (35 read / 17 write / 12 exec) plus app-only `workflow_status` and `render_mso_surface`. The full transport catalog has 90 tools. Exactly two tools bind UI resources: `render_mso_block` and `render_mso_page`.+Current ChatGPT model profile is source-generated from the complete MSO-owned generic model/operator catalog; exact counts live in [`../generated/MCP-CATALOG.md`](../generated/MCP-CATALOG.md). `workflow_status` and `render_mso_surface` remain app-only compatibility bridges. Exactly two model tools bind UI resources: `render_mso_block` and `render_mso_page`.## Source boundariesdiff --git a/docs/reference/WORKSPACE-GUIDE.md b/docs/reference/WORKSPACE-GUIDE.mdindex c93c2f36..8feee9af 100644--- a/docs/reference/WORKSPACE-GUIDE.md+++ b/docs/reference/WORKSPACE-GUIDE.md@@ -66,7 +66,7 @@ CLI, and optional MCP interface use the same guarded host capabilities.- **Use Alfa Cockpit** — the in-browser assistant now surfaces selected high-value MSO runtime context at the point of execution: active provider/model, searchable project context, trusted host Skills, typed-memory status, native agent sessions, same-principal local-agent presence, pending approvals, and one Activity & Runs timeline. The Cockpit intentionally does **not** claim full CLI parity; credentials/server wiring stay in Settings and dangerous actions still use Alfa's existing approval cards. The same read-model is scriptable as `mso cockpit [project]` / `mso cockpit search <query>`, so the UI does not own a parallel project/session/memory implementation.- **Run saved Automations for real** — browser-local automation recipes now re-enter Alfa's normal tool loop instead of only narrating their steps. Reads execute through the existing host bindings; write/exec steps keep the same per-call human approval gate. Playbook starter prompts also appear as bounded quick actions in an empty chat.- **Automate deployment providers without handing tokens to the model** — Dokploy and Cloudflare are built-in feature apps; `mso provider` also supports Hostinger DNS. Secrets stay in owner-only MSO state while bounded provider tools perform live checks and approved deployment/DNS operations. See [docs/INFRASTRUCTURE-PROVIDERS.md](../INFRASTRUCTURE-PROVIDERS.md).-- **Drive the box from ChatGPT, Codex, Claude Code, Cursor, Gemini CLI or VS Code** — MSO exposes one generic OAuth MCP server. ChatGPT gets a source-generated compact static profile with complete title/safety/security metadata, resource-bound OAuth + rotating refresh tokens, while other MCP clients can use the full catalog. Exact current counts and hashes live in [the generated MCP catalog](../generated/MCP-CATALOG.md) so this README does not freeze a stale scanner count. Project-owned MCP tool names never enter the global list: discover/call them dynamically through the generic `project_mcp_tools` / `project_mcp_call` seam. See the [ChatGPT custom MCP guide](../CHATGPT-PLUGIN.md) and [MCP reference](../MCP.md).+- **Drive the box from ChatGPT, Codex, Claude Code, Cursor, Gemini CLI or VS Code** — MSO exposes one generic OAuth MCP server. ChatGPT gets the complete source-generated MSO-owned generic model/operator profile with complete title/safety/security metadata and resource-bound OAuth + rotating refresh tokens; app-only bridges stay app-only and project-owned MCP names stay dynamic. Exact current counts and hashes live in [the generated MCP catalog](../generated/MCP-CATALOG.md) so this README does not freeze a stale scanner count. Project-owned MCP tool names never enter the global list: discover/call them dynamically through the generic `project_mcp_tools` / `project_mcp_call` seam. See the [ChatGPT custom MCP guide](../CHATGPT-PLUGIN.md) and [MCP reference](../MCP.md).- **Message live local sessions by a short name** — every durable same-principal MSO session gets a unique familiar handle such as `@milo`, `@luna`, or `@nara`, independent from its longer auto-generated session title. `/rename <name>` changes that handle, while `/title <text>` changes the session description. `@milo …` resolves only agents with a current lease **and** a live receiver subscription, then creates an explicitly correlated request; replies relay deterministically into the originating conversation while notify-only events remain passive. Presence lease (`idle`/`busy`/`offline`) and receiver subscription (`consumerConnected`) are reported separately so an idle-but-unsubscribed target is diagnosable. For ChatGPT/MCP sessions, `local_agent_inbox(wait_ms=...)` temporarily turns the foreground MCP call into that live receiver for up to 20 seconds, enabling direct two-way session messaging without a worker, DB, webhook, or broker. See [Local Agents](../LOCAL-AGENTS.md).- **Spawn focused same-session subagents** — `/spawn` and `agent_subagent_run` create bounded foreground workers with isolated context, explicit delegated scope, turn/timeout caps, no recursive spawn, and final-result-only return. They are not Local Agent peers and do not run autonomously after the parent call returns. See [Subagents](../SUBAGENTS.md).- **Delegate between remote agents with standard A2A v1** — register public HTTPS peers, attach private API-key/Bearer/OAuth access-token profiles, stream remote tasks over SSE, or expose MSO's authenticated inbound Agent Card when a public HTTPS origin is configured. Inbound credentials are owner-minted `read | write | exec` capabilities and run in a memory-isolated task context. See [A2A](../A2A.md).diff --git a/lib/mcp/chatgpt-profile.test.ts b/lib/mcp/chatgpt-profile.test.tsindex d19e005b..ebd97278 100644--- a/lib/mcp/chatgpt-profile.test.ts+++ b/lib/mcp/chatgpt-profile.test.ts@@ -2,16 +2,18 @@ import { describe, expect, it, vi } from "vitest";vi.mock("server-only", () => ({}));const { dispatch } = await import("./dispatch");-const { CHATGPT_TOOL_NAMES } = await import("./tool-contract");+const { CHATGPT_APP_ONLY_TOOL_NAMES } = await import("./tool-contract");+const { TOOLS } = await import("./tools");const context = { principal: "mcp-client:chatgpt-test", sessionId: "session-profile", toolProfile: "chatgpt" as const };-describe("ChatGPT compact MCP profile", () => {- it("advertises only MSO-owned generic tools with complete OpenAI metadata and scanner headroom", async () => {+describe("ChatGPT full generic MCP profile", () => {+ it("advertises every MSO-owned generic model tool with complete OpenAI metadata and bounded scanner size", async () => {const response = await dispatch({ id: 1, method: "tools/list" }, "exec", "test", context);const tools = (response.result as { tools: Array<Record<string, unknown>> }).tools;- expect(tools.map((tool) => tool.name).sort()).toEqual([...CHATGPT_TOOL_NAMES].sort());- expect(tools).toHaveLength(CHATGPT_TOOL_NAMES.size);+ const expected = TOOLS.map((tool) => tool.name).sort();+ expect(tools.map((tool) => tool.name).sort()).toEqual(expected);+ expect(tools).toHaveLength(expected.length);for (const tool of tools) {expect(typeof tool.title, String(tool.name)).toBe("string");@@ -30,10 +32,17 @@ describe("ChatGPT compact MCP profile", () => {const bytes = Buffer.byteLength(JSON.stringify(tools));if (process.env.MSO_PROFILE_METRICS === "1") console.info(`CHATGPT_PROFILE_METRICS tools=${tools.length} bytes=${bytes} roughTokens4=${Math.ceil(bytes/4)} maxToolBytes=${Math.max(...tools.map((tool)=>Buffer.byteLength(JSON.stringify(tool))))}`);- expect(bytes).toBeLessThan(72 * 1024);+ expect(bytes).toBeLessThan(96 * 1024);expect(tools.some((tool) => tool.name === "local_agent_inbox")).toBe(true);expect(tools.some((tool) => tool.name === "project_mcp_tools")).toBe(true);expect(tools.some((tool) => tool.name === "project_mcp_call")).toBe(true);+ expect(tools.some((tool) => tool.name === "tool_forge_promote")).toBe(true);+ expect(tools.some((tool) => tool.name === "a2a_handoff")).toBe(true);+ expect(tools.some((tool) => tool.name === "project_memory_upsert")).toBe(true);+ for (const name of CHATGPT_APP_ONLY_TOOL_NAMES) {+ const tool = tools.find((entry) => entry.name === name) as { _meta?: { ui?: { visibility?: string[] } } } | undefined;+ expect(tool?._meta?.ui?.visibility, name).toEqual(["app"]);+ }const pipeline = tools.find((tool) => tool.name === "read_pipeline") as { inputSchema?: { properties?: { calls?: { items?: { properties?: { transform?: { properties?: { where?: { items?: { properties?: { value?: unknown } } } } } } } } } } } | undefined;expect(pipeline?.inputSchema?.properties?.calls?.items?.properties?.transform?.properties?.where?.items?.properties?.value).toEqual({anyOf: [{ type: "string", maxLength: 2048 }, { type: "number" }, { type: "boolean" }, { type: "null" }],@@ -41,8 +50,10 @@ describe("ChatGPT compact MCP profile", () => {expect(tools.some((tool) => String(tool.name) === "private_echo" || String(tool.name).startsWith("project_fixture_"))).toBe(false);});- it("fails closed when a compact-profile client guesses a full-catalog tool", async () => {- const result = await dispatch({ id: 2, method: "tools/call", params: { name: "tool_forge_promote", arguments: { id: "candidate-hidden" } } }, "exec", "test", context);- expect(result.error).toMatchObject({ code: -32602 });+ it("keeps unknown/project-owned global names out while app-only bridges remain callable by the app", async () => {+ for (const name of ["private_echo", "project_fixture_secret_tool"]) {+ const result = await dispatch({ id: 2, method: "tools/call", params: { name, arguments: {} } }, "exec", "test", context);+ expect(result.error, name).toMatchObject({ code: -32602 });+ }});});diff --git a/lib/mcp/tool-contract.ts b/lib/mcp/tool-contract.tsindex efa110fe..5840d0fe 100644--- a/lib/mcp/tool-contract.ts+++ b/lib/mcp/tool-contract.ts@@ -30,34 +30,13 @@ export function outputSchemaForProfile(tool: McpTool, profile: McpToolProfile =return tool.outputSchema ?? (profile === "chatgpt" ? CHATGPT_RESULT_OUTPUT_SCHEMA : undefined);}-// ChatGPT scans a frozen descriptor snapshot. Keep that public snapshot deliberately-// small; every name here is an MSO-owned generic primitive. Project-owned MCP tool-// names are discovered/called dynamically through project_mcp_* and NEVER appended-// to this list or TOOLS.-export const CHATGPT_TOOL_NAMES = new Set([- // Workflow/session intelligence. workflow_status and render_mso_surface stay app-only at presentation time.- "workflow_start", "workflow_status", "workflow_finish", "workflow_cancel",- "skills_search", "skills_list", "skills_read", "read_pipeline",- "agent_session_current", "agent_session_rename", "session_artifacts", "session_artifact_register", "session_artifacts_cleanup",- "local_agents_list", "local_agent_inbox", "local_agent_message_send", "local_agent_reply", "local_agent_request_wait",-- // Project-first operator surface. Project-owned names remain dynamic.- "projects_list", "project_get", "project_changes_list", "project_diff", "project_capabilities",- "project_knowledge_get", "project_knowledge_set", "connections_list", "project_agent_run", "project_agent_status",- "project_mcp_tools", "project_mcp_call", "project_function_call",- "project_database_status", "project_database_tools", "project_database_call", "project_database_query",-- // Original MSO bounded VPS/file/application/browser power restored to ChatGPT.- "vps_status", "mso_surface_apps_list", "render_mso_block", "render_mso_page", "render_mso_surface", "screen_capture", "fs_list", "fs_read", "fs_search", "fs_usage",- "fs_write", "fs_upload_file", "fs_mkdir", "fs_move", "fs_copy", "fs_delete",- "sys_stats", "sys_processes", "apps_list", "apps_logs", "apps_power", "browser_status", "browser_power",-- // Infrastructure operations remain explicit and bounded; secrets stay server-side.- "integration_query", "integration_manage", "integration_execute", "integration_setup_open", "infra_providers_list", "infra_provider_doctor", "dokploy_projects_list", "dokploy_project_ensure",- "cloudflare_zones_list", "cloudflare_dns_upsert", "hostinger_dns_upsert",-- // Arbitrary shell is still a last-resort escape hatch and long builds remain job-bound.- "exec_run", "exec_job_start", "exec_job_status", "exec_job_cancel",+// ChatGPT should expose the complete MSO-owned generic model/operator catalog.+// Project-owned MCP tool names are never appended to TOOLS; they remain dynamic+// behind project_mcp_tools/project_mcp_call. These two compatibility bridges are+// UI-only and therefore intentionally excluded from model tool calling.+export const CHATGPT_APP_ONLY_TOOL_NAMES = new Set([+ "workflow_status",+ "render_mso_surface",] as const);const TITLES: Record<string, string> = {@@ -111,8 +90,8 @@ export function toolSecuritySchemes(tool: McpTool): McpSecurityScheme[] {return tool.securitySchemes ?? [{ type: "oauth2", scopes: [tool.scope] }];}-export function toolAllowedForProfile(name: string, profile: McpToolProfile = "full"): boolean {- return profile === "full" || CHATGPT_TOOL_NAMES.has(name as never);+export function toolAllowedForProfile(_name: string, _profile: McpToolProfile = "full"): boolean {+ return true;}function compactText(value: string, max = 125): string {diff --git a/lib/mcp/toolset.ts b/lib/mcp/toolset.tsindex 15464cf2..33736f6a 100644--- a/lib/mcp/toolset.ts+++ b/lib/mcp/toolset.ts@@ -4,8 +4,8 @@ import type { McpTool } from "./tool-kit";import { toolDescriptor, type McpToolProfile } from "./tool-contract";export const MCP_SERVER_VERSION = "1.12.3";-export const MCP_TOOLSET_VERSION = "2026.09.09.1";-export const MCP_TOOLSET_CHANGED_AT = "2026-09-09T05:55:00Z";+export const MCP_TOOLSET_VERSION = "2026.09.10.1";+export const MCP_TOOLSET_CHANGED_AT = "2026-09-10T02:40:00Z";export type McpToolsetInfo = {serverVersion: string;diff --git a/scripts/check-docs.mjs b/scripts/check-docs.mjsindex 683d9dbb..d38e5c27 100755--- a/scripts/check-docs.mjs+++ b/scripts/check-docs.mjs@@ -9,11 +9,12 @@ const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");const fail = [];const read = (p) => readFileSync(join(ROOT, p), "utf8");-// --- MCP catalog: one generated SSOT for the full server + compact ChatGPT profile.+// --- MCP catalog: one generated SSOT for the full server + ChatGPT model profile.const catalog = collectMcpCatalog(ROOT);for (const name of catalog.orphanModules) fail.push(`lib/mcp/${name}: tool module exists but is not reachable from lib/mcp/tools.ts`);for (const name of catalog.missingModules) fail.push(`lib/mcp/${name}: imported tool module is missing`);for (const name of catalog.profileMissing) fail.push(`lib/mcp/tool-contract.ts: ChatGPT profile references missing MCP tool ${name}`);+for (const name of catalog.appOnlyMissing) fail.push(`lib/mcp/tool-contract.ts: ChatGPT app-only profile references missing MCP tool ${name}`);const appUiDoc = read("docs/integrations/CHATGPT-UI.md");for (const name of catalog.appOnly) {diff --git a/scripts/gen-mcp-catalog.mjs b/scripts/gen-mcp-catalog.mjsindex c83ec29a..8ea2c655 100755--- a/scripts/gen-mcp-catalog.mjs+++ b/scripts/gen-mcp-catalog.mjs@@ -11,6 +11,7 @@ const errors = [...catalog.orphanModules.map((name) => `orphan MCP tool module: lib/mcp/${name}`),...catalog.missingModules.map((name) => `missing MCP tool module: lib/mcp/${name}`),...catalog.profileMissing.map((name) => `ChatGPT profile references missing MCP tool: ${name}`),+ ...catalog.appOnlyMissing.map((name) => `ChatGPT app-only profile references missing MCP tool: ${name}`),];if (errors.length) { for (const error of errors) console.error(error); process.exit(1); }const expected = renderMcpCatalogMarkdown(catalog);diff --git a/scripts/lib/mcp-catalog.mjs b/scripts/lib/mcp-catalog.mjsindex c06a17ce..36abc091 100644--- a/scripts/lib/mcp-catalog.mjs+++ b/scripts/lib/mcp-catalog.mjs@@ -1,7 +1,6 @@import { readFileSync, readdirSync } from "node:fs";import { join } from "node:path";-export const APP_ONLY_MCP_TOOLS = new Set(["workflow_status", "render_mso_surface"]);const TOOL_MODULE_NAME = /^tools-[A-Za-z0-9-]+\.ts$/;const SCOPES = ["read", "write", "exec"];@@ -43,16 +42,22 @@ export function collectMcpCatalog(root) {for (const match of text.matchAll(/name:\s*"([^"]+)"[\s\S]*?scope:\s*"(read|write|exec)"/g)) all.set(match[1], match[2]);}- const appOnly = [...APP_ONLY_MCP_TOOLS].filter((name) => all.has(name)).sort();- const model = [...all].filter(([name]) => !APP_ONLY_MCP_TOOLS.has(name));+ const toolContract = read("lib/mcp/tool-contract.ts");+ const appOnlyBlock = /CHATGPT_APP_ONLY_TOOL_NAMES\s*=\s*new Set\(\[([\s\S]*?)\]\s*as const\)/.exec(toolContract)?.[1] ?? "";+ const appOnlyNames = [...appOnlyBlock.matchAll(/"([^"]+)"/g)].map((match) => match[1]);+ const appOnlySet = new Set(appOnlyNames);+ const appOnlyMissing = appOnlyNames.filter((name) => !all.has(name));+ const appOnly = appOnlyNames.filter((name) => all.has(name)).sort();+ const model = [...all].filter(([name]) => !appOnlySet.has(name));const byScope = splitByScope(model);- const toolContract = read("lib/mcp/tool-contract.ts");- const profileBlock = /CHATGPT_TOOL_NAMES\s*=\s*new Set\(\[([\s\S]*?)\]\s*as const\)/.exec(toolContract)?.[1] ?? "";- const chatgptNames = [...profileBlock.matchAll(/"([^"]+)"/g)].map((match) => match[1]);- const profileMissing = chatgptNames.filter((name) => !all.has(name));- const chatgptAppOnly = chatgptNames.filter((name) => APP_ONLY_MCP_TOOLS.has(name) && all.has(name)).sort();- const chatgptModel = chatgptNames.filter((name) => !APP_ONLY_MCP_TOOLS.has(name) && all.has(name)).map((name) => [name, all.get(name)]);+ // ChatGPT receives the complete MSO-owned generic model/operator catalog.+ // The two compatibility bridges remain app-only and project-owned MCP names+ // remain dynamic behind project_mcp_tools/project_mcp_call.+ const chatgptNames = [...all.keys()];+ const profileMissing = [];+ const chatgptAppOnly = [...appOnly];+ const chatgptModel = [...model];const chatgptByScope = splitByScope(chatgptModel);return {@@ -69,7 +74,7 @@ export function collectMcpCatalog(root) {modelCount: chatgptModel.length,counts: countsFor(chatgptByScope),},- orphanModules, missingModules, profileMissing,+ orphanModules, missingModules, profileMissing, appOnlyMissing,};}@@ -78,7 +83,7 @@ export function renderMcpCatalogMarkdown(catalog) {const c = catalog.chatgpt;return `# Generated MCP catalog-> **Generated file — do not edit manually.** Source of truth: \`lib/mcp/tools.ts\`, its registered \`tools-*\` modules, \`lib/mcp/toolset.ts\`, and the compact ChatGPT name set in \`lib/mcp/tool-contract.ts\`. Regenerate with \`node scripts/gen-mcp-catalog.mjs\`. The live deployed authority remains \`GET /mcp\`.+> **Generated file — do not edit manually.** Source of truth: \`lib/mcp/tools.ts\`, its registered \`tools-*\` modules, \`lib/mcp/toolset.ts\`, and the ChatGPT app-only exclusions in \`lib/mcp/tool-contract.ts\`. Regenerate with \`node scripts/gen-mcp-catalog.mjs\`. The live deployed authority remains \`GET /mcp\`.## Full MSO catalog@@ -112,11 +117,11 @@ ${list(catalog.byScope.exec)}${list(catalog.appOnly)}-## ChatGPT static profile+## ChatGPT model profile<!-- mcp-chatgpt-profile: server=${catalog.serverVersion} version=${catalog.version} tools=${c.modelCount} read=${c.counts.read} write=${c.counts.write} exec=${c.counts.exec} app-only=${c.appOnly.length} total=${c.transportCount} -->-The ChatGPT profile is a fail-closed static projection defined by \`CHATGPT_TOOL_NAMES\`. OAuth scope is still enforced independently; project-owned MCP tool names remain dynamic data behind the generic project bridge.+The ChatGPT profile automatically projects the complete MSO-owned generic model/operator catalog. OAuth scope is still enforced independently; app-only compatibility bridges stay app-only, and project-owned MCP tool names remain dynamic data behind the generic project bridge.| Fact | Current source value ||---|---:|