Flarelink MCP
OfficialProvides knowledge and tools for building on Cloudflare's developer stack (D1, R2, KV, Auth) and allows managing Cloudflare projects, D1 databases, and R2 buckets via the Flarelink dashboard API.
@flarelink/mcp
An MCP server that teaches your AI coding tool to build correctly on the Flarelink stack — Cloudflare auth (better-auth + KV sessions), D1, and R2 — from inside Cursor, Claude Code, Windsurf, and anything else that speaks MCP.
It hands the agent the security and cost rules up front (user-scoping, identifier-safe SQL, KV sessions, presigned R2) so the generated code is right the first time, instead of the agent guessing and you debugging.
Install
No install needed — run it with npx. Add it to your tool's MCP config:
Claude Code
claude mcp add flarelink -- npx -y @flarelink/mcpCursor / Windsurf / Claude Desktop (mcp.json / config):
{
"mcpServers": {
"flarelink": {
"command": "npx",
"args": ["-y", "@flarelink/mcp"],
"env": { "FLARELINK_API_KEY": "flk_…" }
}
}
}The FLARELINK_API_KEY is optional. Without it you still get all the
knowledge + scaffolding tools. With it, the management tools (below) can
drive your actual Flarelink projects. Mint a key at
dash.flarelink.dev → API keys.
Related MCP server: Cloudflare MCP Server
Tools
Tool | What it gives the agent |
| The stack, cardinal rules, and deployment shapes. Read first. |
| How to bootstrap a complete working app (clone / one-click deploy) + file map. |
| The catalog of canonical code patterns. |
| Copy-pasteable code for one recipe (auth setup, route guards, identifier-safe D1, R2 upload/presign, wrangler bindings, SDK usage). |
|
|
| Cloudflare cost-optimization guidance, with targeted hints for the feature you describe. |
It also exposes the stack guide as a resource (flarelink://stack-guide) you can attach as context.
Management tools (need FLARELINK_API_KEY)
Drive your actual Flarelink projects from the editor. These route through the Flarelink dashboard API and act exactly as you would in the UI.
Tool | What it does |
| Verify the key; show the user + active connection/project. |
| List projects on the active Cloudflare connection. |
| List the project's D1 databases. |
| Run a (parameterized) SQL statement against a project D1. |
| List the project's R2 buckets. |
Without a key they return a clear "set FLARELINK_API_KEY" message. The key has the same access as your Flarelink login — treat it like a password.
License
MIT. Part of Flarelink — the dashboard for the Cloudflare developer stack.
Available Tools
11 toolsflarelink_cost_patternsCloudflare cost-optimization patternsA
Design guidance (not a live usage meter) for keeping a Cloudflare bill near zero. Optionally describe the feature you are building to get targeted hints first.
Inputs: feature.
flarelink_get_patternGet a Flarelink code patternA
Return the canonical, copy-pasteable code for one Flarelink-stack recipe (auth setup, route guards, identifier-safe D1 queries, R2 uploads/presigning, wrangler bindings, SDK usage). Prefer these over inventing your own — they encode the security + cost rules.
Inputs: pattern (required).
flarelink_list_bucketsFlarelink — list R2 bucketsA
List the R2 buckets attached to the active Flarelink project.
Inputs: no named parameters.
flarelink_list_databasesFlarelink — list D1 databasesA
List the D1 databases attached to the active Flarelink project (id, name, whether it hosts the auth module).
Inputs: no named parameters.
flarelink_list_patternsList Flarelink code patternsA
List the available canonical code patterns (keys + what each is for). Use flarelink_get_pattern to fetch one.
Inputs: no named parameters.
flarelink_list_projectsFlarelink — list projectsA
List the Flarelink projects on the active Cloudflare connection.
Inputs: no named parameters.
flarelink_query_databaseFlarelink — query a D1 databaseA
Run a SQL statement against one of the project's D1 databases via Flarelink. Use bound parameters (? placeholders + params) — never concatenate user input. Returns rows + query meta (duration, rows_read/written). This runs with full database access; prefer SELECT unless you intend to write.
Inputs: sql (required), databaseId (required), params.
flarelink_scaffoldScaffold a Flarelink-stack appA
How to bootstrap a complete, working Flarelink-stack app (auth + D1 + R2): clone command, one-click deploy, file map, and where to add features.
Inputs: no named parameters.
flarelink_sdk_reference@flarelink/client SDK referenceA
Signatures and return shapes for the @flarelink/client SDK (auth / storage / db). Use when the app talks to a hosted Flarelink auth Worker rather than embedding better-auth.
Inputs: surface.
flarelink_stack_overviewFlarelink stack overviewA
Read this first. The Flarelink stack (Cloudflare auth via better-auth + KV sessions, D1, R2), its cardinal rules, and the two deployment shapes. Call before building auth/database/file features on Cloudflare.
Inputs: no named parameters.
flarelink_whoamiFlarelink — who am IA
Verify the FLARELINK_API_KEY and show the signed-in user plus the active Cloudflare connection and project. Call this first to confirm management tools are wired up.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool has a clearly distinct purpose: knowledge/guidance tools (stack_overview, scaffold, sdk_reference, cost_patterns) vs. pattern listing/fetching (list_patterns, get_pattern) vs. operational tools (whoami, list_projects, list_databases, query_database, list_buckets). No two tools overlap in functionality, and the list/get/query pattern is clean.
All tools share the 'flarelink_' prefix and use snake_case, but the naming convention is mixed: some are verb_noun (list_patterns, get_pattern, list_projects, query_database, list_buckets) while others are noun-only (stack_overview, sdk_reference, cost_patterns, whoami, scaffold). The inconsistency is minor and readable, but not perfectly uniform.
With 11 tools, the server is well-scoped. The count balances educational/guidance tools with a focused set of management/query tools, each earning its place without redundancy or bloat.
The tool surface covers the core workflows: bootstrapping (scaffold), learning the stack (overview, patterns, SDK reference), verifying access (whoami), and viewing/querying resources (list_*, query_database). Missing operations include create/delete for projects, databases, or buckets, and there's no direct user management, but these gaps are workable via the scaffold and patterns.
Maintenance
Related MCP Connectors
Backend for AI-built apps: database, auth, files, email, AI, payments, deploy, realtime. 170+ tools.
Chat, mail, boards, notes, calendar, contacts and digests in one AI app, free on your Cloudflare.
Backend for vibe coders. Connect Butterbase to any MCP-compatible AI coding tool and provision a full backend automatically — database, authentication, file storage, edge functions, and real-time — from a natural language prompt. No SQL, no configuration, no backend knowledge required. Free to start at butterbase.ai.
Build and deploy backends: auth, Postgres/MySQL/vector databases, storage, functions, hosting, CDN
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA production-ready template for building MCP servers on Cloudflare Workers with social login (Google, Microsoft, GitHub), D1 database, admin dashboard, and built-in AI chat testing across multiple providers.79 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language interaction with Cloudflare services including Workers, observability, documentation, and Radar for managing configurations, analytics, and internet insights.1,735 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceManage Cloudflare resources such as Workers, KV, R2, D1, Durable Objects, and more using natural language via the Model Context Protocol.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to access a shared, authenticated memory and project management system with durable storage, task tracking, roadmaps, and semantic search, deployed on Cloudflare.MIT