A custom gateway for Claude Desktop (in 3P mode) that relays all calls to Workers AI models (via Cloudflare Workers AI binding and Cloudflare AI Gateway) back to Claude Desktop.
WORKER_DEPLOY_CF_API_TOKEN
| Scope | Permission name | Level | Description |
|---|---|---|---|
| Account | Workers Scripts | Write | To uplaod worker itself |
| Zone | Workers Routes | Read | To set route for worker to be available on |
| Zone | API Gateway | Write | To upload API Gateway schemas to validate on |
- Go to your ZT Dashboard and on the sidebar go to
Access controls>Applications - Click on
Create new applicationin the top right - Choose
SaaS applicationstab, thenContinue with SaaS applications - Give your application name (doens't matter as long as you recognize it) and select
OIDC - Set scopes to
openidemailprofile - Pick any unused port and set
Redirect URLstohttp://127.0.0.1:<port>/callback(must use127.0.0.1notlocalhostor else you get redirect request not matching error) - Enable
PKCEandPKCE without client secret - Expand
Advanced settingsand setAccess token lifetimeto a low value, but enableRefresh tokensand set that to a larger value. - Set your access policies/login methods/experience settings
- Save application, but go back to that page so we can copy values for Claude Desktop
- Follow the
Installation and setupinstructions from Claude (https://claude.com/docs/third-party/claude-desktop/installation) until step 2 on it. - Set
Gateway base URLto your deployed worker url. - Set
Credential kindtoInteractive sign-in - Set
Sign-in session lifetimeto yourAccess token lifetimefrom step 8 above - Set
Client IDin Claude toClient IDfrom ZT - Set
Issuer URLin Claude toIssuerfrom ZT - Leave
Scopesblank (should default to grey-ed outopenid profile email offline_access) - Set
Redirect portto the port you chose from step 6 above - Apply changes and restart Claude Desktop
- Test it out and if all is good, go back to the Claude instructions (from step 1) and continue through for your deployment on other devices (if you want).