Build and publish a paywall with an AI assistant
To build a paywall with an AI assistant, connect your MCP client to https://api.billdog.io/mcp and sign in with BillDog. Then ask it to design a paywall: the agent calls design_paywall to save a draft, preview_paywall for a link you can check, and, once you confirm, publish_paywall and link_placement to put it live. New items start as drafts or inactive, and the agent should ask before anything reaches users.
Steps last checked against the SDK source on 15 Nov 2026.
What you'll build
- Your AI assistant connected to your BillDog project
- A paywall draft designed from a prompt, previewed on a link
- The paywall published and served from a placement
What you'll need
- An MCP client: Claude Code, Claude (web or desktop), Cursor, VS Code, Windsurf, or any client that supports remote MCP
- A BillDog project (sign up) with at least one product in an offering. If you have none, ask the agent to create them with
create_product,create_offeringandmanage_offering_packages
1. Connect your assistant
3 minThe server URL is https://api.billdog.io/mcp. It signs you in with OAuth (“Sign in with BillDog”), so there's no key to paste.
claude mcp add --transport http billdog https://api.billdog.io/mcp
# then run /mcp and choose Authenticate- Claude (web or desktop): Settings → Connectors → Add custom connector, and paste the URL.
- Cursor and VS Code: use the one-click install links in the MCP server guide.
- Other clients:
npx -y mcp-remote https://api.billdog.io/mcp.
2. Choose what the agent may do
2 minUnder Project, choose the one project the assistant may use. The consent screen then lists the permissions. Read this project is always granted; the rest you choose:
- Read this project: analytics, products, entitlements, offerings, paywalls, placements, surveys and setup status.
- Create and edit configuration: products, entitlements, offerings, placements and draft paywalls.
- Publish and go live: publishing and linking placements (needed for the last steps).
- See your project list and Create projects and SDK keys.
Dashboard AI Assistant (MCP) Keys (bd_mcp_…) are read-only. They're useful for analytics questions, but this codelab needs the sign-in flow.
3. Ask for a paywall draft
4 minDescribe what you want in plain words. A prompt that names your offering and audience works best:
Design a paywall for my meditation app's "premium" offering.
Dark theme, highlight the annual plan with a 7-day free trial,
three benefit bullets, and a clear close button.The agent calls design_paywall, which saves an inactive draft, so nothing changes for users. Ask it to pass your offering (offering_id) so the paywall sells the products your placement serves. Designing from a prompt uses one AI credit; building from a recipe or a template (list_templates, create_paywall_from_template) uses none. It can tweak copy and colors with update_paywall.
4. Preview the draft
2 minAsk “give me a preview link”. preview_paywall runs the publish checks and returns a short-lived link (24 hours by default) you can open on your phone or share for feedback. Iterate in the chat until it looks right.
5. Publish it
2 minSay “publish it”. The agent should confirm with you first, then call publish_paywall. Publishing refuses a paywall with no way out (no close button) unless you've said it's meant to be a hard paywall.
On a live project (a production purchase, or 10 or more production customers, in the last 30 days), publishing returns awaiting approval with a link. So does every other go-live change: unpublishing a paywall, changing the current offering, linking a placement, changing an offering's packages or an entitlement's products, starting, pausing or ending an experiment or shipping its winner, a feature flag change that alters what users get, and updating a product. An owner or admin approves them under Integration & Data → Agent Approvals.
6. Put it on a placement
3 minAsk the agent to create a placement (create_placement) such as onboarding, link your offering to it (link_placement), and check what users will see with resolve_placement_preview. Then call register('onboarding') in your app, as in the iOS, Android or Flutter codelab.
Going further: ask it to create_experiment between this paywall and another, start_experiment, and later get_experiment_results. The A/B test codelab explains what's being measured.