MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / callerHasApiAccess

Method callerHasApiAccess

server/src/mcp-tools.ts:602–606  ·  view source on GitHub ↗

* Resolve whether the caller's org has an API-access tier. * Unauthenticated or M2M-without-org callers are treated as public-only. * Result is memoized per-request via the cache map passed in.

(authContext?: MCPAuthContext)

Source from the content-addressed store, hash-verified

600 * Result is memoized per-request via the cache map passed in.
601 */
602 private async callerHasApiAccess(authContext?: MCPAuthContext): Promise<boolean> {
603 if (!authContext?.orgId) return false;
604 const org = await this.orgDb.getOrganization(authContext.orgId);
605 return hasApiAccess(resolveMembershipTier(org));
606 }
607
608 /**
609 * Handle a tool call by name and return the result.

Callers 1

handleToolCallMethod · 0.95

Calls 3

hasApiAccessFunction · 0.85
resolveMembershipTierFunction · 0.85
getOrganizationMethod · 0.45

Tested by

no test coverage detected