MCP overview
The MCP server is the primary write interface for AI clients like Claude and ChatGPT. It runs as a Supabase Edge Function using the streamable HTTP transport, and it exposes the pipeline as a set of workflow-level tools — not raw table access.
Endpoint
https://jionfqfmjinkrmzlsghf.supabase.co/functions/v1/mcp
A Cloudflare Worker proxy at https://mcp.contentpipe.app fronts the same function.
Design principle: tools are workflow-level, not table-level
Clients never set status directly. They call intent-named tools — submit_for_review, start_promoting, review_publication — whose transitions are validated in the database. This keeps AI clients from producing invalid states and makes the audit log meaningful.
Under the hood each tool handler is thin: validate input with zod → call a workflow RPC that owns the transition → return the updated row. The RPCs run SECURITY INVOKER, so RLS and the transition triggers apply to the calling user.
Each tool ships a small, descriptive JSON schema — those schemas double as the AI client's own documentation. The tools reference mirrors them.
What a client can do
- Discover context — list projects, read a project's brand, browse collections and publications, search content, get a pipeline dashboard.
- Plan — create collections and stubs, batch-create a whole campaign.
- Write & review — draft and edit publications, submit for review, record verdicts, mark published.
- Promote — start promoting, draft per-channel promos, review and publish them.
- Handle media — pull image URLs into Storage and attach them.
See the tools reference for the full surface, and authentication to connect a client.
Errors self-correct
An invalid transition returns a structured error naming the current status and allowed next states — e.g. invalid publication transition: draft -> promoting (allowed from draft: reviewing, archived) — so the model can fix its own call without a human in the loop. All mutations return the updated entity, so no follow-up read is needed.