use native connector types for MCP OAuth, restore original UI

This commit is contained in:
CREDO23 2026-04-22 08:57:28 +02:00
parent 940889c291
commit ea3508cb25
5 changed files with 34 additions and 89 deletions

View file

@ -31,7 +31,7 @@ export const OAUTH_CONNECTORS = [
title: "Airtable",
description: "Search your Airtable bases",
connectorType: EnumConnectorName.AIRTABLE_CONNECTOR,
authEndpoint: "/api/v1/auth/airtable/connector/add/",
authEndpoint: "/api/v1/auth/mcp/airtable/connector/add/",
},
{
id: "notion-connector",
@ -45,14 +45,14 @@ export const OAUTH_CONNECTORS = [
title: "Linear",
description: "Search issues & projects",
connectorType: EnumConnectorName.LINEAR_CONNECTOR,
authEndpoint: "/api/v1/auth/linear/connector/add/",
authEndpoint: "/api/v1/auth/mcp/linear/connector/add/",
},
{
id: "slack-connector",
title: "Slack",
description: "Search Slack messages",
connectorType: EnumConnectorName.SLACK_CONNECTOR,
authEndpoint: "/api/v1/auth/slack/connector/add/",
authEndpoint: "/api/v1/auth/mcp/slack/connector/add/",
},
{
id: "teams-connector",
@ -87,7 +87,7 @@ export const OAUTH_CONNECTORS = [
title: "Jira",
description: "Search Jira issues",
connectorType: EnumConnectorName.JIRA_CONNECTOR,
authEndpoint: "/api/v1/auth/jira/connector/add/",
authEndpoint: "/api/v1/auth/mcp/jira/connector/add/",
},
{
id: "confluence-connector",
@ -101,47 +101,8 @@ export const OAUTH_CONNECTORS = [
title: "ClickUp",
description: "Search ClickUp tasks",
connectorType: EnumConnectorName.CLICKUP_CONNECTOR,
authEndpoint: "/api/v1/auth/clickup/connector/add/",
},
] as const;
// MCP OAuth Connectors (one-click connect via official MCP servers)
export const MCP_OAUTH_CONNECTORS = [
{
id: "linear-mcp-connector",
title: "Linear (MCP)",
description: "Interact with Linear issues via MCP",
connectorType: EnumConnectorName.MCP_CONNECTOR,
authEndpoint: "/api/v1/auth/mcp/linear/connector/add/",
},
{
id: "jira-mcp-connector",
title: "Jira (MCP)",
description: "Interact with Jira issues via MCP",
connectorType: EnumConnectorName.MCP_CONNECTOR,
authEndpoint: "/api/v1/auth/mcp/jira/connector/add/",
},
{
id: "clickup-mcp-connector",
title: "ClickUp (MCP)",
description: "Interact with ClickUp tasks via MCP",
connectorType: EnumConnectorName.MCP_CONNECTOR,
authEndpoint: "/api/v1/auth/mcp/clickup/connector/add/",
},
{
id: "slack-mcp-connector",
title: "Slack (MCP)",
description: "Interact with Slack channels via MCP",
connectorType: EnumConnectorName.MCP_CONNECTOR,
authEndpoint: "/api/v1/auth/mcp/slack/connector/add/",
},
{
id: "airtable-mcp-connector",
title: "Airtable (MCP)",
description: "Interact with Airtable bases via MCP",
connectorType: EnumConnectorName.MCP_CONNECTOR,
authEndpoint: "/api/v1/auth/mcp/airtable/connector/add/",
},
] as const;
// Content Sources (tools that extract and import content from external sources)

View file

@ -10,14 +10,12 @@ import { ConnectorCard } from "../components/connector-card";
import {
COMPOSIO_CONNECTORS,
CRAWLERS,
MCP_OAUTH_CONNECTORS,
OAUTH_CONNECTORS,
OTHER_CONNECTORS,
} from "../constants/connector-constants";
import { getDocumentCountForConnector } from "../utils/connector-document-mapping";
type OAuthConnector = (typeof OAUTH_CONNECTORS)[number];
type MCPOAuthConnector = (typeof MCP_OAUTH_CONNECTORS)[number];
type ComposioConnector = (typeof COMPOSIO_CONNECTORS)[number];
type OtherConnector = (typeof OTHER_CONNECTORS)[number];
type CrawlerConnector = (typeof CRAWLERS)[number];
@ -130,10 +128,6 @@ export const AllConnectorsTab: FC<AllConnectorsTabProps> = ({
(c) => c.connectorType === EnumConnectorName.AIRTABLE_CONNECTOR
);
const filteredMCPOAuth = MCP_OAUTH_CONNECTORS.filter(
(c) => matchesSearch(c.title, c.description),
);
const moreIntegrationsComposio = filteredComposio.filter(
(c) =>
!DOCUMENT_FILE_CONNECTOR_TYPES.has(c.connectorType) &&
@ -285,7 +279,6 @@ export const AllConnectorsTab: FC<AllConnectorsTabProps> = ({
nativeGoogleDriveConnectors.length > 0 ||
composioGoogleDriveConnectors.length > 0 ||
fileStorageConnectors.length > 0;
const hasMCPOAuth = filteredMCPOAuth.length > 0;
const hasMoreIntegrations =
otherDocumentYouTubeConnectors.length > 0 ||
otherDocumentNotionConnectors.length > 0 ||
@ -295,7 +288,7 @@ export const AllConnectorsTab: FC<AllConnectorsTabProps> = ({
moreIntegrationsOther.length > 0 ||
moreIntegrationsCrawlers.length > 0;
const hasAnyResults = hasDocumentFileConnectors || hasMCPOAuth || hasMoreIntegrations;
const hasAnyResults = hasDocumentFileConnectors || hasMoreIntegrations;
if (!hasAnyResults && searchQuery) {
return (
@ -325,20 +318,6 @@ export const AllConnectorsTab: FC<AllConnectorsTabProps> = ({
</section>
)}
{/* Live MCP Integrations */}
{hasMCPOAuth && (
<section>
<div className="flex items-center gap-2 mb-4">
<h3 className="text-sm font-semibold text-muted-foreground">
Live MCP Integrations
</h3>
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
{filteredMCPOAuth.map((connector) => renderOAuthCard(connector as OAuthConnector | ComposioConnector))}
</div>
</section>
)}
{/* More Integrations */}
{hasMoreIntegrations && (
<section>