diff --git a/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_discovery.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_discovery.test.tsx
index 4e2456ab7a4..f9a75813bda 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_discovery.test.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_discovery.test.tsx
@@ -110,6 +110,28 @@ describe("MCPDiscovery", () => {
expect(await screen.findByText(/No servers found/)).toBeInTheDocument();
});
+ it("keeps the wide dialog width the antd modal had", async () => {
+ render();
+ await screen.findByText("GitHub");
+
+ const dialog = document.querySelector("[data-slot='dialog-content']");
+ const width = Array.from(dialog?.classList ?? []).filter((c) => c.includes("max-w-"));
+
+ expect(width).toContain("sm:max-w-[1000px]");
+ expect(width).not.toContain("sm:max-w-md");
+ });
+
+ // The close button is absolutely positioned, so it is out of flow and the header
+ // row lays out as if it were not there. Without a reserved margin the custom-server
+ // action sits underneath it. jsdom has no layout engine, so this pins the class.
+ it("keeps the custom-server action clear of the close button", async () => {
+ render();
+ await screen.findByText("GitHub");
+
+ expect(document.querySelector("[data-slot='dialog-close']")).toHaveClass("absolute");
+ expect(screen.getByRole("button", { name: "+ Custom Server" })).toHaveClass("mr-8");
+ });
+
it("does not fetch while hidden", () => {
render();
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_discovery.tsx b/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_discovery.tsx
index b2c181a9112..5094f1a6761 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_discovery.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/mcp_discovery.tsx
@@ -103,14 +103,14 @@ const MCPDiscovery: React.FC = ({
return (