Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): copy an environment's MCP URL for outside agents #16337

Mergedjuliusmarmingemerged 6 commits intot3code/mcp/oauth-sign-in fromt3code/mcp/copy-mcp-urlmerged by juliusmarminge View on GitHub

Showing 4 changed files with 87 additions and 0 deletions (loading 1).

x
0 of 4 viewed, 4 left
37 additions and 0 deletionsapps/web/src/components/settings/ConnectionsSettings.tsxModified
View file
@@ -48,6 +48,7 @@
RelayConnectionTarget,
connectionRoutes,
connectionStatusText,
+ environmentMcpUrl,
} from "@t3tools/client-runtime/connection";
import {
isAtomCommandInterrupted,
@@ -1526,6 +1527,25 @@
[copyTraceIdToClipboard],
+ const { copyToClipboard: copyMcpUrl } = useCopyToClipboard<{ url: string }>({
+ target: "MCP URL",
+ onCopy: ({ url }) => {
+ toastManager.add({
+ type: "success",
+ title: "MCP URL copied",
+ description: `Add it to an agent, e.g. claude mcp add --transport http t3 ${url}`,
+ });
+ },
+ onError: (error) => {
+ toastManager.add(
+ stackedThreadToast({
+ type: "error",
+ title: "Could not copy MCP URL",
+ description: error.message,
+ }),
+ );