|
| 1 | +--- |
| 2 | +title: Build with AI |
| 3 | +sidebar_label: Build with AI |
| 4 | +toc_max_heading_level: 2 |
| 5 | +description: 'Build MetaMask Embedded Wallets integrations faster using AI coding assistants — Cursor, Claude, Codex, Antigravity, OpenClaw, and more.' |
| 6 | +image: 'img/metamaskog.jpg' |
| 7 | +keywords: |
| 8 | + [ |
| 9 | + ai, |
| 10 | + cursor, |
| 11 | + claude, |
| 12 | + codex, |
| 13 | + antigravity, |
| 14 | + openclaw, |
| 15 | + mcp, |
| 16 | + llm, |
| 17 | + coding assistant, |
| 18 | + embedded wallets, |
| 19 | + web3auth, |
| 20 | + ] |
| 21 | +--- |
| 22 | + |
| 23 | +import SkillContent from '@site/src/components/SkillContent' |
| 24 | + |
| 25 | +Speed up MetaMask Embedded Wallets integrations by giving your AI coding assistant access to the documentation and SDK reference information. |
| 26 | + |
| 27 | +You'll set up the following: |
| 28 | + |
| 29 | +- **Skill**: Guides your AI assistant on how to reason about the SDK (for example, architecture, framework-specific considerations, key derivation rules, and common pitfalls). There's no code in the skill; the MCP provides that. |
| 30 | +- **MCP server**: Provides real-time access to documentation search, code examples, and SDK types. |
| 31 | + |
| 32 | +## Skill |
| 33 | + |
| 34 | +The Skill guides your AI assistant by providing a mental model for MetaMask Embedded Wallets. It includes SDK selection logic, |
| 35 | +key derivation rules, authentication concepts, platform quirks, and common mistakes that aren't obvious from |
| 36 | +the docs alone. The Skill contains no code. The MCP server provides up-to-date code examples and implementation references. |
| 37 | + |
| 38 | +:::tip |
| 39 | +For the best experience, use the MCP server alongside the skill so that your LLM can fetch live docs and examples rather than relying on static text. |
| 40 | +::: |
| 41 | + |
| 42 | +### Cursor |
| 43 | + |
| 44 | +Copy the skill into your project: |
| 45 | + |
| 46 | +```bash |
| 47 | +npx degit Web3Auth/web3auth-mcp/skills/web3auth .cursor/skills/web3auth |
| 48 | +``` |
| 49 | + |
| 50 | +Cursor picks up any `SKILL.md` inside `.cursor/skills/` automatically and activates it when relevant. |
| 51 | + |
| 52 | +### Claude Code CLI |
| 53 | + |
| 54 | +Download the skill and append it to your project's `CLAUDE.md`: |
| 55 | + |
| 56 | +```bash |
| 57 | +npx degit Web3Auth/web3auth-mcp/skills/web3auth /tmp/web3auth-skill |
| 58 | +cat /tmp/web3auth-skill/SKILL.md >> CLAUDE.md |
| 59 | +``` |
| 60 | + |
| 61 | +### Claude Desktop |
| 62 | + |
| 63 | +Open **Claude Desktop → Settings → Custom Instructions** and paste the skill content below directly. |
| 64 | + |
| 65 | +### Antigravity |
| 66 | + |
| 67 | +Copy the skill into your project: |
| 68 | + |
| 69 | +```bash |
| 70 | +npx degit Web3Auth/web3auth-mcp/skills/web3auth .agent/skills/web3auth |
| 71 | +``` |
| 72 | + |
| 73 | +Antigravity picks up skills inside `.agent/skills/` automatically. For global installation across all |
| 74 | +projects, use `~/.gemini/antigravity/skills/` instead. |
| 75 | + |
| 76 | +### OpenClaw |
| 77 | + |
| 78 | +Open your agent's configuration in the OpenClaw dashboard and paste the skill content below into the |
| 79 | +**Custom Instructions** field. |
| 80 | + |
| 81 | +For self-hosted instances, add it to your `openclaw.json`: |
| 82 | + |
| 83 | +```json |
| 84 | +{ |
| 85 | + "agent": { |
| 86 | + "instructions": "<paste SKILL.md content here>" |
| 87 | + } |
| 88 | +} |
| 89 | +``` |
| 90 | + |
| 91 | +### Other tools |
| 92 | + |
| 93 | +For any LLM tool with a system prompt or custom instructions field, paste the skill content below directly. |
| 94 | + |
| 95 | +<details> |
| 96 | +<summary><strong>View `SKILL.md` file</strong></summary> |
| 97 | + |
| 98 | +<SkillContent /> |
| 99 | + |
| 100 | +</details> |
| 101 | + |
| 102 | +## MCP server |
| 103 | + |
| 104 | +The [MetaMask Embedded Wallets MCP server](https://github.com/Web3Auth/web3auth-mcp) connects your AI coding |
| 105 | +assistant directly to the documentation. It provides five tools: |
| 106 | + |
| 107 | +| Tool | What it does | |
| 108 | +| ------------------- | ---------------------------------------------------- | |
| 109 | +| `search_docs` | Search documentation and example projects | |
| 110 | +| `get_doc` | Fetch the full content of any doc page | |
| 111 | +| `get_example` | Fetch complete source code of an integration example | |
| 112 | +| `get_sdk_reference` | Fetch SDK types and hooks from the open-source repos | |
| 113 | +| `search_community` | Search the MetaMask Builder Hub for real user issues | |
| 114 | + |
| 115 | +### Cursor |
| 116 | + |
| 117 | +Select the following button to install the MCP server in Cursor automatically: |
| 118 | + |
| 119 | +<p> |
| 120 | + <a |
| 121 | + href="https://cursor.com/en/install-mcp?name=web3auth&config=eyJ1cmwiOiJodHRwczovL21jcC53ZWIzYXV0aC5pbyJ9" |
| 122 | + target="_blank" |
| 123 | + rel="noopener noreferrer"> |
| 124 | + <img |
| 125 | + src="https://cursor.com/deeplink/mcp-install-dark.svg" |
| 126 | + alt="Add MetaMask Embedded Wallets MCP to Cursor" |
| 127 | + height="32" |
| 128 | + /> |
| 129 | + </a> |
| 130 | +</p> |
| 131 | + |
| 132 | +You can also add it manually. Open **Cursor Settings → Tools & Integrations → MCP** and add: |
| 133 | + |
| 134 | +```json |
| 135 | +{ |
| 136 | + "mcpServers": { |
| 137 | + "web3auth": { |
| 138 | + "url": "https://mcp.web3auth.io" |
| 139 | + } |
| 140 | + } |
| 141 | +} |
| 142 | +``` |
| 143 | + |
| 144 | +### Claude Code CLI |
| 145 | + |
| 146 | +Run the following in your terminal: |
| 147 | + |
| 148 | +```bash |
| 149 | +claude mcp add --transport http web3auth https://mcp.web3auth.io |
| 150 | +``` |
| 151 | + |
| 152 | +Or add manually to your project's `claude.json`: |
| 153 | + |
| 154 | +```json |
| 155 | +{ |
| 156 | + "mcpServers": { |
| 157 | + "web3auth": { |
| 158 | + "url": "https://mcp.web3auth.io" |
| 159 | + } |
| 160 | + } |
| 161 | +} |
| 162 | +``` |
| 163 | + |
| 164 | +### Claude Desktop |
| 165 | + |
| 166 | +Open your Claude Desktop configuration file: |
| 167 | + |
| 168 | +- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json` |
| 169 | +- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json` |
| 170 | + |
| 171 | +Add the server to the `mcpServers` section: |
| 172 | + |
| 173 | +```json |
| 174 | +{ |
| 175 | + "mcpServers": { |
| 176 | + "web3auth": { |
| 177 | + "url": "https://mcp.web3auth.io" |
| 178 | + } |
| 179 | + } |
| 180 | +} |
| 181 | +``` |
| 182 | + |
| 183 | +Restart Claude Desktop and ask: _"Search MetaMask Embedded Wallets docs for React quick start"_ to verify the connection. |
| 184 | + |
| 185 | +### Antigravity |
| 186 | + |
| 187 | +Open your MCP configuration file: |
| 188 | + |
| 189 | +- **macOS/Linux**: `~/.config/antigravity/mcp.json` |
| 190 | +- **Windows**: `%APPDATA%\antigravity\mcp.json` |
| 191 | + |
| 192 | +Add the server to the `mcpServers` section: |
| 193 | + |
| 194 | +```json |
| 195 | +{ |
| 196 | + "mcpServers": { |
| 197 | + "web3auth": { |
| 198 | + "url": "https://mcp.web3auth.io" |
| 199 | + } |
| 200 | + } |
| 201 | +} |
| 202 | +``` |
| 203 | + |
| 204 | +Antigravity automatically reloads MCP configuration changes. You don't need to restart it. |
| 205 | + |
| 206 | +### Codex CLI |
| 207 | + |
| 208 | +For Codex CLI or any stdio-only agent, use [mcp-remote](https://github.com/modelcontextprotocol/mcp-remote) to bridge the HTTP endpoint: |
| 209 | + |
| 210 | +```bash |
| 211 | +npm install -g mcp-remote |
| 212 | +``` |
| 213 | + |
| 214 | +Then add to your agent's configuration: |
| 215 | + |
| 216 | +```json |
| 217 | +{ |
| 218 | + "mcpServers": { |
| 219 | + "web3auth": { |
| 220 | + "command": "npx", |
| 221 | + "args": ["-y", "mcp-remote", "https://mcp.web3auth.io"] |
| 222 | + } |
| 223 | + } |
| 224 | +} |
| 225 | +``` |
| 226 | + |
| 227 | +### OpenClaw |
| 228 | + |
| 229 | +For managed instances, go to your **OpenClaw dashboard → Skills → Add custom skill** and enter the MCP |
| 230 | +server URL: |
| 231 | + |
| 232 | +``` |
| 233 | +https://mcp.web3auth.io |
| 234 | +``` |
| 235 | + |
| 236 | +For self-hosted instances, add the server to your `openclaw.json`: |
| 237 | + |
| 238 | +```json |
| 239 | +{ |
| 240 | + "mcpServers": { |
| 241 | + "web3auth": { |
| 242 | + "url": "https://mcp.web3auth.io" |
| 243 | + } |
| 244 | + } |
| 245 | +} |
| 246 | +``` |
| 247 | + |
| 248 | +OpenClaw hot-reloads config changes — no restart required. |
| 249 | + |
| 250 | +## Static docs (llms.txt) |
| 251 | + |
| 252 | +If your AI tool doesn't support MCP yet, use the static documentation file instead. This gives your AI |
| 253 | +assistant the full MetaMask Embedded Wallets documentation as a single text file. |
| 254 | + |
| 255 | +:::warning |
| 256 | +The static file is a snapshot and may not include the latest updates. Use the MCP server when possible |
| 257 | +for always-current docs. |
| 258 | +::: |
| 259 | + |
| 260 | +Add the following URL as a custom doc source in your tool's settings, or paste it directly into your AI chat: |
| 261 | + |
| 262 | +``` |
| 263 | +https://docs.metamask.io/llms-embedded-wallets-full.txt |
| 264 | +``` |
| 265 | + |
| 266 | +For tools that support the [llms.txt spec](https://llmstxt.org/) and can index docs automatically, add: |
| 267 | + |
| 268 | +``` |
| 269 | +https://docs.metamask.io/llms-embedded-wallets.txt |
| 270 | +``` |
| 271 | + |
| 272 | +## Start building |
| 273 | + |
| 274 | +Once the skill and MCP are set up, ask your AI assistant directly. Good starting prompts include: |
| 275 | + |
| 276 | +- _"Add MetaMask Embedded Wallets to my React app with Google login."_ |
| 277 | +- _"Set up social login wallets in my Next.js app using Wagmi."_ |
| 278 | +- _"Integrate embedded wallets in my Flutter app."_ |
| 279 | +- _"Why are my users getting different wallet addresses after I changed the login method?"_ |
| 280 | + |
| 281 | +The MCP server will search the docs and fetch real working examples. The skill will ensure the correct SDK is |
| 282 | +chosen and common pitfalls are avoided before a line of code is written. |
| 283 | + |
| 284 | +:::tip |
| 285 | + |
| 286 | +Use planning mode (where available) for your initial prompt. Review the plan before generating code — this |
| 287 | +catches architecture mistakes early and avoids config errors that would change wallet addresses in production. |
| 288 | + |
| 289 | +::: |
0 commit comments