UNPKG

cotiv2-mcp

Version:

> A plug-and-play MCP tool server to **send COTI**, **transfer BEP-20 tokens**, **deploy tokens**, and **interact with smart contracts** on the **COTI v2 Network (COTI)** — built for **Claude Desktop**, **AI agents**, and **developers.**

48 lines (47 loc) 1.72 kB
// @ts-ignore import { GoPlus, ErrorCode } from "@goplus/sdk-node"; import { z } from "zod"; export function registerGoplusSecurityCheck(server) { server.tool("Token_Security_Check", "🔒Analyze COTI Network tokens for potential security risks powered by GoPlus", { tokenAddress: z.string(), }, async ({ tokenAddress }) => { try { const chainId = "2632500"; // COTIv2 chain ID const addresses = [tokenAddress]; // Call GoPlus API to check token security let res = await GoPlus.tokenSecurity(chainId, addresses, 30); if (res.code !== ErrorCode.SUCCESS) { return { content: [ { type: "text", text: `Security check failed: ${res.message}`, }, ], isError: true, }; } const securityData = res.result[tokenAddress] || {}; return { content: [ { type: "text", text: `Security check successful for ${tokenAddress}: ${JSON.stringify(securityData, null, 2)}`, }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: "text", text: `Security check failed: ${errorMessage}`, }, ], isError: true, }; } }); }