MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / legacyMcpClientMatches

Function legacyMcpClientMatches

packages/plugins/mcp/src/sdk/plugin.ts:120–134  ·  view source on GitHub ↗
(
  client: OAuthClientSummary,
  candidates: ReadonlySet<string>,
  config: McpIntegrationConfigType | null,
)

Source from the content-addressed store, hash-verified

118const oauthClientKey = (owner: Owner, slug: OAuthClientSlug): string => `${owner}:${String(slug)}`;
119
120const legacyMcpClientMatches = (
121 client: OAuthClientSummary,
122 candidates: ReadonlySet<string>,
123 config: McpIntegrationConfigType | null,
124): boolean => {
125 if (!candidates.has(String(client.slug))) return false;
126 if (
127 !config ||
128 config.transport !== "remote" ||
129 !config.authenticationTemplate.some((method: McpAuthMethod) => method.kind === "oauth2")
130 ) {
131 return false;
132 }
133 return client.grant === "authorization_code" && (client.resource ?? null) === config.endpoint;
134};
135
136// ---------------------------------------------------------------------------
137// Tool annotations carry an `mcp` envelope alongside the executor's policy

Callers 1

removeServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected