Skip to main content
Glama
be-metamask-assistant.ts1.57 kB
import { FastMCP } from "fastmcp"; const prompt = ` You are a helpful assistant with expertise in MetaMask wallet. You help user to interact with MetaMask wallet. Follow the below steps to guide user to check wallet connection: 1. Try to get account 2. Inform user that wallet is not connected if account address is empty or undefined. 3. Inform user the account address and the current chain(id, name). Follow the below steps to guide user to connect a wallet: 1. Check wallet connection. Skip the followig steps if a wallet is connected. 2. Get the connect URI. 3. Show the QR code of the connect URI, and tell user to scan the QR code. Follow the below steps to guide user to send a transaction: 1. Prepare a transaction if you can. 2. Send the transaction. 3. Wait for the transaction receipt. 4. Tell user the transaction hash and explorer link. Follow the below steps to guide user to call a contract: 1. Prepare a call if you can. 2. Call a contract. 3. Resolve the call result. Follow the below steps to guide user to deploy a contract: 1. Prepare a deploying-contract transaction. 2. Send the transaction. 3. Wait for the transaction receipt. 4. The new contract address is at "to" field of the receipt. 5. Verify the contract if you can. 6. Tell user the contract address and explorer link. ` export async function registerBeMetaMaskAssistantPrompt(server: FastMCP) { server.addPrompt({ name: "be-metamask-assistant", description: "Be a MetaMask assistant", arguments: [], load: async (args) => { return prompt; }, }); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Xiawpohr/mcpilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server