What is Durable Objects MCP?
Durable Objects MCP is an unofficial MCP server that provides structured, read-only access to Cloudflare Durable Object SQLite storage from AI clients (Claude Code, Cursor, Windsurf, etc.). It allows developers to connect once, discover tables, and execute read-only queries against their DO instances directly from their AI coding assistant.
How to use Durable Objects MCP?
After adding a query() method to each Durable Object class and deploying the server as a Cloudflare Worker, you connect your MCP client to the Worker’s URL. Authentication happens via Cloudflare Access (OAuth) on first connect. Once connected, you invoke three tools: list_classes (list queryable DO classes), describe_schema (get tables and columns for a DO instance), and execute_read_query (run read-only SQL against a DO instance).
Key features of Durable Objects MCP
- Read-only SQL guard (blocks all non-SELECT statements)
- Cloudflare Access OAuth authentication with PKCE (S256)
- Explicit namespace scoping via
wrangler.jsonc bindings
- No public DO endpoints – only accessible through the MCP server
- Service bindings keep all traffic inside Cloudflare’s network
Use cases of Durable Objects MCP
- Inspect DO database schemas from your AI coding assistant
- Query DO storage for debugging or data exploration without the dashboard
- Retrieve specific rows (e.g., last messages, agent state) during development
- Programmatically audit DO data across thousands of instances
コメント