AI Builder Prompts
Copy-paste prompts that tell Lovable, Replit, v0 and Bolt to use Memberstack for member logins, paid plans and gated content. There is a short path for Webflow too.
Lovable, Replit, v0 and Bolt each have their own or a partner's logins, database and payments built in. Each prompt below names Memberstack for those jobs, tells the builder what not to build, and states the limits of hiding content in the browser.
Builders change their menus and defaults often. The settings and menu names on this page come from each builder's own docs. If a step does not match what you see, follow the builder's docs.
Before You Start
- You need a Memberstack account and an app.
- Copy your public key from the Memberstack dashboard, under Developer tools. Start in test mode: the test key starts with
pk_sb_and the live key starts withpk_. - In the prompt, replace
YOUR_PUBLIC_KEYwith that key. A public key is safe in front-end code. - For paid plans, connect Stripe in the Memberstack dashboard and create a plan with a price. A checkout uses the price ID (
prc_...). Other SDK calls use the plan ID (pln_...).
Never paste a secret key into a builder chat or into front-end code. The prompts only need your public key.
Lovable
- Replace
YOUR_PUBLIC_KEYin the prompt with your test public key. - In Account settings → Preferences → Agent permissions, set Enable Cloud to Ask each time or Never allow. The default is Always allow, which lets Lovable turn on its own backend (database, auth and more) without asking. A prompt cannot change this setting.
- Optional: add the Memberstack MCP server. Open Connectors, choose Add custom, then MCP server. Enter a name, keep Direct connection, enter
https://mcp.memberstack.com/mcp, keep OAuth as the auth method and click Add & authorize. Sign in with your Memberstack account.
Add memberships to this app with Memberstack. Memberstack handles member signup and login, paid plans through Stripe checkout, and gated pages or content.
Do not build your own version of any of this:
- Do not build your own auth: no login system, no users table for logins, no password storage, no sessions.
- Do not build your own payments: no Stripe integration code, no checkout, no payment webhooks.
- Do not use Lovable Cloud for logins, member data or payments. Do not use Lovable's built-in payments or its Stripe integration.
Steps:
1. Look at the project first. If there is no app yet, ask me what I want to build. If it already has login or payments, stop and ask me before you change it.
2. Read https://developers.memberstack.com/llms.txt and use the method names and argument shapes from it, not from memory.
3. Install the @memberstack/dom npm package. Initialize it once, in browser code only: memberstackDOM.init({ publicKey: "YOUR_PUBLIC_KEY" }). If the key still says YOUR_PUBLIC_KEY, ask me for it. I find it in my Memberstack dashboard under Developer tools.
4. Start in test mode. Test public keys start with pk_sb_ and live public keys start with pk_.
5. Build signup, login and logout with memberstack.signupMemberEmailPassword({ email, password }), memberstack.loginMemberEmailPassword({ email, password }) and memberstack.logout().
6. Stop and tell me how to sign up a test member in the preview. Never ask me for a password in chat. Go on when I say the test member shows in my Memberstack dashboard.
7. Add paid plans with memberstack.purchasePlansWithCheckout({ priceId }). Checkout takes a price ID (prc_...). Plans in other calls take a plan ID (pln_...). Get the IDs from me or from the Memberstack MCP server. Do not make them up.
8. Gate members-only pages: const { data: member } = await memberstack.getCurrentMember(). member is null when logged out. Check member.planConnections for the plan.
Limits:
- @memberstack/dom runs only in the browser. Do not call it in server code or at build time.
- Only the public key goes in front-end code. Never put a secret key in front-end code or in this chat.
- Hiding content in the browser is not security. The content is still sent to the visitor. Anything that must stay private needs a server check: send the member token from memberstack.getMemberCookie() to the server and verify it with @memberstack/admin verifyToken({ token, audience }), where audience is my Memberstack app ID. Tell me if this app needs one.
- If the Memberstack MCP server (https://mcp.memberstack.com/mcp) is connected, use it to create plans, prices and gated content, and ask me before each change. If it is not, ask me to add it (I sign in with my Memberstack account, there is no API key) or to give you the IDs. It works for you while building. The finished app must not call it.
When you are done, list what you changed and how I can test it.Or open Lovable with this prompt filled in. Lovable does not send it until you click send, so replace YOUR_PUBLIC_KEY first.
Replit
- Replace
YOUR_PUBLIC_KEYin the prompt with your test public key. - You do not need to change a setting. Replit adds Clerk Auth by default on its Starter, Core and Pro plans, and Replit Auth on Enterprise. Replit Agent uses the provider you name instead, and the prompt names Memberstack.
- Optional: add the Memberstack MCP server. Open Settings → Integrations → Your integrations, choose Add custom, then Add personal MCP server. Enter a display name, paste
https://mcp.memberstack.com/mcpand click Test & save. Sign in with your Memberstack account when asked.
Add memberships to this app with Memberstack. Memberstack handles member signup and login, paid plans through Stripe checkout, and gated pages or content.
Do not build your own version of any of this:
- Do not build your own auth: no login system, no users table for logins, no password storage, no sessions.
- Do not build your own payments: no Stripe integration code, no checkout, no payment webhooks.
- Do not add Clerk Auth or Replit Auth. Do not create a users table for logins in the Replit database. Do not add the Stripe connector or any other payments connector.
Steps:
1. Look at the project first. If there is no app yet, ask me what I want to build. If it already has login or payments, stop and ask me before you change it.
2. Read https://developers.memberstack.com/llms.txt and use the method names and argument shapes from it, not from memory.
3. Install the @memberstack/dom npm package. Initialize it once, in browser code only: memberstackDOM.init({ publicKey: "YOUR_PUBLIC_KEY" }). If the key still says YOUR_PUBLIC_KEY, ask me for it. I find it in my Memberstack dashboard under Developer tools.
4. Start in test mode. Test public keys start with pk_sb_ and live public keys start with pk_.
5. Build signup, login and logout with memberstack.signupMemberEmailPassword({ email, password }), memberstack.loginMemberEmailPassword({ email, password }) and memberstack.logout().
6. Stop and tell me how to sign up a test member in the preview. Never ask me for a password in chat. Go on when I say the test member shows in my Memberstack dashboard.
7. Add paid plans with memberstack.purchasePlansWithCheckout({ priceId }). Checkout takes a price ID (prc_...). Plans in other calls take a plan ID (pln_...). Get the IDs from me or from the Memberstack MCP server. Do not make them up.
8. Gate members-only pages: const { data: member } = await memberstack.getCurrentMember(). member is null when logged out. Check member.planConnections for the plan.
Limits:
- @memberstack/dom runs only in the browser. Do not call it in server code or at build time.
- Only the public key goes in front-end code. Never put a secret key in front-end code or in this chat.
- Hiding content in the browser is not security. The content is still sent to the visitor. Anything that must stay private needs a server check: send the member token from memberstack.getMemberCookie() to the server and verify it with @memberstack/admin verifyToken({ token, audience }), where audience is my Memberstack app ID. Tell me if this app needs one.
- If the Memberstack MCP server (https://mcp.memberstack.com/mcp) is connected, use it to create plans, prices and gated content, and ask me before each change. If it is not, ask me to add it (I sign in with my Memberstack account, there is no API key) or to give you the IDs. It works for you while building. The finished app must not call it.
When you are done, list what you changed and how I can test it.v0
- Replace
YOUR_PUBLIC_KEYin the prompt with your test public key. - You do not need to change a setting. If v0 shows a card in the chat that asks you to connect an auth provider such as Clerk, a database or Stripe, do not connect it.
- Optional: add the Memberstack MCP server. Open the + menu in the prompt form, choose MCPs and add a custom server with the URL
https://mcp.memberstack.com/mcp. Choose OAuth as the auth type, and make sure the server is enabled.
Add memberships to this app with Memberstack. Memberstack handles member signup and login, paid plans through Stripe checkout, and gated pages or content.
Do not build your own version of any of this:
- Do not build your own auth: no login system, no users table for logins, no password storage, no sessions.
- Do not build your own payments: no Stripe integration code, no checkout, no payment webhooks.
- Do not add Clerk or any other auth integration. Do not add a database integration such as Supabase or Neon for logins. Do not add the Stripe integration.
Steps:
1. Look at the project first. If there is no app yet, ask me what I want to build. If it already has login or payments, stop and ask me before you change it.
2. Read https://developers.memberstack.com/llms.txt and use the method names and argument shapes from it, not from memory.
3. Install the @memberstack/dom npm package. Initialize it once, in browser code only: memberstackDOM.init({ publicKey: "YOUR_PUBLIC_KEY" }). If the key still says YOUR_PUBLIC_KEY, ask me for it. I find it in my Memberstack dashboard under Developer tools.
4. Start in test mode. Test public keys start with pk_sb_ and live public keys start with pk_.
5. Build signup, login and logout with memberstack.signupMemberEmailPassword({ email, password }), memberstack.loginMemberEmailPassword({ email, password }) and memberstack.logout().
6. Stop and tell me how to sign up a test member in the preview. Never ask me for a password in chat. Go on when I say the test member shows in my Memberstack dashboard.
7. Add paid plans with memberstack.purchasePlansWithCheckout({ priceId }). Checkout takes a price ID (prc_...). Plans in other calls take a plan ID (pln_...). Get the IDs from me or from the Memberstack MCP server. Do not make them up.
8. Gate members-only pages: const { data: member } = await memberstack.getCurrentMember(). member is null when logged out. Check member.planConnections for the plan.
Limits:
- @memberstack/dom runs only in the browser. Do not call it in server code or at build time.
- Only the public key goes in front-end code. Never put a secret key in front-end code or in this chat.
- Hiding content in the browser is not security. The content is still sent to the visitor. Anything that must stay private needs a server check: send the member token from memberstack.getMemberCookie() to the server and verify it with @memberstack/admin verifyToken({ token, audience }), where audience is my Memberstack app ID. Tell me if this app needs one.
- If the Memberstack MCP server (https://mcp.memberstack.com/mcp) is connected, use it to create plans, prices and gated content, and ask me before each change. If it is not, ask me to add it (I sign in with my Memberstack account, there is no API key) or to give you the IDs. It works for you while building. The finished app must not call it.
When you are done, list what you changed and how I can test it.Bolt
- Replace
YOUR_PUBLIC_KEYin the prompt with your test public key. - Bolt's docs list no setting that turns its own database off. Bolt creates a database when a project needs one, so watch what it builds. If it starts to add a database, sign-in or its Stripe integration, stop it and repeat the "Do not build" part of the prompt.
- Optional: add the Memberstack MCP server. Click the plus icon in the chat box, then Connectors, Manage connectors and Custom MCP server. Enter a name and the URL
https://mcp.memberstack.com/mcp, choose HTTP as the transport and MCP OAuth as the auth, and click Connect.
Add memberships to this app with Memberstack. Memberstack handles member signup and login, paid plans through Stripe checkout, and gated pages or content.
Do not build your own version of any of this:
- Do not build your own auth: no login system, no users table for logins, no password storage, no sessions.
- Do not build your own payments: no Stripe integration code, no checkout, no payment webhooks.
- Do not use Bolt Cloud sign-in. Do not create a Bolt database for logins or member data. Do not use Bolt's Stripe integration.
Steps:
1. Look at the project first. If there is no app yet, ask me what I want to build. If it already has login or payments, stop and ask me before you change it.
2. Read https://developers.memberstack.com/llms.txt and use the method names and argument shapes from it, not from memory.
3. Install the @memberstack/dom npm package. Initialize it once, in browser code only: memberstackDOM.init({ publicKey: "YOUR_PUBLIC_KEY" }). If the key still says YOUR_PUBLIC_KEY, ask me for it. I find it in my Memberstack dashboard under Developer tools.
4. Start in test mode. Test public keys start with pk_sb_ and live public keys start with pk_.
5. Build signup, login and logout with memberstack.signupMemberEmailPassword({ email, password }), memberstack.loginMemberEmailPassword({ email, password }) and memberstack.logout().
6. Stop and tell me how to sign up a test member in the preview. Never ask me for a password in chat. Go on when I say the test member shows in my Memberstack dashboard.
7. Add paid plans with memberstack.purchasePlansWithCheckout({ priceId }). Checkout takes a price ID (prc_...). Plans in other calls take a plan ID (pln_...). Get the IDs from me or from the Memberstack MCP server. Do not make them up.
8. Gate members-only pages: const { data: member } = await memberstack.getCurrentMember(). member is null when logged out. Check member.planConnections for the plan.
Limits:
- @memberstack/dom runs only in the browser. Do not call it in server code or at build time.
- Only the public key goes in front-end code. Never put a secret key in front-end code or in this chat.
- Hiding content in the browser is not security. The content is still sent to the visitor. Anything that must stay private needs a server check: send the member token from memberstack.getMemberCookie() to the server and verify it with @memberstack/admin verifyToken({ token, audience }), where audience is my Memberstack app ID. Tell me if this app needs one.
- If the Memberstack MCP server (https://mcp.memberstack.com/mcp) is connected, use it to create plans, prices and gated content, and ask me before each change. If it is not, ask me to add it (I sign in with my Memberstack account, there is no API key) or to give you the IDs. It works for you while building. The finished app must not call it.
When you are done, list what you changed and how I can test it.The Memberstack MCP Server
All four builders accept a custom MCP server by URL. The Memberstack MCP server is at https://mcp.memberstack.com/mcp. You sign in with your Memberstack account. There is no API key to paste.
It works while you build: the builder can create plans, prices and gated content in your Memberstack app. It is not part of the finished app, and the finished app must not call it. The MCP Server page lists what it can do.
Test mode keeps test members apart from live members. Plans, prices and gated content are shared by test mode and live mode, so a change the builder makes to them changes your live setup. Read what it plans to do before you approve it.
Creating a price through the MCP server needs a connected Stripe account, a paid Memberstack subscription and live mode.
Limits
@memberstack/domruns only in the browser. It cannot run in server code or at build time.- Hiding a page or a section in the browser is not security. The content is still sent to the visitor.
- Anything that must stay private needs a check on a server. The browser sends the member token from
memberstack.getMemberCookie(), and the server verifies it with@memberstack/admin:verifyToken({ token, audience }), whereaudienceis your app ID. Withoutaudience, a token from another Memberstack app also passes. - The server check needs your secret key. Store it as a server-side secret or environment variable. Never put it in front-end code or in the chat.
The Verification page has the full server code.
Check What the Builder Made
When the builder says it is done, check these yourself:
- Sign up a test member in the preview. It should show in your Memberstack dashboard in test mode.
- Log out and open a members-only page. You should be sent to log in, or see no member content.
- Look through the project for a users table, stored passwords (a password column or hashing code), another login provider or Stripe code. If you find any, tell the builder to remove it and use Memberstack. The password box on the login form is fine: it sends the password to Memberstack.
- Check that no secret key is in the front-end code.
Webflow
Webflow sites do not use the npm package or the prompts above. On Webflow, Memberstack works through its script and data-ms-* attributes that you add to elements in the Designer. There is nothing to install with npm.
data-ms-form="signup"anddata-ms-form="login"on formsdata-ms-content="members"on content only logged-in members should seedata-ms-price:add="prc_..."on a button that starts a Stripe checkout
Webflow turned off its own User Accounts feature on January 29, 2026. Its announcement names Memberstack as one of its recommended partners.
The same limit applies on Webflow: content hidden with data-ms-content is still sent to the browser. If an AI agent edits your Webflow site, tell it the site uses Memberstack attributes and that it must not install @memberstack/dom. The script already provides window.$memberstackDom.
For the Webflow setup, follow the Memberstack help center.