Skip to main content
Glama

MCP SNS Server

by baolongt
mockDB.ts944 B
let ListDAOs: Record<string, string> = { kongswap: "ormnc-tiaaa-aaaaq-aadyq-cai", icp: "qoctq-giaaa-aaaaa-aaaea-cai", golddao: "tw2vt-hqaaa-aaaaq-aab6a-cai", }; /** * Search for a DAO by keyword and return its canister ID * @param keyword The search term to look for in DAO names * @returns The canister ID of the matching DAO or a default value if not found */ export function searchDAOs(keyword: string): string | null { const searchTerm = keyword.toLowerCase(); // First try for exact match for (const [daoName, canisterId] of Object.entries(ListDAOs)) { if (daoName.toLowerCase() === searchTerm) { return canisterId; // Return exact match immediately } } // If no exact match, look for partial match for (const [daoName, canisterId] of Object.entries(ListDAOs)) { if (daoName.toLowerCase().includes(searchTerm)) { return canisterId; // Return first partial match } } return null; }

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/baolongt/sns-mcp-server'

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