uniderp-mcp
Version:
> A plug-and-play MCP tool server to **send ETH**, **transfer ERC-20 tokens**, **deploy tokens**, and **interact with smart contracts** on the **UNICHAIN** — built for **Claude Desktop**, **AI agents**, and **developers.**
56 lines (55 loc) • 2.2 kB
JavaScript
import { z } from "zod";
import { getAccount } from "../config.js";
import { supportedChain } from "../chains/index.js";
import { UNIDERP_DOMAINS, uniderpCreateMeme, } from "../functions/uniderpCreateMeme.js";
export function registerUniderpCreateMeme(server) {
server.tool("Create_Uniderp_Meme_Token", "🪙 Create/Deploy new MEME token on uniderp.fun platform", {
name: z.string(),
symbol: z.string(),
description: z.string(),
imageUrl: z.string().optional().describe("Image url logo of this token"),
twitterUrl: z.string().optional().describe("X (twitter) url"),
telegramUrl: z.string().optional(),
discordUrl: z.string().optional(),
youtubeUrl: z.string().optional(),
websiteUrl: z.string().optional(),
}, async ({ name, symbol, description, twitterUrl, telegramUrl, discordUrl, youtubeUrl, websiteUrl, imageUrl, }) => {
try {
const account = await getAccount();
const tokenAddress = await uniderpCreateMeme({
account,
initialEthBuyAmount: "0",
tokenName: name,
tokenSymbol: symbol,
description,
teleUrl: telegramUrl,
twitUrl: twitterUrl,
webUrl: websiteUrl,
discordUrl,
youtubeUrl,
imageUrl,
});
return {
content: [
{
type: "text",
text: `Token address = ${tokenAddress} deployed successfully. ${UNIDERP_DOMAINS[supportedChain.id]}/${tokenAddress}`,
url: `${UNIDERP_DOMAINS[supportedChain.id]}/${tokenAddress}`,
},
],
};
}
catch (error) {
const errorMessage = error instanceof Error ? error.message : String(error);
return {
content: [
{
type: "text",
text: `Transaction failed: ${errorMessage}`,
},
],
isError: true,
};
}
});
}