From 38b72e89b63afc06f280a94b3b799fc0374b7042 Mon Sep 17 00:00:00 2001 From: Bryon Nevis Date: Mon, 5 Oct 2026 16:38:33 -0700 Subject: [PATCH] feat: hide the MCP server card when NEXT_PUBLIC_SELFHOSTED is true (#711) The welcome title and the Quick examples heading stay. --- components/chat-example-panel.tsx | 45 ++++++++++++++++--------------- env.example | 1 + 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/components/chat-example-panel.tsx b/components/chat-example-panel.tsx index 4e721292..17e95a76 100644 --- a/components/chat-example-panel.tsx +++ b/components/chat-example-panel.tsx @@ -77,6 +77,7 @@ export default function ExamplePanel({ minimal?: boolean }) { const dict = useDictionary() + const isSelfHosted = process.env.NEXT_PUBLIC_SELFHOSTED === "true" const handleReplicateFlowchart = async () => { setInput("Replicate this flowchart.") @@ -125,29 +126,31 @@ export default function ExamplePanel({
{!minimal && ( <> - {/* MCP Server Notice */} - -
-
- -
-
-
- - {dict.examples.mcpServer} - + {/* MCP Server Notice, hidden on self-hosted deployments */} + {!isSelfHosted && ( + +
+
+ +
+
+
+ + {dict.examples.mcpServer} + +
+

+ {dict.examples.mcpDescription} +

-

- {dict.examples.mcpDescription} -

-
- + + )} {/* Welcome section */}
diff --git a/env.example b/env.example index c30cf78b..3ababdad 100644 --- a/env.example +++ b/env.example @@ -168,6 +168,7 @@ AI_MODEL=global.anthropic.claude-sonnet-4-5-20250929-v1:0 # which triggers the client UI to display messages suggesting self-hosting or sponsorship. # This switch allows self-hosted users to provide custom messages in response to a 429 code, # in messageTokenSelfHosted, messageApiSelfHosted, and tipSelfHosted translation strings. +# It also turns off the MCP server advertisement in the chat examples. # NEXT_PUBLIC_SELFHOSTED=true # Minimax Configuration (Optional)