Skip to main content
Glama

bnbchain-mcp

Official
by bnb-chain
prompts.ts1.32 kB
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js" import { z } from "zod" import { networkSchema } from "../common/types.js" export function registerContractPrompts(server: McpServer) { // Smart contract interaction guidance server.prompt( "interact_with_contract", "Get guidance on interacting with a smart contract", { contractAddress: z.string().describe("The contract address"), abiJson: z .string() .optional() .describe("The contract ABI as a JSON string"), network: networkSchema }, ({ contractAddress, abiJson, network = "bsc" }) => ({ messages: [ { role: "user", content: { type: "text", text: abiJson ? `I need to interact with the smart contract at address ${contractAddress} on the ${network} network. Here's the ABI:\n\n${abiJson}\n\nPlease analyze this contract's functions and provide guidance on how to interact with it safely. Explain what each function does and what parameters it requires.` : `I need to interact with the smart contract at address ${contractAddress} on the ${network} network. Please help me understand what this contract does and how I can interact with it safely.` } } ] }) ) }

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/bnb-chain/bnbchain-mcp'

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