Imported from Web3Auth/skill (
skills/web3auth/SKILL.md). Install upstream withnpx skills add Web3Auth/skill --skill web3auth. Copyright stays with the author.
MetaMask Embedded Wallets (Web3Auth)
Before writing code, use MCP tools for live docs and examples. Do not guess package names, API signatures, or config.
Dashboard: https://developer.metamask.io
Docs: https://docs.metamask.io/embedded-wallets/
Community: https://builder.metamask.io/c/embedded-wallets/5
MCP tools (use in order)
Examples and SDK source are live-discovered from GitHub. references/examples.md has filter recipes only. Always call get_example before codegen. MCP live at https://mcp.web3auth.io
search_docs— Search docs (Algolia) and example projects.query(required)platform?:react|vue|js|react-native|android|ios|flutter|unity|unreal|nodechain?:evm|solana|othercategory?:quick-start|custom-auth|blockchain|feature|playground
get_doc— Full doc page by URL (docs.metamask.io). Read platform SDK doc before codegen.get_example— Complete example source from GitHub (primary integration reference).name?,platform?,chain?,category?,auth_method?(e.g.firebase,auth0,grouped)- Always fetch quick-start before a new integration; fetch auth-specific example for custom auth.
- Check for filter recipes and eval anchor namesreferences/examples.md
search_community— Builder Hub.query?ortopic_id?for full thread.get_sdk_reference— SDK source for debugging types/signatures only (not feature discovery).platform(required),module?(omit first to list modules),focus?:types|hooks|main-class|errors|all(defaulttypes)
MCP unavailable: https://docs.metamask.io/llms-embedded-wallets-full.txt (full), https://docs.metamask.io/llms-embedded-wallets.txt (index).
Prerequisite - Dashboard Setup flow
- Create project at developer.metamask.io → Client ID.
- Sapphire Devnet (local) or Mainnet (production).
- Allowlist domains (web) or bundle IDs + deep link schemes (mobile).
- Configure chains on Dashboard (web/Node) or in code (RN, Android, iOS, Flutter, Unity, Unreal).
- Authentication: default socials or custom connections.
- Optional: session duration, test accounts, key export, whitelabel.
Read https://docs.metamask.io/embedded-wallets/dashboard/
Key derivation rules (CRITICAL)
Same wallet address requires all of:
- Same Client ID
- Same Sapphire network (devnet or mainnet — never mix)
- Same connection configuration (same auth connection ID)
- Same
useSFAKeyboolean in integrations.
Change any → different address forever.
- Never change Client ID or Sapphire network in production.
- Sapphire is not blockchain devnet/mainnet. Devnet allows localhost; Mainnet does not.
- Local dev & staging: Sapphire Devnet. Production: Sapphire Mainnet only. Do not use Devnet in production.
- Avoid putting random flags like
useSFAKey/useCoreKitKey— unless user already has it or wants to use wallet pregeneration. Wallet pregeneration only works withuseSFAKey/useCoreKitKeyas true.
SDK selection
| Choose | When |
|---|---|
React (@web3auth/modal/react) |
React, Next.js — Hooks |
Vue (@web3auth/modal/vue) |
Vue, Nuxt — Composables |
JavaScript (@web3auth/modal) |
Angular, Svelte, Vanilla JS |
React Native (@web3auth/react-native-sdk) |
Expo or Bare RN - Hooks |
| Android / iOS / Flutter | Native mobile SDKs — export key + platform lib (no built-in provider) |
| Unity / Unreal | Game SDKs — export key + platform lib (no built-in provider) |
Node.js (@web3auth/node-sdk) |
Backend, AI agents — custom JWT only, stateless |
Per-platform details and quirks: references/platforms.md
Scenarios
Fetch / tripwire / verify workflows by task: references/scenarios.md
Examples catalog [MOST IMPORTANT]
Examples are live on GitHub; call get_example or search_docs before writing integration code. MCP filter recipes and eval anchor names: references/examples.md
Authentication
Connections, implicit vs JWT flows, grouped connections, JWT iat rule: references/authentication.md
Migration
Upgrading existing integrations — version table, workflow, legacy PnP/CoreKit/SFA: references/migration.md
Summary: One guide per platform to current major (Web v11, RN v9, Android v9, iOS v10, Flutter v6). Use each guide's AI-assisted prompt. Never change Client ID or Sapphire network unless intentional.
- Migration index: https://docs.metamask.io/embedded-wallets/migration-guides/