MCPcopy Index your code
hub / github.com/simstudioai/sim / isMcpDomainAllowed

Function isMcpDomainAllowed

apps/sim/lib/mcp/domain-check.ts:74–80  ·  view source on GitHub ↗
(url: string | undefined)

Source from the content-addressed store, hash-verified

72 * validated after resolution at execution time.
73 */
74export function isMcpDomainAllowed(url: string | undefined): boolean {
75 if (!url) {
76 return getAllowedMcpDomainsFromEnv() === null
77 }
78 if (hasEnvVarInHostname(url)) return true
79 return checkMcpDomain(url) === null
80}
81
82/**
83 * Throws McpDomainNotAllowedError if the URL's domain is not in the allowlist.

Callers 3

getServerConfigMethod · 0.90
getWorkspaceServersMethod · 0.90

Calls 3

checkMcpDomainFunction · 0.85
hasEnvVarInHostnameFunction · 0.70

Tested by

no test coverage detected