Interact with Cloudflare services via MCP: Workers, KV, R2, D1, Hyperdrive, Observability, Builds, Audit, Container Sandbox.
File-based Pipeline (Pass Paths Only)
When integrating troubleshooting/changes into multi-step workflows, persist all evidence and artifacts to disk, passing only paths between agents/sub-agents.
Recommended directory structure (within project):
runs//active//
Input:
01-input/goal.md
(symptoms/objectives),
01-input/context.json
(account/worker/resource/time_range, etc.)
Evidence:
02-analysis/observability.md
,
02-analysis/audit.md
,
02-analysis/screenshots/
Plan:
03-plans/change-plan.md
(write operation plan; must write here and await confirmation first)
Must clearly list operations to be executed and impact scope
Example output:
✅ Investigation complete: worker api-gateway experienced 5xx spike between 18:00-18:30
Root cause: New code deployed threw TypeError when processing /v2/users
Evidence:
- Logs: 18:02 first occurrence of "Cannot read property 'id' of undefined"
- Audit: 18:00 user dev@example.com deployed new version
- Metrics: error_rate jumped from 0.1% to 12%
Recommendation: Roll back to previous version, or fix /v2/users handler
Error Handling
Situation
Action
Account not set
Run
accounts_list
→
set_active_account
first
Resource doesn't exist
Verify ID/name is correct, list available resources
Insufficient permissions
Explain required permissions, suggest checking API token scope
Observability query too long
Split into smaller time ranges, ask more specific questions
Scenario Examples
See
scenarios.md
for 20 real-world development scenarios.