Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/cloudflare/mcp
/ functions
Functions
369 in github.com/cloudflare/mcp
⨍
Functions
369
◇
Types & classes
469
↓ 2 callers
Function
handleTokenExchangeCallback
( options: TokenExchangeCallbackOptions, clientId: string, clientSecret: string, /** * Lazily build
src/auth/oauth-handler.ts:474
↓ 2 callers
Function
humanize
* Turn a resource key like `workers_scripts` into a human-readable label. * Falls back to title-casing unknown keys.
src/auth/workers-oauth-utils.ts:294
↓ 2 callers
Function
importKey
* Imports a secret key string for HMAC-SHA256 signing.
src/auth/workers-oauth-utils.ts:92
↓ 2 callers
Function
logResult
(name: string, result: unknown)
src/metrics.ts:248
↓ 2 callers
Function
mcpToolListRequest
(token: string, id = 1)
tests/helpers/mcp.ts:14
↓ 2 callers
Function
mockMultiAccountUser
()
tests/executor.test.ts:148
↓ 2 callers
Function
queryCloudflareDocs
(ai: Ai, query: string)
src/tools/docs-search.ts:138
↓ 2 callers
Function
redirectToCloudflare
* Redirect to Cloudflare OAuth with selected scopes
src/auth/oauth-handler.ts:530
↓ 2 callers
Function
refreshAuthToken
(params: { client_id: string client_secret: string refresh_token: string oauthDomain: string })
src/auth/cloudflare-auth.ts:141
↓ 2 callers
Function
registerClient
Register a client via the provider's RFC 7591 endpoint; returns its id.
tests/auth/oauth-routes.test.ts:23
↓ 2 callers
Function
runDocsTool
(query: string)
src/tools/docs-search.ts:95
↓ 2 callers
Function
runExecute
* Run sandboxed JavaScript against the Cloudflare API via `cloudflare.request()`. * * A fresh isolate is created per call: the user code is baked in
src/tools/execute.ts:62
↓ 2 callers
Function
sha256Hex
(value: string)
src/auth/oauth-handler.ts:74
↓ 2 callers
Function
sleep
(ms: number)
src/utils/fetch-retry.ts:95
↓ 2 callers
Function
throwUpstreamError
(response: Response, context: string)
src/auth/cloudflare-auth.ts:15
↓ 2 callers
Function
titleCase
(value: string)
src/tools/docs-search.ts:239
↓ 2 callers
Function
toolForAccountAccess
( tool: NonCodemodeTool, resolvedAccountId: string | undefined, props: AuthProps )
src/tools/non-codemode.ts:139
↓ 2 callers
Function
userIdFromProps
* Resolve the userId to attribute metrics to. Only user tokens carry a user * identity; account tokens have no user, so blob3 is left undefined — mat
src/metrics.ts:211
↓ 2 callers
Function
validationError
(name: string, error: z.ZodError)
src/tools/non-codemode.ts:121
↓ 1 callers
Function
accountIdParamDescription
()
src/tools/execute.ts:285
↓ 1 callers
Function
accountSelectionDescription
(props?: AuthProps)
src/tools/execute.ts:264
↓ 1 callers
Function
attachMetrics
(server: McpServer, props?: AuthProps)
src/metrics.ts:239
↓ 1 callers
Function
buildJsonInputSchema
(operation: OperationInfo, path: string)
src/openapi.ts:223
↓ 1 callers
Function
cacheRefreshFailure
( kv: KVNamespace, failureKey: string, error: OAuthError )
src/auth/oauth-handler.ts:182
↓ 1 callers
Function
callNonCodemodeTool
( tool: NonCodemodeTool, params: Record<string, unknown>, resolvedAccountId: string | undefined, apiTo
src/tools/non-codemode.ts:71
↓ 1 callers
Function
clearRefreshInFlight
(kv: KVNamespace, inFlightKey: string)
src/auth/oauth-handler.ts:207
↓ 1 callers
Function
clientIdAlreadyApproved
( request: Request, clientId: string, cookieSecret: string )
src/auth/workers-oauth-utils.ts:180
↓ 1 callers
Function
cloudflareTypesForAccount
* The `CLOUDFLARE_TYPES` block plus a per-session comment describing how * `accountId` is resolved for this token (pinned, single account, or chosen
src/tools/execute.ts:211
↓ 1 callers
Function
createAuthHandlers
()
src/auth/oauth-handler.ts:558
↓ 1 callers
Function
createMcpHandler
* Create MCP API handler using Hono
src/index.ts:47
↓ 1 callers
Function
decodeBase64Utf8
(value: string)
src/auth/workers-oauth-utils.ts:24
↓ 1 callers
Function
doWithRetries
(action: () => Promise<T>)
src/tools/docs-search.ts:199
↓ 1 callers
Function
encodeBase64Utf8
(value: string)
src/auth/workers-oauth-utils.ts:17
↓ 1 callers
Method
evaluate
()
src/tools/search.ts:10
↓ 1 callers
Method
evaluate
()
src/tools/execute.ts:20
↓ 1 callers
Function
executeToolDescription
* Description for the `execute` tool, including the per-session Cloudflare type * declarations and a multipart Worker-upload example.
src/tools/execute.ts:243
↓ 1 callers
Function
fetchCloudflareProbes
( accessToken: string, caller = 'oauth_callback_identity_probe' )
src/auth/oauth-handler.ts:348
↓ 1 callers
Function
generateCSRFProtection
()
src/auth/workers-oauth-utils.ts:1540
↓ 1 callers
Function
getCachedApiTokenIdentity
(token: string)
src/auth/api-token-mode.ts:22
↓ 1 callers
Function
getCachedRefreshFailure
( kv: KVNamespace, failureKey: string )
src/auth/oauth-handler.ts:139
↓ 1 callers
Function
getNonCodemodeToolMap
()
src/isolate-cache.ts:69
↓ 1 callers
Function
getProducts
()
src/isolate-cache.ts:79
↓ 1 callers
Function
getRetryAfterHeader
(...responses: Response[])
src/auth/oauth-handler.ts:317
↓ 1 callers
Function
groupScopesByCategory
* Group scopes by resource, then bucket rows by category for accordion display.
src/auth/workers-oauth-utils.ts:388
↓ 1 callers
Function
hashApiToken
(token: string)
src/auth/api-token-mode.ts:17
↓ 1 callers
Function
isRefreshInFlight
(kv: KVNamespace, inFlightKey: string)
src/auth/oauth-handler.ts:163
↓ 1 callers
Function
isRetryableError
(error: unknown)
src/tools/docs-search.ts:220
↓ 1 callers
Function
isTerminalRefreshError
(error: unknown)
src/auth/oauth-handler.ts:89
↓ 1 callers
Function
listNonCodemodeOperations
( paths: Record<string, Record<string, OperationInfo>> )
src/openapi.ts:141
↓ 1 callers
Function
listNonCodemodeTools
POST a non-codemode tools/list to the real worker.
tests/non-codemode-worker.test.ts:47
↓ 1 callers
Method
listen
(...args: unknown[])
worker-configuration.d.ts:9991
↓ 1 callers
Function
makeAi
(response: unknown)
tests/docs-search.test.ts:10
↓ 1 callers
Function
markRefreshInFlight
(kv: KVNamespace, inFlightKey: string)
src/auth/oauth-handler.ts:172
↓ 1 callers
Function
mockFetchText
(text: string, ok = true)
tests/non-codemode.test.ts:596
↓ 1 callers
Function
mockUserProbe
()
tests/auth/api-token-mode.test.ts:162
↓ 1 callers
Function
parseOAuthStateToken
(state: string)
src/auth/workers-oauth-utils.ts:29
↓ 1 callers
Function
parseRedirectApproval
( request: Request, cookieSecret: string )
src/auth/workers-oauth-utils.ts:1476
↓ 1 callers
Function
pathToToolNameSuffix
(path: string)
src/openapi.ts:59
↓ 1 callers
Function
recordToolCall
(props: AuthProps, toolName: string, isError: boolean)
src/metrics.ts:216
↓ 1 callers
Function
refreshGuardKeys
(refreshTokenHash: string)
src/auth/oauth-handler.ts:82
↓ 1 callers
Function
registerExecuteTool
(server: McpServer, props: AuthProps)
src/tools/execute.ts:298
↓ 1 callers
Function
registerNonCodemodeTools
(server: McpServer, props: AuthProps)
src/tools/non-codemode.ts:24
↓ 1 callers
Function
registerSearchTool
(server: McpServer)
src/tools/search.ts:103
↓ 1 callers
Function
removeNonCodemodeTools
()
tests/helpers/spec.ts:23
↓ 1 callers
Function
renderApprovalDialog
(request: Request, options: ApprovalDialogOptions)
src/auth/workers-oauth-utils.ts:473
↓ 1 callers
Function
retryAfterHeaders
* Convert an upstream Cloudflare OAuth error response to an OAuthError. * 4xx: preserves the status code with a safe message. * 5xx: uses 502 Bad Ga
src/auth/cloudflare-auth.ts:10
↓ 1 callers
Function
runSearch
* Run sandboxed read-only JavaScript against the pre-resolved OpenAPI spec. * * The spec is embedded into a fresh isolate per call (dynamic-worker i
src/tools/search.ts:21
↓ 1 callers
Function
s256Challenge
Recompute the expected S256 challenge for a verifier, base64url-encoded.
tests/auth/cloudflare-auth.test.ts:67
↓ 1 callers
Function
searchToolDescription
* Description for the `search` tool, listing a sample of available products and * the `spec` types the sandboxed search code can use.
src/tools/search.ts:63
↓ 1 callers
Function
signData
* Signs data using HMAC-SHA256.
src/auth/workers-oauth-utils.ts:109
↓ 1 callers
Function
throwCombinedCloudflareApiError
(userResp: Response, accountsResp: Response)
src/auth/oauth-handler.ts:324
↓ 1 callers
Method
toResponse
()
src/auth/workers-oauth-utils.ts:57
↓ 1 callers
Function
toWireTool
(tool: NonCodemodeTool)
src/tools/non-codemode.ts:134
↓ 1 callers
Function
validateOAuthState
( request: Request, kv: KVNamespace )
src/auth/workers-oauth-utils.ts:1776
↓ 1 callers
Function
verifySignature
* Verifies an HMAC-SHA256 signature.
src/auth/workers-oauth-utils.ts:120
↓ 1 callers
Method
wait
(delay: number, maybeOptions?: SchedulerWaitOptions)
worker-configuration.d.ts:886
↓ 1 callers
Method
waitUntil
(promise: Promise<any>)
worker-configuration.d.ts:480
↓ 1 callers
Method
writeDataPoint
(event?: AnalyticsEngineDataPoint)
worker-configuration.d.ts:639
↓ 1 callers
Function
zodInputSchemaFromJson
( inputSchema: JsonObjectSchema )
src/openapi.ts:211
Method
"assert"
(condition?: boolean, ...data: any[])
worker-configuration.d.ts:150
Method
[Symbol.asyncIterator]
(options?: ReadableStreamValuesOptions)
worker-configuration.d.ts:2229
Method
abort
(reason?: string)
worker-configuration.d.ts:571
Method
abort
()
worker-configuration.d.ts:1998
Method
accept
()
worker-configuration.d.ts:3096
Method
acceptWebSocket
(ws: WebSocket, tags?: string[])
worker-configuration.d.ts:563
Method
ack
()
worker-configuration.d.ts:1950
Method
ackAll
()
worker-configuration.d.ts:1956
Method
ackAll
()
worker-configuration.d.ts:1962
Method
address
()
worker-configuration.d.ts:9992
Method
after
(content: string | ReadableStream | Response, options?: ContentOptions)
worker-configuration.d.ts:1549
Method
after
(content: string | ReadableStream | Response, options?: ContentOptions)
worker-configuration.d.ts:1561
Method
after
(content: string, options?: ContentOptions)
worker-configuration.d.ts:1568
Method
after
(content: string | ReadableStream | Response, options?: ContentOptions)
worker-configuration.d.ts:1577
Method
alarm
(alarmInfo?: AlarmInvocationInfo)
worker-configuration.d.ts:521
Method
append
(content: string, options?: ContentOptions)
worker-configuration.d.ts:1582
Method
arrayBuffer
()
worker-configuration.d.ts:2023
Method
atob
(data: string)
worker-configuration.d.ts:341
Method
before
(content: string | ReadableStream | Response, options?: ContentOptions)
worker-configuration.d.ts:1548
Method
before
(content: string | ReadableStream | Response, options?: ContentOptions)
worker-configuration.d.ts:1560
Method
before
(content: string, options?: ContentOptions)
worker-configuration.d.ts:1567
← previous
next →
101–200 of 369, ranked by callers