diff --git a/mcpjam-inspector/client/public/mcp_jam_2row.png b/mcpjam-inspector/client/public/mcp_jam_2row.png new file mode 100644 index 000000000..40fa84635 Binary files /dev/null and b/mcpjam-inspector/client/public/mcp_jam_2row.png differ diff --git a/mcpjam-inspector/client/src/lib/oauth/__tests__/client-metadata.test.ts b/mcpjam-inspector/client/src/lib/oauth/__tests__/client-metadata.test.ts new file mode 100644 index 000000000..48fbfa60f --- /dev/null +++ b/mcpjam-inspector/client/src/lib/oauth/__tests__/client-metadata.test.ts @@ -0,0 +1,44 @@ +/** + * Tests that OAuth client metadata includes logo_uri for branding + * during OAuth consent flows (issue #1552). + */ + +import { describe, it, expect, vi, beforeEach } from "vitest"; + +// Mock browser dependencies used by the providers +vi.mock("@/lib/session-token", () => ({ + authFetch: vi.fn(), +})); + +vi.mock("../state-machines/shared/helpers", () => ({ + generateRandomString: vi.fn(() => "mock-random-string"), +})); + +const EXPECTED_LOGO_URI = "https://www.mcpjam.com/mcp_jam_2row.png"; + +describe("OAuth client metadata logo_uri", () => { + beforeEach(() => { + vi.resetModules(); + localStorage.clear(); + sessionStorage.clear(); + }); + + it("MCPOAuthProvider includes logo_uri in clientMetadata", async () => { + const { MCPOAuthProvider } = await import("../mcp-oauth"); + const provider = new MCPOAuthProvider("test-server"); + expect(provider.clientMetadata).toHaveProperty( + "logo_uri", + EXPECTED_LOGO_URI, + ); + }); + + it("DebugMCPOAuthClientProvider includes logo_uri in clientMetadata", async () => { + const { DebugMCPOAuthClientProvider } = + await import("../debug-oauth-provider"); + const provider = new DebugMCPOAuthClientProvider("https://example.com"); + expect(provider.clientMetadata).toHaveProperty( + "logo_uri", + EXPECTED_LOGO_URI, + ); + }); +}); diff --git a/mcpjam-inspector/client/src/lib/oauth/debug-oauth-provider.ts b/mcpjam-inspector/client/src/lib/oauth/debug-oauth-provider.ts index 46555c210..e2af2740a 100644 --- a/mcpjam-inspector/client/src/lib/oauth/debug-oauth-provider.ts +++ b/mcpjam-inspector/client/src/lib/oauth/debug-oauth-provider.ts @@ -32,6 +32,7 @@ export class DebugMCPOAuthClientProvider implements OAuthClientProvider { response_types: ["code"], client_name: "MCPJam", client_uri: "https://github.com/mcpjam/inspector", + logo_uri: "https://www.mcpjam.com/mcp_jam_2row.png", }; } diff --git a/mcpjam-inspector/client/src/lib/oauth/mcp-oauth.ts b/mcpjam-inspector/client/src/lib/oauth/mcp-oauth.ts index bc3b62f2a..1288021d4 100644 --- a/mcpjam-inspector/client/src/lib/oauth/mcp-oauth.ts +++ b/mcpjam-inspector/client/src/lib/oauth/mcp-oauth.ts @@ -141,6 +141,7 @@ export class MCPOAuthProvider implements OAuthClientProvider { return { client_name: `MCPJam - ${this.serverName}`, client_uri: "https://github.com/mcpjam/inspector", + logo_uri: "https://www.mcpjam.com/mcp_jam_2row.png", redirect_uris: [this.redirectUri], grant_types: ["authorization_code", "refresh_token"], response_types: ["code"],