Skip to content

Commit 5bf2fb4

Browse files
disabled sharing servers (hosted)
1 parent ecf1686 commit 5bf2fb4

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

mcpjam-inspector/client/src/components/connection/ServerConnectionCard.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ function isHostedInsecureHttpServer(server: ServerWithName): boolean {
6666
}
6767
}
6868

69+
// Temporary hide while sandbox sharing replaces server sharing in the main UI.
70+
const SERVER_SHARE_UI_ENABLED = false;
71+
6972
interface ServerConnectionCardProps {
7073
server: ServerWithName;
7174
needsReconnect?: boolean;
@@ -154,6 +157,7 @@ export function ServerConnectionCard({
154157
}
155158
})();
156159
const canShareServer =
160+
SERVER_SHARE_UI_ENABLED &&
157161
HOSTED_MODE &&
158162
!!hostedServerId &&
159163
isAuthenticated &&

mcpjam-inspector/client/src/components/connection/__tests__/ServerConnectionCard.hosted.test.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,28 @@ describe("ServerConnectionCard hosted reconnect guard", () => {
101101
);
102102
expect(onReconnect).not.toHaveBeenCalled();
103103
});
104+
105+
it("hides the share CTA even for share-eligible hosted servers", () => {
106+
const server = createServer({
107+
name: "shareable-server",
108+
connectionStatus: "connected",
109+
config: {
110+
transportType: "streamableHttp",
111+
url: "https://example.com/mcp",
112+
},
113+
});
114+
115+
render(
116+
<ServerConnectionCard
117+
server={server}
118+
hostedServerId="hosted-server-1"
119+
onDisconnect={vi.fn()}
120+
onReconnect={vi.fn().mockResolvedValue(undefined)}
121+
/>,
122+
);
123+
124+
expect(
125+
screen.queryByRole("button", { name: "Share" }),
126+
).not.toBeInTheDocument();
127+
});
104128
});

0 commit comments

Comments
 (0)