mcpField
W
web3auth

web3auth

github.com/web3authDevelopment187 installsUpdated 21w ago
Repository

About web3auth

web3auth is an integration skill for MetaMask Embedded Wallets, intended for developers adding embedded wallets across platforms. It directs users to live documentation and examples and covers platform selection, authentication, key derivation, and migration.

Key features

  1. 01Search live docs and code examples
  2. 02Choose an SDK by platform
  3. 03Authentication flow guidance
  4. 04Wallet address derivation conditions
  5. 05Migration guidance

Use cases

  1. 01Select a wallet SDK for a web or mobile app
  2. 02Set up a custom authentication connection
  3. 03Investigate mismatched wallet addresses
  4. 04Upgrade an existing integration

MCP support

It uses MCP tools at https://mcp.web3auth.io to search documentation and examples, retrieve community discussions, and consult SDK references.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/web3auth/skill --skill web3auth

After installing, type/web3authin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
authentication.md
examples.md
migration.md
platforms.md
scenarios.md

Details

From the project README

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

  1. search_docs — Search docs (Algolia) and example projects.
    • query (required)
    • platform?: react | vue | js | react-native | android | ios | flutter | unity | unreal | node
    • chain?: evm | solana | other
    • category?: quick-start | custom-auth | blockchain | feature | playground
  2. get_doc — Full doc page by URL (docs.metamask.io). Read platform SDK doc before codegen.
  3. 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
  4. search_community — Builder Hub. query? or topic_id? for full thread.
  5. 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 (default types)

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

  1. Create project at developer.metamask.io → Client ID.
  2. Sapphire Devnet (local) or Mainnet (production).
  3. Allowlist domains (web) or bundle IDs + deep link schemes (mobile).
  4. Configure chains on Dashboard (web/Node) or in code (RN, Android, iOS, Flutter, Unity, Unreal).
  5. Authentication: default socials or custom connections.
  6. 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 useSFAKey boolean 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 with useSFAKey / useCoreKitKey as true.

SDK selection

ChooseWhen
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 / FlutterNative mobile SDKs — export key + platform lib (no built-in provider)
Unity / UnrealGame 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.

Comments

Markdown supported