MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getMcpAuthCache

Function getMcpAuthCache

src/services/mcp/client.ts:271–278  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269let authCachePromise: Promise<McpAuthCacheData> | null = null
270
271function getMcpAuthCache(): Promise<McpAuthCacheData> {
272 if (!authCachePromise) {
273 authCachePromise = readFile(getMcpAuthCachePath(), 'utf-8')
274 .then(data => jsonParse(data) as McpAuthCacheData)
275 .catch(() => ({}))
276 }
277 return authCachePromise
278}
279
280async function isMcpAuthCached(serverId: string): Promise<boolean> {
281 const cache = await getMcpAuthCache()

Callers 2

isMcpAuthCachedFunction · 0.85
setMcpAuthCacheEntryFunction · 0.85

Calls 3

readFileFunction · 0.85
getMcpAuthCachePathFunction · 0.85
jsonParseFunction · 0.85

Tested by

no test coverage detected