Skip to main content
Glama

BSC MCP Server

pancakeMyPosition.ts1.36 kB
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { myPosition } from "../functions/pancakeSwapPosition.js"; import { bigIntReplacer } from "../util.js"; import { getAccount } from "../config.js"; export function registerPancakeMyPosition(server: McpServer) { server.tool("View_PancakeSwap_Positions", "📊View your active liquidity positions on PancakeSwap", {}, async ({}) => { try { const account = await getAccount(); const positions = await myPosition(account.address); return { content: [ { type: "text", text: `get user potitions successfully. ${JSON.stringify(positions, bigIntReplacer)}` }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: "text", text: `get user potitions failed: ${errorMessage}`, }, ], isError: true, }; } } ); }

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/TermiX-official/bsc-mcp'

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