Skip to content

Commit d728d54

Browse files
authored
fix: toast message when copying server entry for a Streamable HTTP transport URL
1 parent ec84e21 commit d728d54

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

client/src/components/Sidebar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,9 @@ const Sidebar = ({
175175
description:
176176
transportType === "stdio"
177177
? "Server configuration has been copied to clipboard. Add this to your mcp.json inside the 'mcpServers' object with your preferred server name."
178-
: "SSE URL has been copied. Use this URL directly in your MCP Client.",
178+
: transportType === "streamable-http"
179+
? "Streamable HTTP URL has been copied. Use this URL directly in your MCP Client."
180+
: "SSE URL has been copied. Use this URL directly in your MCP Client.",
179181
});
180182

181183
setTimeout(() => {

client/src/components/__tests__/Sidebar.test.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,11 @@ describe("Sidebar", () => {
446446
4,
447447
);
448448
expect(mockClipboardWrite).toHaveBeenCalledWith(expectedConfig);
449+
expect(mockToast).toHaveBeenCalledWith({
450+
title: "Config entry copied",
451+
description:
452+
"Server configuration has been copied to clipboard. Add this to your mcp.json inside the 'mcpServers' object with your preferred server name.",
453+
});
449454
});
450455

451456
it("should copy servers file configuration to clipboard for STDIO transport", async () => {
@@ -504,6 +509,11 @@ describe("Sidebar", () => {
504509
4,
505510
);
506511
expect(mockClipboardWrite).toHaveBeenCalledWith(expectedConfig);
512+
expect(mockToast).toHaveBeenCalledWith({
513+
title: "Config entry copied",
514+
description:
515+
"SSE URL has been copied. Use this URL directly in your MCP Client.",
516+
});
507517
});
508518

509519
it("should copy servers file configuration to clipboard for SSE transport", async () => {
@@ -554,6 +564,11 @@ describe("Sidebar", () => {
554564
4,
555565
);
556566
expect(mockClipboardWrite).toHaveBeenCalledWith(expectedConfig);
567+
expect(mockToast).toHaveBeenCalledWith({
568+
title: "Config entry copied",
569+
description:
570+
"Streamable HTTP URL has been copied. Use this URL directly in your MCP Client.",
571+
});
557572
});
558573

559574
it("should copy servers file configuration to clipboard for streamable-http transport", async () => {

0 commit comments

Comments
 (0)