From 174f923f1dd362da2bd030b9ef5d39a051b614cd Mon Sep 17 00:00:00 2001 From: chitcommit <208086304+chitcommit@users.noreply.github.com> Date: Sun, 17 May 2026 06:53:05 +0000 Subject: [PATCH 1/2] =?UTF-8?q?chore(chatgpt-mcp):=20add=20Deprecation/Sun?= =?UTF-8?q?set=20headers=20=E2=80=94=20retire=20to=20mcp.chitty.cc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The /chatgpt/mcp route inside chittyconnect duplicates capability that belongs at the canonical mcp.chitty.cc aggregator. ChatGPT MCP doesn't require a unique hostname or carve-out — the OpenAI spec only needs a valid OAuth issuer + MCP transport, both already on mcp.chitty.cc with unified audit. Emit standard deprecation signals (RFC 8594) on every response: Deprecation: true Sunset: Sat, 15 Aug 2026 00:00:00 GMT Link: ; rel="successor-version", ; rel="alternate" After sunset, the McpConnectAgent + the /chatgpt/mcp route + the api/routes/chatgpt-mcp.js handler should be removed from chittyconnect. Companion PR: chittyos/chittymcp#66 (mcp-chatgpt.chitty.cc gateway). Co-Authored-By: Claude Opus 4.7 (1M context) --- src/api/routes/chatgpt-mcp.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/api/routes/chatgpt-mcp.js b/src/api/routes/chatgpt-mcp.js index cf84051..66bcb79 100644 --- a/src/api/routes/chatgpt-mcp.js +++ b/src/api/routes/chatgpt-mcp.js @@ -23,6 +23,20 @@ const mcpHandler = McpConnectAgent.serve("/chatgpt/mcp", { binding: "MCP_AGENT", }); +// Deprecation headers — this route is being retired in favor of the canonical +// mcp.chitty.cc aggregator. ChatGPT clients should re-register against +// https://mcp.chitty.cc/ (unified OAuth, same scopes, same tools, unified audit). +// Sunset window: 2026-08-15. +chatgptMcp.use("*", async (c, next) => { + await next(); + c.header("Deprecation", "true"); + c.header("Sunset", "Sat, 15 Aug 2026 00:00:00 GMT"); + c.header( + "Link", + '; rel="successor-version", ; rel="alternate"', + ); +}); + /** * Authentication middleware. * Extracts bearer token or API key. Validation is deferred to the DO layer From 922b05552dd4fbfb1e12bba532f39dfc868c1bfa Mon Sep 17 00:00:00 2001 From: chitcommit <208086304+chitcommit@users.noreply.github.com> Date: Tue, 16 Jun 2026 17:04:01 +0000 Subject: [PATCH 2/2] fix(chatgpt-mcp): rebuild response for headers + RFC 9745 Deprecation date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address PR #195 review: - P1: clone the Response before setting deprecation headers — the downstream MCP handler returns a streamed/immutable Response and in-place header mutation can throw. - P2: Deprecation header now uses RFC 9745 structured-field Date (@unix-seconds) instead of the legacy boolean "true". Co-Authored-By: Claude Opus 4.8 (1M context) --- src/api/routes/chatgpt-mcp.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/api/routes/chatgpt-mcp.js b/src/api/routes/chatgpt-mcp.js index 66bcb79..29a3b1d 100644 --- a/src/api/routes/chatgpt-mcp.js +++ b/src/api/routes/chatgpt-mcp.js @@ -29,12 +29,20 @@ const mcpHandler = McpConnectAgent.serve("/chatgpt/mcp", { // Sunset window: 2026-08-15. chatgptMcp.use("*", async (c, next) => { await next(); - c.header("Deprecation", "true"); - c.header("Sunset", "Sat, 15 Aug 2026 00:00:00 GMT"); - c.header( + // The downstream MCP handler returns a streamed Response (SSE) whose headers + // are immutable; mutating c.res.headers in place can throw. Rebuild the + // Response so deprecation headers attach cleanly without buffering the body. + const res = new Response(c.res.body, c.res); + // RFC 9745: Deprecation is a structured-field Date (@), not a + // boolean. @1778976000 = 2026-05-17T00:00:00Z, the date this route entered + // deprecation. + res.headers.set("Deprecation", "@1778976000"); + res.headers.set("Sunset", "Sat, 15 Aug 2026 00:00:00 GMT"); + res.headers.set( "Link", '; rel="successor-version", ; rel="alternate"', ); + c.res = res; }); /**