Memberstack
Stack Detection (IMPORTANT)
Before giving frontend code examples, determine the user's stack. Different stacks require different approaches:
| Stack | Frontend Approach | Reference File |
|---|---|---|
| Webflow | data-ms-* attributes (no-code) | webflow-attributes.md |
| React / Next.js / Vue / Svelte | DOM package (@memberstack/dom) | dom-package.md |
| Vanilla JS / HTML | DOM package or data attributes | Either |
| Node.js / Server-side | Admin SDK (backend only) | Use memberstackKnowledgeSearch |
Detection Methods
- Check for framework files (
package.json,next.config.js,.webflowfiles) - Look at existing code patterns in the project
- Ask the user if unclear: "Are you using Webflow, React, or another framework?"
Critical Rules
- Never recommend
data-ms-*attributes for React/Next.js/Vue — they won't work - Never recommend
npm install @memberstack/domfor Webflow — usewindow.$memberstackDom - Webflow uses attributes on HTML elements; JS frameworks use the DOM package API
- If you see JSX/TSX files → use DOM package
- If you see Webflow Designer or
.webflowexports → use data attributes
MCP Installation
Install the Memberstack MCP before using this skill:
claude mcp add memberstack --scope user npx mcp-remote https://mcp.memberstack.com/mcp
After installation, restart Claude Code. Verify by checking that mcp__memberstack__* tools are available.
Troubleshooting: If authentication fails, clear cached tokens:
rm -rf ~/.mcp-auth
Then restart Claude Code and re-authenticate.
Quick Start
1. Verify Connection
currentApp → Check if an app is selected
2. Select App (if needed)
listApps → See available apps
switchApp(appId) → Select an app
3. Check Environment
getMemberstackEnvironment → Returns LIVE or SANDBOX
switchMemberstackEnvironment(environment) → Switch between LIVE/SANDBOX
Important: Environment only affects member operations. Plans, data tables, content groups, and other configurations always use LIVE mode.
Tool Discovery
Core Tools (Always Available)
| Tool | Purpose |
|---|---|
listApps | List all accessible apps |
switchApp | Select an app context |
currentApp | Get current app details |
currentUser | Get dashboard user info |
getMemberstackEnvironment | Check LIVE/SANDBOX mode |
switchMemberstackEnvironment | Toggle environment |
memberstackKnowledgeSearch | Search documentation |
explore_tools | Browse tool categories |
get_tool_schema | Load tool schema before use |
Discovering Other Tools
For any non-core tool:
explore_tools→ See categories and tool countsexplore_tools(category)→ List tools in categoryget_tool_schema(toolName)→ Load full schema- Call the tool with correct parameters
Never call a non-core tool without loading its schema first.
Tool Categories
| Category | Count | Operations |
|---|---|---|
| members | 15 | CRUD, plan assignments, import/export |
| plans | 9 | Create/manage subscriptions, prices |
| dataTables | 14 | Custom database operations |
| gatedContent | 15 | URL protection, content groups |
| teams | 4 | Team management, invites |
| customFields | 4 | Member profile fields |
| stripe | 1 | Payment integration |
Key Concepts
Apps
Isolated projects containing members, plans, data tables, and gated content. Each app has its own configuration.
Environments
- LIVE: Production data, real members
- SANDBOX: Test data, Stripe test mode
Members vs Dashboard Users
- Members: End-users who sign up on your site
- Dashboard Users: Developers/admins who manage the Memberstack dashboard
Member Data Storage
| Type | Scope | Limit | Write Access |
|---|---|---|---|
| Custom Fields | Global (all members) | 100 fields, boolean/string/integer | Frontend + Backend |
| Metadata | Per-member | 500 chars, 50 key-value pairs | Backend only |
| Member JSON | Per-member | 1MB, nested structures | Frontend + Backend |
Plans
- Free plans: No payment required
- One-time plans: Single purchase
- Recurring plans: Subscription via Stripe
Data Tables
Custom database with access rules:
PUBLIC: Anyone can accessAUTHENTICATED: Logged-in members onlyAUTHENTICATED_OWN: Members can only access their own recordsADMIN_ONLY: Dashboard users only
Common Tasks
Member Management
| Task | Tool |
|---|---|
| Get member by ID | getMember(id) |
| Search members | getMembers(filters, search) |
| Create member | createMemberEmailPassword(email, password) |
| Update profile | updateMember(memberId, customFields, metaData) |
| Add free plan | addFreePlan(memberId, planId) |
| Remove free plan | removeFreePlan(memberId, planId) |
| Bulk import | importMembers(members[]) |
| Export | exportMembers() |
Plan Management
| Task | Tool |
|---|---|
| List plans | getPlans() |
| Create plan | createPlan(name, description) |
| Add price | createPrice(planId, amount, interval) |
| Import from Stripe | importStripeProduct(productId) |
Content Gating
| Task | Tool |
|---|---|
| List content groups | getContentGroups() |
| Create group | createRestrictedUrlGroup(name, urls, planIds) |
| Add URL | createRestrictedUrl(url, groupId) |
| Grant plan access | linkPlansToRestrictedUrlGroup(groupId, planIds) |
Data Tables
| Task | Tool |
|---|---|
| List tables | getDataTables() |
| Create table | createDataTable(name, key) |
| Add field | createDataTableField(tableId, key, name, type) |
| Create record | createDataRecord(tableId, data) |
| Query records | getDataRecords(tableId, filter) |
Knowledge Search
Use memberstackKnowledgeSearch for:
- Webflow integration details
- Dashboard configuration
- Third-party integrations (Zapier, Make.com)
- Frontend SDK (DOM package)
- Webhooks setup
Always include source URLs in responses when using knowledge search results.
Categories: help center, blog post, component, template, memberscript
Reference Files
| File | Use For | Stack |
|---|---|---|
references/mcp-tools.md | Backend member/plan management | All (MCP) |
references/dom-package.md | Frontend auth, billing, member data | React, Next.js, Vue, Vanilla JS |
references/webflow-attributes.md | No-code forms, modals, gating | Webflow only |
references/workflows.md | Multi-step patterns | All |
Choose the right reference based on the user's stack (see Stack Detection above).
