DocBuilder MCP β Vercel Publishing Playbook
Goal: Provide a business-friendly, repeatable flow for turning markdown content into a polished Vercel site with optional Supabase-backed password protection.
1. Prerequisites
- Node.js 20+ available locally
- Vercel CLI installed and logged in (
npm install -g vercel, thenvercel login). Inside the Sliplane image this is pre-baked; the CLI ships globally, so no install is needed at runtime. VERCEL_TOKENexported for unattended deploys (ask DevOps for the team token). When Sashaβs Web Publishing Assistant saves the token it is encrypted to disk and injected into the MCP launcher automatically.- Supabase project ready if password protection is required (we reuse the shared Sasha Supabase instance)
- Repo checked out locally; documentation lives under
docs/, configuration atdoc-builder.config.js - Vercel linkage captured in
html/.vercel/project.json(contains theprojectId/orgId). Keep this file checked in or mount it via volume so deployments know which Vercel project to target. - Quick validation: run
scripts/validate-web-publishing.sh(or with--strict) to confirm the container sees the CLI, config, token, and.vercel/project.jsonbefore attempting a deploy.
2. Install & Build the MCP Server
cd claudecodeui/integrations/mcp/docbuilder
npm install # installs @modelcontextprotocol/sdk, @knowcode/doc-builder, etc.
π Docker images handle this automatically. The Sliplane Docker build runs the same install/prune sequence, so the container ships with a ready-to-register DocBuilder MCP server. Use the command above only when developing locally.
If the workstation blocks npm installs, raise an approval request; everything runs offline after the initial install.
Vercel Configuration Reference
doc-builder.config.jsβdeployment.vercellists the Vercel project metadata (project name, projectId, orgId). Update these if you clone into a different Vercel project.html/.vercel/project.jsonmirrors the same identifiers for the Vercel CLI. If you ever rundocbuilder_buildwithclean=true, the MCP server automatically restores this file so the link persists.- Runtime requires
VERCEL_TOKEN(and, if you want fully non-interactive deploys, optionallyVERCEL_PROJECT_ID/VERCEL_ORG_IDenv varsβalready pre-populated from config when running through the MCP server). - Operators can edit all of these fieldsβincluding the encrypted Vercel token and Supabase keysβdirectly in Settings β Tools β Web Publishing Assistant; saving there rewrites
doc-builder.config.jsand the encryptedconfig/mcp/docbuilder.jsonin lockstep. - The MCP launcher reads
doc-builder.config.cjs(a generated twin of the.jsfile) so Node treats the settings as CommonJS even though the main app runs in ESM mode.
3. Register with Claude / Sasha Studio
claude mcp add docbuilder \
--env VERCEL_TOKEN=$VERCEL_TOKEN \
-- $(pwd)/claudecodeui/integrations/mcp/docbuilder/run-docbuilder-mcp.js
Verification checklist:
claude mcp listshowsdocbuilder- Smoke test
docbuilder_statustool returns site + directory info scripts/validate-web-publishing.sh --strictexits cleanly (optional but recommended whenever the container is rebuilt)
4. Day-to-day Workflow
- Status Check β run
docbuilder_statusto confirm docs + output folders and current auth mode. - Optional Auth Toggle β call
docbuilder_set_authwithmode="supabase"when you need password protection, ormode="public"to open access. - Build β run
docbuilder_build(setclean=trueif you want a fresh output folder). - Deploy β run
docbuilder_deploy:production=falsefor preview links (default)production=truewhen promoting the canonical sitepasswordProtection="supabase"to force login before publish, or"public"to disable it on this push
- Share Links β console output includes the latest deploy URL and production alias.
Business Summary
- Internal preview:
docbuilder_deploy(preview) β share the preview URL for sign-off. - Public launch:
docbuilder_deploywithproduction=trueβ announce production URL. - Client-gated launch:
docbuilder_deploywithpasswordProtection="supabase"β only invited Supabase users can sign in.
5. Approval Notes
- npm install β network call; request approval if the environment blocks package download.
- vercel login/link β interactive step; run once per machine, requires Vercel account permissions.
- Supabase credentials β stored in
doc-builder.config.js; confirm they are encrypted/managed per security handbook before enabling auth.
6. Troubleshooting Checklist
Missing entry pointβ ensureserver.jsexists and rerunnpm installinsidedocbuilder.VERCEL_TOKEN requiredβ export token or use--env VERCEL_TOKEN=...inclaude mcp add.Supabase auth errorsβ confirmauth.supabaseUrlandauth.supabaseAnonKeyindoc-builder.config.js, and that users exist indocbuilder_access.Preview works but production failsβ check Vercel project settings for stale Root Directory (htmlmust be cleared) and ensure Deployment Protection is off for public docs.
7. Future Enhancements
- Surface deploy history within Sasha UI via MCP status endpoint.
- Add smoke tests that verify Supabase login before marking deploy βdoneβ.
- Wire docbuilder tools into Tools panel documentation (
deployed-md-files/docs/tools/*.md).