Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/workers-bindings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"check:lint": "run-eslint-workers",
"check:types": "run-tsc",
"deploy": "wrangler deploy",
"deploy:staging": "wrangler deploy --env staging",
"deploy:production": "wrangler deploy --env production",
"dev": "wrangler dev",
"start": "wrangler dev",
"types": "wrangler types",
Expand Down
2 changes: 2 additions & 0 deletions apps/workers-bindings/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from '@repo/mcp-common/src/cloudflare-oauth-handler'
import { registerAccountTools } from '@repo/mcp-common/src/tools/account'
import { registerKVTools } from '@repo/mcp-common/src/tools/kv_namespace'
import { registerR2BucketTools } from '@repo/mcp-common/src/tools/r2_bucket'
import { registerWorkersTools } from '@repo/mcp-common/src/tools/worker'

import type { AccountSchema, UserSchema } from '@repo/mcp-common/src/cloudflare-oauth-handler'
Expand Down Expand Up @@ -37,6 +38,7 @@ export class WorkersBindingsMCP extends McpAgent<Env, WorkersBindingsMCPState, P
registerAccountTools(this)
registerKVTools(this)
registerWorkersTools(this)
registerR2BucketTools(this)
}
getActiveAccountId() {
// TODO: Figure out why this fail sometimes, and why we need to wrap this in a try catch
Expand Down
82 changes: 48 additions & 34 deletions apps/workers-bindings/wrangler.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,53 @@
},
"vars": {
"ENVIRONMENT": "development"
},
"workers_dev": false,
"preview_urls": false,
"env": {
"staging": {
"name": "mcp-cloudflare-workers-bindings-staging",
"account_id": "8995c0f49cdcf57eb54d2c1e52b7d2f3",
"routes": [{ "pattern": "bindings-staging.mcp.cloudflare.com", "custom_domain": true }],
"durable_objects": {
"bindings": [
{
"class_name": "WorkersBindingsMCP",
"name": "MCP_OBJECT"
}
]
},
"kv_namespaces": [
{
"binding": "OAUTH_KV",
"id": "18e839155d00407095d793dcf7e78f25"
}
],
"vars": {
"ENVIRONMENT": "staging"
}
},
"production": {
"name": "mcp-cloudflare-workers-bindings-production",
"account_id": "8995c0f49cdcf57eb54d2c1e52b7d2f3",
"routes": [{ "pattern": "bindings.mcp.cloudflare.com", "custom_domain": true }],
"durable_objects": {
"bindings": [
{
"class_name": "WorkersBindingsMCP",
"name": "MCP_OBJECT"
}
]
},
"kv_namespaces": [
{
"binding": "OAUTH_KV",
"id": "f9782295993747df90c29c45ca89edb1"
}
],
"vars": {
"ENVIRONMENT": "production"
}
}
}
/**
* Smart Placement
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
*/
// "placement": { "mode": "smart" },

/**
* Bindings
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
* databases, object storage, AI inference, real-time communication and more.
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
*/

/**
* Environment Variables
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
*/
// "vars": { "MY_VARIABLE": "production_value" },
/**
* Note: Use secrets to store sensitive data.
* https://developers.cloudflare.com/workers/configuration/secrets/
*/

/**
* Static Assets
* https://developers.cloudflare.com/workers/static-assets/binding/
*/
// "assets": { "directory": "./public/", "binding": "ASSETS" },

/**
* Service Bindings (communicate between multiple Workers)
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
*/
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
}
Loading
Loading