MCPcopy Create free account
hub / github.com/context-space/context-space / getProviderConnectionStatus

Function getProviderConnectionStatus

web/src/lib/mcp/unified.ts:37–50  ·  view source on GitHub ↗
(
  providerIdentifier: string,
  credentials: Credential[],
  providersWithoutConnected: Provider[],
)

Source from the content-addressed store, hash-verified

35}
36
37function getProviderConnectionStatus(
38 providerIdentifier: string,
39 credentials: Credential[],
40 providersWithoutConnected: Provider[],
41): "ready_to_use" | "not_connected" {
42 const is_connection_free = providersWithoutConnected.some(provider => provider.identifier === providerIdentifier)
43 const is_connected = credentials.some(cred => cred.provider_identifier === providerIdentifier)
44
45 if (is_connection_free || is_connected) {
46 return "ready_to_use"
47 } else {
48 return "not_connected"
49 }
50}
51
52export async function getServer(authorization: string) {
53 const server = new McpServer(

Callers 1

getServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected