Skip to main content
Glama

Cloudflare API MCP Server

by zueai
worker-cron.ts928 B
import Cloudflare from "cloudflare" export async function getWorkerSchedules( env: Env, accountId: string, scriptName: string ) { const client = new Cloudflare({ apiKey: env.CLOUDFLARE_API_KEY, apiEmail: env.CLOUDFLARE_API_EMAIL }) const response = await client.workers.scripts.schedules.get(scriptName, { account_id: accountId }) return { content: [ { type: "text", text: JSON.stringify(response, null, 2) } ] } } export async function updateWorkerSchedules( env: Env, accountId: string, scriptName: string, schedules: Array<{ cron: string }> ) { const client = new Cloudflare({ apiKey: env.CLOUDFLARE_API_KEY, apiEmail: env.CLOUDFLARE_API_EMAIL }) const response = await client.workers.scripts.schedules.update(scriptName, { account_id: accountId, body: schedules }) return { content: [ { type: "text", text: JSON.stringify(response, null, 2) } ] } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zueai/cloudflare-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server