{"_id":"@egoist/mcp-server-cloudflare","_rev":"4-fcf768382f097fa799c2a365d3f011b7","name":"@egoist/mcp-server-cloudflare","dist-tags":{"latest":"0.3.2"},"versions":{"0.2.0":{"name":"@egoist/mcp-server-cloudflare","version":"0.2.0","author":{"url":"https://cloudflare.com","name":"Cloudflare, Inc."},"license":"Apache-2.0","_id":"@egoist/mcp-server-cloudflare@0.2.0","maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"homepage":"https://github.com/cloudflare/mcp-server-cloudflare","bugs":{"url":"https://github.com/cloudflare/mcp-server-cloudflare/issues"},"bin":{"mcp-server-cloudflare":"dist/index.js"},"dist":{"shasum":"a5838a17be9f6f1a2085c042e9d4d940a77b411c","tarball":"https://registry.npmjs.org/@egoist/mcp-server-cloudflare/-/mcp-server-cloudflare-0.2.0.tgz","fileCount":3,"integrity":"sha512-fwpovAuVLXi/q0MDmvM3nu7nSetML9b5QtTIOovCjgJvoNk/oL2roF+HjGSDgPu1OM/6jgW4RtcJ5oLcDiRlBQ==","signatures":[{"sig":"MEYCIQDpEmk/4WiDVXCE6+O4zoksp3DPy8slBuqzoP7Xq2bjWwIhAN8vcP0aP5753QWY3vYNeecT3NbTl7YmgX49LFS1VRpU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28719},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","access":"public","module":"dist/index.js","engines":{"node":">=16.17.0"},"gitHead":"d4b871f6a3ab36aeaeff303456be22621ef52291","scripts":{"test":"vitest run","build":"tsup src/index.ts --dts --format esm --external xdg-app-paths --external which","check":"tsc --noEmit","postbuild":"shx chmod +x dist/*.js","test:watch":"vitest","build:watch":"pnpm build --watch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"_npmVersion":"10.9.0","description":"MCP server for interacting with Cloudflare API","directories":{},"_nodeVersion":"22.12.0","dependencies":{"zod":"^3.23.8","chalk":"^5.3.0","which":"^5.0.0","dotenv":"^16.4.5","undici":"^5.28.4","@iarna/toml":"^2.2.5","xdg-app-paths":"^8.3.0","@modelcontextprotocol/sdk":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.3","shx":"^0.3.4","tsup":"^8.3.5","vitest":"^3.0.8","prettier":"^3.4.1","typescript":"^5.6.2","@types/node":"^22.10.0","@types/which":"^3.0.4","@vitest/coverage-v8":"^3.0.8","@cloudflare/workers-types":"^4.20241112.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-cloudflare_0.2.0_1742377669008_0.16664396917844027","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@egoist/mcp-server-cloudflare","version":"0.3.0","author":{"url":"https://cloudflare.com","name":"Cloudflare, Inc."},"license":"Apache-2.0","_id":"@egoist/mcp-server-cloudflare@0.3.0","maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"homepage":"https://github.com/cloudflare/mcp-server-cloudflare","bugs":{"url":"https://github.com/cloudflare/mcp-server-cloudflare/issues"},"bin":{"mcp-server-cloudflare":"dist/index.js"},"dist":{"shasum":"ee3c1006c31d3a32d3a2bfb6b9b367449d25e7f3","tarball":"https://registry.npmjs.org/@egoist/mcp-server-cloudflare/-/mcp-server-cloudflare-0.3.0.tgz","fileCount":5,"integrity":"sha512-NEU1EevmaTKOlsHfRwXT5D//Mtg7pmtmfB1HLVoGCyzMCCVTQDcUyniu0C6zTvu7fcoenZxK7/SJ+EyRWIewqQ==","signatures":[{"sig":"MEUCIQDGHEd3JxC/s3AZoKtnwAkOQnVmSjpTpSxfoLFZMWKXGQIgV3fTjLM9q3Zcj5QtETttx1tyeiJa8JKruJr3Ys7PzTc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":276648},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","access":"public","module":"dist/index.js","engines":{"node":">=16.17.0"},"gitHead":"d4b871f6a3ab36aeaeff303456be22621ef52291","scripts":{"test":"vitest run","build":"tsup src/index.ts --dts --format esm --external xdg-app-paths --external which","check":"tsc --noEmit","postbuild":"shx chmod +x dist/*.js","test:watch":"vitest","build:watch":"pnpm build --watch","test:coverage":"vitest run --coverage"},"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"_npmVersion":"10.9.0","description":"MCP server for interacting with Cloudflare API","directories":{},"_nodeVersion":"22.12.0","dependencies":{"zod":"^3.23.8","chalk":"^5.3.0","which":"^5.0.0","dotenv":"^16.4.5","undici":"^5.28.4","@iarna/toml":"^2.2.5","xdg-app-paths":"^8.3.0","@modelcontextprotocol/sdk":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.3","shx":"^0.3.4","tsup":"^8.3.5","vitest":"^3.0.8","prettier":"^3.4.1","typescript":"^5.6.2","@types/node":"^22.10.0","@types/which":"^3.0.4","@vitest/coverage-v8":"^3.0.8","@cloudflare/workers-types":"^4.20241112.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-cloudflare_0.3.0_1742377690063_0.31200752343553506","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@egoist/mcp-server-cloudflare","version":"0.3.1","author":{"url":"https://cloudflare.com","name":"Cloudflare, Inc."},"license":"Apache-2.0","_id":"@egoist/mcp-server-cloudflare@0.3.1","maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"homepage":"https://github.com/cloudflare/mcp-server-cloudflare","bugs":{"url":"https://github.com/cloudflare/mcp-server-cloudflare/issues"},"bin":{"mcp-server-cloudflare":"dist/index.js"},"dist":{"shasum":"cccd880e6f73f405e0b24bdac6cf21be89de9c97","tarball":"https://registry.npmjs.org/@egoist/mcp-server-cloudflare/-/mcp-server-cloudflare-0.3.1.tgz","fileCount":5,"integrity":"sha512-xfJ6Mde9LOK2WGDzhh9aY3uDP2hLm7d+Iu/4TESV7TaC2W8eXx8fy7RsDtGgkf7/pmcPV9ZLsHvfdS4tVG29nw==","signatures":[{"sig":"MEUCIQDVt3BRjP71O42exRBwW3LxssuIbQeUrOkqotumCJH78gIgUSMt8RZRlJGw8eTLuw3yoMBtb0mGIHvedcAELysHtfo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":276645},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","access":"public","module":"dist/index.js","engines":{"node":">=16.17.0"},"gitHead":"d4b871f6a3ab36aeaeff303456be22621ef52291","scripts":{"test":"vitest run","build":"tsup src/index.ts --dts --format esm --external xdg-app-paths --external which","check":"tsc --noEmit","postbuild":"shx chmod +x dist/*.js","test:watch":"vitest","build:watch":"pnpm build --watch","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"_npmVersion":"10.9.0","description":"MCP server for interacting with Cloudflare API","directories":{},"_nodeVersion":"22.12.0","dependencies":{"zod":"^3.23.8","chalk":"^5.3.0","which":"^5.0.0","dotenv":"^16.4.5","undici":"^5.28.4","@iarna/toml":"^2.2.5","xdg-app-paths":"^8.3.0","@modelcontextprotocol/sdk":"^1.7.0"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.3","shx":"^0.3.4","tsup":"^8.3.5","vitest":"^3.0.8","prettier":"^3.4.1","typescript":"^5.6.2","@types/node":"^22.10.0","@types/which":"^3.0.4","@vitest/coverage-v8":"^3.0.8","@cloudflare/workers-types":"^4.20241112.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp-server-cloudflare_0.3.1_1742377859747_0.9465385834520634","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@egoist/mcp-server-cloudflare","version":"0.3.2","description":"MCP server for interacting with Cloudflare API","license":"Apache-2.0","author":{"name":"Cloudflare, Inc.","url":"https://cloudflare.com"},"homepage":"https://github.com/cloudflare/mcp-server-cloudflare","bugs":{"url":"https://github.com/cloudflare/mcp-server-cloudflare/issues"},"type":"module","main":"dist/index.js","module":"dist/index.js","types":"dist/index.d.ts","access":"public","bin":{"mcp-server-cloudflare":"dist/index.js"},"scripts":{"build":"tsup src/index.ts --dts --format esm --external xdg-app-paths --external which","postbuild":"shx chmod +x dist/*.js","check":"tsc --noEmit","build:watch":"pnpm build --watch","test":"vitest run","test:coverage":"vitest run --coverage","test:watch":"vitest"},"dependencies":{"@iarna/toml":"^2.2.5","@modelcontextprotocol/sdk":"^0.6.0","chalk":"^5.3.0","dotenv":"^16.4.5","undici":"^5.28.4","which":"^5.0.0","xdg-app-paths":"^8.3.0","zod":"^3.23.8"},"devDependencies":{"@cloudflare/workers-types":"^4.20241112.0","@types/node":"^22.10.0","@types/which":"^3.0.4","@vitest/coverage-v8":"^3.0.8","msw":"^2.7.3","prettier":"^3.4.1","shx":"^0.3.4","tsup":"^8.3.5","typescript":"^5.6.2","vitest":"^3.0.8"},"engines":{"node":">=16.17.0"},"_id":"@egoist/mcp-server-cloudflare@0.3.2","gitHead":"2458419494a838653fe89312346d2e1e654f3b97","_nodeVersion":"22.12.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-n0oIb9ojRk2wtMY97r8JxDUyrA3hpDgFLLPwltCFOfDhlZ14dND9GOz1PcuIDgn7efUzqinXf/9Fzvy83dlcng==","shasum":"52f3f63e3cf61ec3403b620a2f17cfeb016fe516","tarball":"https://registry.npmjs.org/@egoist/mcp-server-cloudflare/-/mcp-server-cloudflare-0.3.2.tgz","fileCount":5,"unpackedSize":276899,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDDgQ/9vsB3S464Lv/I2gntvfhmVYg2eZB/qDwzP4teMAiEArIVlmm63T65TCCQsct8jhf7yDUE/8j9HWhUDAIOq41I="}]},"_npmUser":{"name":"egoist","email":"0x142857@gmail.com"},"directories":{},"maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server-cloudflare_0.3.2_1742381411285_0.7794918290218511"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-19T09:47:48.878Z","modified":"2025-03-19T10:50:11.656Z","0.2.0":"2025-03-19T09:47:49.180Z","0.3.0":"2025-03-19T09:48:10.252Z","0.3.1":"2025-03-19T09:50:59.962Z","0.3.2":"2025-03-19T10:50:11.487Z"},"bugs":{"url":"https://github.com/cloudflare/mcp-server-cloudflare/issues"},"author":{"name":"Cloudflare, Inc.","url":"https://cloudflare.com"},"license":"Apache-2.0","homepage":"https://github.com/cloudflare/mcp-server-cloudflare","description":"MCP server for interacting with Cloudflare API","maintainers":[{"name":"egoist","email":"0x142857@gmail.com"}],"readme":"# Cloudflare MCP Server\n\nModel Context Protocol (MCP) is a [new, standardized protocol](https://modelcontextprotocol.io/introduction) for managing context between large language models (LLMs) and external systems. In this repository, we provide an installer as well as an MCP Server for [Cloudflare's API](https://api.cloudflare.com).\n\nThis lets you use Claude Desktop, or any MCP Client, to use natural language to accomplish things on your Cloudflare account, e.g.:\n\n* `Please deploy me a new Worker with an example durable object.`\n* `Can you tell me about the data in my D1 database named '...'?`\n* `Can you copy all the entries from my KV namespace '...' into my R2 bucket '...'?`\n\n## Demo\n\n<div align=\"center\">\n  <a href=\"https://www.youtube.com/watch?v=vGajZpl_9yA\">\n    <img src=\"https://img.youtube.com/vi/vGajZpl_9yA/maxresdefault.jpg\" alt=\"Demonstrating the newly-released MCP server to explore Cloudflare properties, like Workers, KV, and D1.\" width=\"600\"/>\n  </a>\n</div>\n\n## Setup\n\n1. Make sure you are logged in to Cloudflare via Wrangler:\n   ```bash\n   npx wrangler login\n   ```\n   This authentication is required for the MCP server to access your Cloudflare resources when testing locally.\n\n2. Run `npx @cloudflare/mcp-server-cloudflare init`\n\n<div align=\"left\">\n    <img src=\"https://github.com/user-attachments/assets/163bed75-ec0c-478a-94b2-179969a90923\" alt=\"Example console output\" width=\"300\"/>\n</div>\n\n3. Restart Claude Desktop, you should see a small 🔨 icon that shows the following tools available for use:\n\n<div align=\"left\">\n    <img src=\"https://github.com/user-attachments/assets/a24275b1-1c6f-4754-96ef-dd7b9f0f5903\" alt=\"Example tool icon\" height=\"160\"/>\n    <img src=\"https://github.com/user-attachments/assets/4fb8badb-6800-4a3f-a530-a344b3584bec\" alt=\"Example tool list\" height=\"160\"/>\n</div>\n\n## Paid Features\n\nSome features in this MCP server require a paid Cloudflare Workers plan:\n\n- **Observability and Analytics**: The `analytics_get` tool and related analytics features require a paid Workers plan to access these metrics\n- Other premium Cloudflare features like advanced D1 database capabilities and higher usage limits also require appropriate paid plans\n\nEnsure your Cloudflare account has the necessary subscription level for the features you intend to use.\n\n## Features\n\n### KV Store Management\n- `get_kvs`: List all KV namespaces in your account\n- `kv_get`: Get a value from a KV namespace\n- `kv_put`: Store a value in a KV namespace\n- `kv_list`: List keys in a KV namespace\n- `kv_delete`: Delete a key from a KV namespace\n\n### R2 Storage Management\n- `r2_list_buckets`: List all R2 buckets in your account\n- `r2_create_bucket`: Create a new R2 bucket\n- `r2_delete_bucket`: Delete an R2 bucket\n- `r2_list_objects`: List objects in an R2 bucket\n- `r2_get_object`: Get an object from an R2 bucket\n- `r2_put_object`: Put an object into an R2 bucket\n- `r2_delete_object`: Delete an object from an R2 bucket\n\n### D1 Database Management\n- `d1_list_databases`: List all D1 databases in your account\n- `d1_create_database`: Create a new D1 database\n- `d1_delete_database`: Delete a D1 database\n- `d1_query`: Execute a SQL query against a D1 database\n\n### Workers Management\n- `worker_list`: List all Workers in your account\n- `worker_get`: Get a Worker's script content\n- `worker_put`: Create or update a Worker script\n- `worker_delete`: Delete a Worker script\n\n### Durable Objects\n- `durable_objects_list`: List all Durable Objects namespaces\n- `durable_objects_create`: Create a new Durable Objects namespace\n- `durable_objects_delete`: Delete a Durable Objects namespace\n- `durable_objects_list_instances`: List all instances for a specific Durable Objects namespace\n- `durable_objects_get_instance`: Get details about a specific Durable Objects instance\n- `durable_objects_delete_instance`: Delete a specific Durable Objects instance\n\n### Queues\n- `queues_list`: List all Queues in your account\n- `queues_create`: Create a new Queue\n- `queues_delete`: Delete a Queue\n- `queues_get`: Get details about a specific Queue\n- `queues_send_message`: Send a message to a Queue\n- `queues_get_messages`: Get messages from a Queue\n- `queues_update_consumer`: Update a Queue consumer\n\n### Workers AI\n- `workers_ai_list_models`: List available AI models\n- `workers_ai_get_model`: Get details about a specific AI model\n- `workers_ai_run_inference`: Run inference using Workers AI\n- `workers_ai_list_tasks`: List AI tasks\n\n### Workflows\n- `workflows_list`: List all Workflows in your account\n- `workflows_create`: Create a new Workflow\n- `workflows_delete`: Delete a Workflow\n- `workflows_get`: Get details about a specific Workflow\n- `workflows_update`: Update a Workflow\n- `workflows_execute`: Execute a Workflow\n\n### Templates\n- `templates_list`: List available Worker templates\n- `templates_get`: Get details about a specific template\n- `templates_create_from_template`: Create a new Worker from a template\n\n### Workers for Platforms\n- `w4p_list_dispatchers`: List all Workers for Platforms dispatchers\n- `w4p_create_dispatcher`: Create a new dispatcher\n- `w4p_delete_dispatcher`: Delete a dispatcher\n- `w4p_get_dispatcher`: Get details about a specific dispatcher\n- `w4p_update_dispatcher`: Update a dispatcher configuration\n\n### Service Bindings\n- `bindings_list`: List all service bindings for a Worker\n- `bindings_create`: Create a new service binding\n- `bindings_update`: Update a service binding\n- `bindings_delete`: Delete a service binding\n\n### URL Routing\n- `routing_list_routes`: List all routes for a Worker\n- `routing_create_route`: Create a new route\n- `routing_update_route`: Update a route\n- `routing_delete_route`: Delete a route\n\n### Cron Triggers\n- `cron_list`: List all cron triggers for a Worker\n- `cron_create`: Create a new cron trigger\n- `cron_update`: Update a cron trigger\n- `cron_delete`: Delete a cron trigger\n\n### Zones & Domains\n- `zones_list`: List all zones in your account\n- `zones_create`: Create a new zone\n- `zones_delete`: Delete a zone\n- `zones_get`: Get details about a specific zone\n- `zones_check_activation`: Check zone activation status\n\n### Secrets\n- `secrets_list`: List all secrets for a Worker\n- `secrets_put`: Create or update a secret\n- `secrets_delete`: Delete a secret\n\n### Version Management\n- `versions_list`: List all versions of a Worker\n- `versions_get`: Get details about a specific version\n- `versions_rollback`: Rollback to a previous version\n\n### Wrangler Config\n- `wrangler_get_config`: Get the current Wrangler configuration\n- `wrangler_update_config`: Update Wrangler configuration\n\n### Analytics\n- `analytics_get`: Retrieve analytics data for your domain\n  - Includes metrics like requests, bandwidth, threats, and page views\n  - Supports date range filtering\n\n## Developing\n\nIn the current project folder, run:\n\n```\npnpm install\npnpm build:watch\n```\n\nThen, in a second terminal:\n\n```\nnode dist/index.js init\n```\n\nThis will link Claude Desktop against your locally-installed version for you to test.\n\n## Testing\n\nThe project uses Vitest as the testing framework with MSW (Mock Service Worker) for API mocking.\n\n### Running Tests\n\nTo run all tests:\n\n```bash\npnpm test\n```\n\nTo run tests with coverage:\n\n```bash\npnpm test:coverage\n```\n\nTo run a specific test file:\n\n```bash\npnpm test -- tests/tools/queues.test.ts\n```\n\nTo run tests in watch mode (useful during development):\n\n```bash\npnpm test:watch\n```\n\n### Test Structure\n\nThe test suite is organized as follows:\n\n- `tests/tools/`: Contains tests for each Cloudflare API tool\n- `tests/mocks/`: Contains mock data and request handlers\n- `tests/utils/`: Contains test helper functions\n- `tests/setup.ts`: Global test setup configuration\n\nEach tool test file follows a consistent pattern of testing both successful operations and error handling scenarios.\n\n## Usage outside of Claude\n\nTo run the server locally, run `node dist/index run <account-id>`.\n\nIf you're using an alternative MCP Client, or testing things locally, emit the `tools/list` command to get an up-to-date list of all available tools. Then you can call these directly using the `tools/call` command.\n\n### Workers\n\n```javascript\n// List workers\nworker_list()\n\n// Get worker code\nworker_get({ name: \"my-worker\" })\n\n// Update worker\nworker_put({\n  name: \"my-worker\",\n  script: \"export default { async fetch(request, env, ctx) { ... }}\",\n  bindings: [\n    {\n      type: \"kv_namespace\",\n      name: \"MY_KV\",\n      namespace_id: \"abcd1234\"\n    },\n    {\n      type: \"r2_bucket\",\n      name: \"MY_BUCKET\",\n      bucket_name: \"my-files\"\n    }\n  ],\n  compatibility_date: \"2024-01-01\",\n  compatibility_flags: [\"nodejs_compat\"]\n})\n\n// Delete worker\nworker_delete({ name: \"my-worker\" })\n```\n\n### KV Store\n\n```javascript\n// List KV namespaces\nget_kvs()\n\n// Get value\nkv_get({\n    namespaceId: \"your_namespace_id\",\n    key: \"myKey\"\n})\n\n// Store value\nkv_put({\n    namespaceId: \"your_namespace_id\",\n    key: \"myKey\",\n    value: \"myValue\",\n    expirationTtl: 3600 // optional, in seconds\n})\n\n// List keys\nkv_list({\n    namespaceId: \"your_namespace_id\",\n    prefix: \"app_\", // optional\n    limit: 10 // optional\n})\n\n// Delete key\nkv_delete({\n    namespaceId: \"your_namespace_id\",\n    key: \"myKey\"\n})\n```\n\n### R2 Storage\n\n```javascript\n// List buckets\nr2_list_buckets()\n\n// Create bucket\nr2_create_bucket({ name: \"my-bucket\" })\n\n// Delete bucket\nr2_delete_bucket({ name: \"my-bucket\" })\n\n// List objects in bucket\nr2_list_objects({ \n    bucket: \"my-bucket\",\n    prefix: \"folder/\", // optional\n    delimiter: \"/\", // optional\n    limit: 1000 // optional\n})\n\n// Get object\nr2_get_object({\n    bucket: \"my-bucket\",\n    key: \"folder/file.txt\"\n})\n\n// Put object\nr2_put_object({\n    bucket: \"my-bucket\",\n    key: \"folder/file.txt\",\n    content: \"Hello, World!\",\n    contentType: \"text/plain\" // optional\n})\n\n// Delete object\nr2_delete_object({\n    bucket: \"my-bucket\",\n    key: \"folder/file.txt\"\n})\n```\n\n### D1 Database\n\n```javascript\n// List databases\nd1_list_databases()\n\n// Create database\nd1_create_database({ name: \"my-database\" })\n\n// Delete database\nd1_delete_database({ databaseId: \"your_database_id\" })\n\n// Execute a single query\nd1_query({\n    databaseId: \"your_database_id\",\n    query: \"SELECT * FROM users WHERE age > ?\",\n    params: [\"25\"] // optional\n})\n\n// Create a table\nd1_query({\n    databaseId: \"your_database_id\",\n    query: `\n        CREATE TABLE users (\n            id INTEGER PRIMARY KEY AUTOINCREMENT,\n            name TEXT NOT NULL,\n            email TEXT UNIQUE,\n            created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n        )\n    `\n})\n```\n\n### Analytics\n\n```javascript\n// Get today's analytics\nanalytics_get({\n    zoneId: \"your_zone_id\",\n    since: \"2024-11-26T00:00:00Z\",\n    until: \"2024-11-26T23:59:59Z\"\n})\n```\n\n### Durable Objects\n\n```javascript\n// List Durable Objects namespaces\ndurable_objects_list()\n\n// Create a new Durable Objects namespace\ndurable_objects_create({\n    name: \"my-durable-object\",\n    script_name: \"my-worker\",\n    class_name: \"MyDurableObjectClass\"\n})\n\n// Delete a Durable Objects namespace\ndurable_objects_delete({\n    id: \"your_namespace_id\"\n})\n\n// List instances for a namespace\ndurable_objects_list_instances({\n    namespaceId: \"your_namespace_id\",\n    limit: 100 // optional\n})\n\n// Get details about a specific instance\ndurable_objects_get_instance({\n    namespaceId: \"your_namespace_id\",\n    instanceId: \"your_instance_id\"\n})\n\n// Delete a specific instance\ndurable_objects_delete_instance({\n    namespaceId: \"your_namespace_id\",\n    instanceId: \"your_instance_id\"\n})\n```\n\n### Queues\n\n```javascript\n// List all queues\nqueues_list()\n\n// Create a new queue\nqueues_create({\n    name: \"my-queue\",\n    settings: {\n        delivery_delay: 0,\n        dead_letter_queue: \"dead-letter-queue\" // optional\n    }\n})\n\n// Delete a queue\nqueues_delete({\n    name: \"my-queue\"\n})\n\n// Get queue details\nqueues_get({\n    name: \"my-queue\"\n})\n\n// Send a message to a queue\nqueues_send_message({\n    queue: \"my-queue\",\n    messages: [\n        { body: JSON.stringify({ key: \"value\" }) }\n    ]\n})\n\n// Get messages from a queue\nqueues_get_messages({\n    queue: \"my-queue\",\n    batchSize: 10, // optional\n    visibilityTimeout: 30 // optional, in seconds\n})\n\n// Update a queue consumer\nqueues_update_consumer({\n    queue: \"my-queue\",\n    consumer: \"my-consumer\",\n    settings: {\n        dead_letter_queue: \"dead-letter-queue\",\n        batch_size: 10,\n        max_retries: 3\n    }\n})\n```\n\n### Workers AI\n\n```javascript\n// List available AI models\nworkers_ai_list_models()\n\n// Get details about a specific model\nworkers_ai_get_model({\n    model: \"@cf/meta/llama-2-7b-chat-int8\"\n})\n\n// Run inference using Workers AI\nworkers_ai_run_inference({\n    model: \"@cf/meta/llama-2-7b-chat-int8\",\n    input: {\n        messages: [\n            { role: \"system\", content: \"You are a helpful assistant.\" },\n            { role: \"user\", content: \"Hello, who are you?\" }\n        ]\n    },\n    options: {\n        temperature: 0.7,\n        max_tokens: 100\n    }\n})\n\n// List AI tasks\nworkers_ai_list_tasks()\n```\n\n### Workflows\n\n```javascript\n// List all workflows\nworkflows_list()\n\n// Create a new workflow\nworkflows_create({\n    name: \"my-workflow\",\n    content: \"// Workflow script content here\"\n})\n\n// Delete a workflow\nworkflows_delete({\n    name: \"my-workflow\"\n})\n\n// Get workflow details\nworkflows_get({\n    name: \"my-workflow\"\n})\n\n// Update a workflow\nworkflows_update({\n    name: \"my-workflow\",\n    content: \"// Updated workflow script content\"\n})\n\n// Execute a workflow\nworkflows_execute({\n    name: \"my-workflow\",\n    input: { key: \"value\" }\n})\n```\n\n### Templates\n\n```javascript\n// List available templates\ntemplates_list()\n\n// Get details about a specific template\ntemplates_get({\n    template: \"worker-typescript\"\n})\n\n// Create a worker from a template\ntemplates_create_from_template({\n    name: \"my-new-worker\",\n    template: \"worker-typescript\",\n    options: {\n        // Template-specific options\n    }\n})\n```\n\n### Workers for Platforms\n\n```javascript\n// List dispatchers\nw4p_list_dispatchers()\n\n// Create a new dispatcher\nw4p_create_dispatcher({\n    name: \"my-dispatcher\",\n    script: \"// Dispatcher script content\"\n})\n\n// Delete a dispatcher\nw4p_delete_dispatcher({\n    name: \"my-dispatcher\"\n})\n\n// Get dispatcher details\nw4p_get_dispatcher({\n    name: \"my-dispatcher\"\n})\n\n// Update dispatcher\nw4p_update_dispatcher({\n    name: \"my-dispatcher\",\n    script: \"// Updated dispatcher script content\"\n})\n```\n\n### Service Bindings\n\n```javascript\n// List all service bindings for a worker\nbindings_list({\n    workerName: \"my-worker\"\n})\n\n// Create a new service binding\nbindings_create({\n    workerName: \"my-worker\",\n    bindingName: \"MY_SERVICE\",\n    serviceEnvironment: \"production\",\n    serviceName: \"target-worker\"\n})\n\n// Update a service binding\nbindings_update({\n    workerName: \"my-worker\",\n    bindingName: \"MY_SERVICE\",\n    serviceEnvironment: \"staging\",\n    serviceName: \"target-worker\"\n})\n\n// Delete a service binding\nbindings_delete({\n    workerName: \"my-worker\",\n    bindingName: \"MY_SERVICE\"\n})\n```\n\n### URL Routing\n\n```javascript\n// List all routes for a worker\nrouting_list_routes({\n    workerName: \"my-worker\"\n})\n\n// Create a new route\nrouting_create_route({\n    workerName: \"my-worker\",\n    pattern: \"example.com/*\",\n    zoneId: \"your_zone_id\"\n})\n\n// Update a route\nrouting_update_route({\n    routeId: \"your_route_id\",\n    pattern: \"api.example.com/*\",\n    zoneId: \"your_zone_id\"\n})\n\n// Delete a route\nrouting_delete_route({\n    routeId: \"your_route_id\"\n})\n```\n\n### Cron Triggers\n\n```javascript\n// List all cron triggers for a worker\ncron_list({\n    workerName: \"my-worker\"\n})\n\n// Create a new cron trigger\ncron_create({\n    workerName: \"my-worker\",\n    schedule: \"*/5 * * * *\",\n    timezone: \"UTC\" // optional\n})\n\n// Update a cron trigger\ncron_update({\n    triggerId: \"your_trigger_id\",\n    schedule: \"0 */2 * * *\",\n    timezone: \"America/New_York\"\n})\n\n// Delete a cron trigger\ncron_delete({\n    triggerId: \"your_trigger_id\"\n})\n```\n\n### Zones & Domains\n\n```javascript\n// List all zones\nzones_list()\n\n// Create a new zone\nzones_create({\n    name: \"example.com\",\n    account: {\n        id: \"your_account_id\"\n    }\n})\n\n// Get zone details\nzones_get({\n    zoneId: \"your_zone_id\"\n})\n\n// Delete a zone\nzones_delete({\n    zoneId: \"your_zone_id\"\n})\n\n// Check zone activation status\nzones_check_activation({\n    zoneId: \"your_zone_id\"\n})\n```\n\n### Secrets\n\n```javascript\n// List all secrets for a worker\nsecrets_list({\n    workerName: \"my-worker\"\n})\n\n// Create or update a secret\nsecrets_put({\n    workerName: \"my-worker\",\n    secretName: \"API_KEY\",\n    secretValue: \"your-secret-api-key\"\n})\n\n// Delete a secret\nsecrets_delete({\n    workerName: \"my-worker\",\n    secretName: \"API_KEY\"\n})\n```\n\n### Version Management\n\n```javascript\n// List all versions of a worker\nversions_list({\n    workerName: \"my-worker\"\n})\n\n// Get details about a specific version\nversions_get({\n    workerName: \"my-worker\",\n    versionId: \"your_version_id\"\n})\n\n// Rollback to a previous version\nversions_rollback({\n    workerName: \"my-worker\",\n    versionId: \"your_version_id\"\n})\n```\n\n### Wrangler Config\n\n```javascript\n// Get current wrangler configuration\nwrangler_get_config()\n\n// Update wrangler configuration\nwrangler_update_config({\n    config: {\n        name: \"my-worker\",\n        main: \"src/index.ts\",\n        compatibility_date: \"2024-03-11\",\n        workers_dev: true\n    }\n})\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","readmeFilename":"README.md"}