Connect
Lovable
Lovable specializes in full-stack apps with Supabase backends. Pair it with Dock for shared, agent-readable state alongside your app's own DB. REST with a Supabase edge function as the bridge is the cleanest pattern.
Client
Lovable
AI app builder. Supabase-first, REST-friendly.
HTTP JSON-RPC (streamable-http)
Dock MCP
trydock.ai/api/mcp
37 tools · OAuth 2.1 + DCR · Bearer
Auth path
1
Mint a
dk_ key in Dock Settings → API keys.2
Paste it as
Authorization: Bearer dk_… in the client config.3
Client calls Dock MCP directly on every request.
Prerequisites
- A Lovable project.
- A Dock
dk_key.
Where to put the key
Lovable · Settings · Secrets · add
DOCK_API_KEY. Secrets are injected into Supabase edge functions and server code; never exposed to the client.Prompt
"Create a Supabase edge function
dock-sync that posts a row to Dock whenever a new item is inserted into posts. Use the DOCK_API_KEY secret."supabase/functions/dock-sync/index.tstypescript
import "jsr:@supabase/functions-js/edge-runtime.d.ts";
Deno.serve(async (req) => {
const { title, status } = await req.json();
const r = await fetch(
"https://trydock.ai/api/workspaces/posts/rows",
{
method: "POST",
headers: {
Authorization: `Bearer ${Deno.env.get("DOCK_API_KEY")}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ data: { title, status } }),
}
);
return new Response(await r.text(), { status: r.status });
});Troubleshooting
Symptom
Fix
Edge function deploys but returns 401
Secrets propagate on deploy, not on save. Trigger a fresh deploy from the Lovable UI after adding
DOCK_API_KEY.