Skip to content

Commit 69e4070

Browse files
style: auto-fix prettier formatting
1 parent 2d8eec6 commit 69e4070

File tree

3 files changed

+71
-37
lines changed

3 files changed

+71
-37
lines changed

mcpjam-inspector/client/src/components/__tests__/RegistryTab.test.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,7 @@ describe("RegistryTab", () => {
249249

250250
it("shows Connected badge for connected servers", () => {
251251
mockHookReturn = {
252-
registryServers: [
253-
createMockServer({ connectionStatus: "connected" }),
254-
],
252+
registryServers: [createMockServer({ connectionStatus: "connected" })],
255253
categories: ["Productivity"],
256254
isLoading: false,
257255
connect: mockConnect,
@@ -293,9 +291,7 @@ describe("RegistryTab", () => {
293291

294292
render(<RegistryTab {...defaultProps} />);
295293

296-
expect(
297-
screen.getByRole("button", { name: "All" }),
298-
).toBeInTheDocument();
294+
expect(screen.getByRole("button", { name: "All" })).toBeInTheDocument();
299295
expect(
300296
screen.getByRole("button", { name: "Productivity" }),
301297
).toBeInTheDocument();

mcpjam-inspector/client/src/hooks/useRegistryServers.ts

Lines changed: 57 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,17 @@ const MOCK_REGISTRY_SERVERS: RegistryServer[] = [
1313
_id: "mock_asana",
1414
slug: "asana",
1515
displayName: "Asana",
16-
description: "Connect to Asana to manage tasks, projects, and team workflows directly from your MCP client.",
16+
description:
17+
"Connect to Asana to manage tasks, projects, and team workflows directly from your MCP client.",
1718
publisher: "MCPJam",
1819
category: "Project Management",
1920
iconUrl: "https://cdn.worldvectorlogo.com/logos/asana-logo.svg",
20-
transport: { type: "http", url: "https://mcp.asana.com/v2/mcp", useOAuth: true, oauthScopes: ["default"] },
21+
transport: {
22+
type: "http",
23+
url: "https://mcp.asana.com/v2/mcp",
24+
useOAuth: true,
25+
oauthScopes: ["default"],
26+
},
2127
approved: true,
2228
featured: true,
2329
createdAt: Date.now(),
@@ -27,11 +33,17 @@ const MOCK_REGISTRY_SERVERS: RegistryServer[] = [
2733
_id: "mock_linear",
2834
slug: "linear",
2935
displayName: "Linear",
30-
description: "Interact with Linear issues, projects, and cycles. Create, update, and search issues with natural language.",
36+
description:
37+
"Interact with Linear issues, projects, and cycles. Create, update, and search issues with natural language.",
3138
publisher: "MCPJam",
3239
category: "Project Management",
3340
iconUrl: "https://asset.brandfetch.io/iduDa181eM/idYoMflFma.png",
34-
transport: { type: "http", url: "https://mcp.linear.app/mcp", useOAuth: true, oauthScopes: ["read", "write"] },
41+
transport: {
42+
type: "http",
43+
url: "https://mcp.linear.app/mcp",
44+
useOAuth: true,
45+
oauthScopes: ["read", "write"],
46+
},
3547
approved: true,
3648
featured: true,
3749
createdAt: Date.now(),
@@ -41,11 +53,18 @@ const MOCK_REGISTRY_SERVERS: RegistryServer[] = [
4153
_id: "mock_notion",
4254
slug: "notion",
4355
displayName: "Notion",
44-
description: "Access and manage Notion pages, databases, and content. Search, create, and update your workspace.",
56+
description:
57+
"Access and manage Notion pages, databases, and content. Search, create, and update your workspace.",
4558
publisher: "MCPJam",
4659
category: "Productivity",
47-
iconUrl: "https://upload.wikimedia.org/wikipedia/commons/4/45/Notion_app_logo.png",
48-
transport: { type: "http", url: "https://mcp.notion.com/mcp", useOAuth: true, oauthScopes: ["read_content", "update_content"] },
60+
iconUrl:
61+
"https://upload.wikimedia.org/wikipedia/commons/4/45/Notion_app_logo.png",
62+
transport: {
63+
type: "http",
64+
url: "https://mcp.notion.com/mcp",
65+
useOAuth: true,
66+
oauthScopes: ["read_content", "update_content"],
67+
},
4968
approved: true,
5069
featured: true,
5170
createdAt: Date.now(),
@@ -55,11 +74,16 @@ const MOCK_REGISTRY_SERVERS: RegistryServer[] = [
5574
_id: "mock_slack",
5675
slug: "slack",
5776
displayName: "Slack",
58-
description: "Send messages, search conversations, and manage Slack channels directly through MCP.",
77+
description:
78+
"Send messages, search conversations, and manage Slack channels directly through MCP.",
5979
publisher: "MCPJam",
6080
category: "Communication",
6181
iconUrl: "https://cdn.worldvectorlogo.com/logos/slack-new-logo.svg",
62-
transport: { type: "http", url: "https://mcp.slack.com/sse", useOAuth: true },
82+
transport: {
83+
type: "http",
84+
url: "https://mcp.slack.com/sse",
85+
useOAuth: true,
86+
},
6387
approved: true,
6488
featured: true,
6589
createdAt: Date.now(),
@@ -69,10 +93,16 @@ const MOCK_REGISTRY_SERVERS: RegistryServer[] = [
6993
_id: "mock_github",
7094
slug: "github",
7195
displayName: "GitHub",
72-
description: "Manage repositories, pull requests, issues, and code reviews. Automate your GitHub workflows.",
96+
description:
97+
"Manage repositories, pull requests, issues, and code reviews. Automate your GitHub workflows.",
7398
publisher: "MCPJam",
7499
category: "Developer Tools",
75-
transport: { type: "http", url: "https://mcp.github.com/sse", useOAuth: true, oauthScopes: ["repo", "read:org"] },
100+
transport: {
101+
type: "http",
102+
url: "https://mcp.github.com/sse",
103+
useOAuth: true,
104+
oauthScopes: ["repo", "read:org"],
105+
},
76106
approved: true,
77107
createdAt: Date.now(),
78108
updatedAt: Date.now(),
@@ -81,10 +111,15 @@ const MOCK_REGISTRY_SERVERS: RegistryServer[] = [
81111
_id: "mock_jira",
82112
slug: "jira",
83113
displayName: "Jira",
84-
description: "Create and manage Jira issues, sprints, and boards. Track project progress with natural language.",
114+
description:
115+
"Create and manage Jira issues, sprints, and boards. Track project progress with natural language.",
85116
publisher: "MCPJam",
86117
category: "Project Management",
87-
transport: { type: "http", url: "https://mcp.atlassian.com/jira/sse", useOAuth: true },
118+
transport: {
119+
type: "http",
120+
url: "https://mcp.atlassian.com/jira/sse",
121+
useOAuth: true,
122+
},
88123
approved: true,
89124
createdAt: Date.now(),
90125
updatedAt: Date.now(),
@@ -93,10 +128,15 @@ const MOCK_REGISTRY_SERVERS: RegistryServer[] = [
93128
_id: "mock_google_drive",
94129
slug: "google-drive",
95130
displayName: "Google Drive",
96-
description: "Search, read, and organize files in Google Drive. Access documents, spreadsheets, and presentations.",
131+
description:
132+
"Search, read, and organize files in Google Drive. Access documents, spreadsheets, and presentations.",
97133
publisher: "MCPJam",
98134
category: "Productivity",
99-
transport: { type: "http", url: "https://mcp.googleapis.com/drive/sse", useOAuth: true },
135+
transport: {
136+
type: "http",
137+
url: "https://mcp.googleapis.com/drive/sse",
138+
useOAuth: true,
139+
},
100140
approved: true,
101141
createdAt: Date.now(),
102142
updatedAt: Date.now(),
@@ -105,7 +145,8 @@ const MOCK_REGISTRY_SERVERS: RegistryServer[] = [
105145
_id: "mock_stripe",
106146
slug: "stripe",
107147
displayName: "Stripe",
108-
description: "Query payments, subscriptions, and customer data. Monitor your Stripe business metrics.",
148+
description:
149+
"Query payments, subscriptions, and customer data. Monitor your Stripe business metrics.",
109150
publisher: "MCPJam",
110151
category: "Finance",
111152
transport: { type: "http", url: "https://mcp.stripe.com/sse" },

mcpjam-inspector/client/src/lib/oauth/mcp-oauth.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ function clearStoredDiscoveryState(serverName: string): void {
4747
* When a registryServerId is provided, token exchange/refresh is routed through
4848
* the Convex HTTP registry OAuth endpoints which inject server-side secrets.
4949
*/
50-
function createOAuthFetchInterceptor(
51-
registryServerId?: string,
52-
): typeof fetch {
50+
function createOAuthFetchInterceptor(registryServerId?: string): typeof fetch {
5351
return async function interceptedFetch(
5452
input: RequestInfo | URL,
5553
init?: RequestInit,
@@ -84,17 +82,14 @@ function createOAuthFetchInterceptor(
8482
const endpoint = isRefresh
8583
? "/registry/oauth/refresh"
8684
: "/registry/oauth/token";
87-
const response = await originalFetch(
88-
`${convexSiteUrl}${endpoint}`,
89-
{
90-
method: "POST",
91-
headers: { "Content-Type": "application/json" },
92-
body: JSON.stringify({
93-
registryServerId,
94-
...(typeof body === "object" && body !== null ? body : {}),
95-
}),
96-
},
97-
);
85+
const response = await originalFetch(`${convexSiteUrl}${endpoint}`, {
86+
method: "POST",
87+
headers: { "Content-Type": "application/json" },
88+
body: JSON.stringify({
89+
registryServerId,
90+
...(typeof body === "object" && body !== null ? body : {}),
91+
}),
92+
});
9893
return response;
9994
}
10095
}
@@ -357,7 +352,9 @@ export async function initiateOAuth(
357352
options: MCPOAuthOptions,
358353
): Promise<OAuthResult> {
359354
// Install fetch interceptor for OAuth metadata requests
360-
const interceptedFetch = createOAuthFetchInterceptor(options.registryServerId);
355+
const interceptedFetch = createOAuthFetchInterceptor(
356+
options.registryServerId,
357+
);
361358
window.fetch = interceptedFetch;
362359

363360
try {

0 commit comments

Comments
 (0)