使用说明
代币造币商MCP
一个MCP服务器,为AI代理提供铸造ERC-20代币的工具,支持21个区块链。
特性
- 部署具有可定制参数的新ERC-20代币。
- 查询令牌元数据(名称、符号、小数、总供应量)。
- 启动令牌传输(返回交易哈希值,无需确认)。
- 按哈希值检索交易详细信息。
- 检查当前帐户的本机令牌余额。
- 通过URI访问令牌元数据。
- 部署指导的交互式提示。
工具
- deployToken:部署新的ERC-20令牌(名称、符号、initialSupply、小数、chainId)。
- transferToken:转移ERC-20代币(tokenAddress、toAddress、amount、chainId)。
- getTransactionInfo:检索交易详细信息(txHash、chainId)。
- getTokenBalance:查询当前账户的特定ERC-20代币的余额。
- getTokenInfo:查询ERC-20令牌元数据(tokenAddress、chainId)。
- 余额:检查本机令牌余额(chainId)。
资源
- tokenMetadata:通过以下方式公开令牌元数据
token://{chainId}/{address}.
提示
- 部署令牌指南:使用所需参数(chainId)指导令牌部署。
先决条件
- Node.js v18.x或更高版本
- npm (通常与Node.js捆绑在一起)
- A有效 Infura API密钥 用于EVM网络访问
- 用于签署交易的以太坊私钥
安装
-
克隆存储库:
git clone https://github.com/kukapay/token-minter-mcp.git cd token-minter-mcp/server -
再进行:
npm install
配置
{
"mcpServers": {
"Token-Minter-MCP": {
"command": "node",
"args": ["path/to/token-minter-mcp/server/index.js"],
"env": {
"INFURA_KEY": "your infura key",
"PRIVATE_KEY": "your private key"
}
}
}
}
用法
-
例子:
我想在Arbitrum上创建一个名为“RewardToken”的新令牌,符号为“RWD”。它应该有500万个初始供应的代币,并使用6位小数。
Token deployment initiated on Arbitrum (chainId: 42161)! Name: RewardToken Symbol: RWD Decimals: 6 Initial Supply: 5000000 tokens Transaction Hash: 0xabc123... Note: Use 'getTransactionInfo' to check deployment status.你能告诉我我在Polygon网络上的钱包里有多少POL吗?
Account Balance on Polygon (chainId: 137): Address: 0xYourAddressHere Balance: 25.3478 POL我在Polygon上新创建的令牌的余额是多少?
Token Balance on Polygon (chainId: 137): Address: 0xYourAddressHere Token: 0xYourTokenAddressHere Symbol: ABCD Balance: 10000000.00 ABCD请将150.75美元从我的账户转账到Polygon上的0xRecipientAddress。"
Transfer initiated on Polygon (chainId: 137)! Token: 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 To: 0xRecipientAddressHere Amount: 150.75 (150.75 tokens) Transaction Hash: 0xdef456... Note: Use 'getTransactionInfo' to check transfer status.Arbitrum上哈希0xabc123…的令牌部署事务的状态如何?
Transaction Info on Arbitrum (chainId: 42161): Hash: 0xabc123... From: 0xYourAddressHere To: Contract Creation Value: 0 ETH Status: Success Deployed Contract Address: 0xNewTokenAddressHere给我Arbitrum上地址0xNewTokenAddressHere处的令牌的详细信息。
Token Info on Arbitrum (chainId: 42161): Address: 0xNewTokenAddressHere Name: RewardToken Symbol: RWD Decimals: 6 Total Supply: 5000000如何在Polygon上部署令牌?我需要提供哪些详细信息?
To deploy a token on Polygon (chainId: 137), use the "deployToken" tool with these parameters: - name: The token's full name (e.g., "MyToken") - symbol: The token's ticker (e.g., "MTK") - initialSupply: Amount in token units (e.g., 1000000 for 1M tokens, default 1,000,000) - decimals: Optional number of decimals (default is 18) - chainId: Optional chain ID (default is 1 for Ethereum) -
局部测试:
整体依赖关系:
cd token-minter-mcp npm install启动本地Hardhat节点:
npx hardhat node在提示中使用chainId:1337进行本地测试。
支持的网络
| 链ID | 网络名称 | 本机令牌 |
|---|---|---|
| 1 | 以太坊 | ETH |
| 137 | 多边形 | POL |
| 56 | BSC | BNB |
| 42161 | 仲裁 | 以太坊 |
| 10 | 乐观 | ETH |
| 59144 | 线 | ETH |
| 8453 | 基数 | ETH |
| 81457 | 爆炸 | ETH |
| 11297108109 | 棕榈 | 棕榈 |
| 43114 | 雪崩 | AVAX |
| 42220 | 塞洛 | 塞洛 |
| 324 | zksync | eth |
| 5000 | 地幔 | MNT |
| 204 | opBNB | BNB |
| 534352 | 滚动 | ETH |
| 1923 | 水潭链 | 以太坊 |
| 130 | 单链 | 以太坊 |
| 23448594291968334 | 斯塔克内特 | 以太坊 |
| 80094 | 贝拉钦 | 贝拉 |
| 999 | 超液体 | HYPE |
| 146 | 声波 | S |
| 1337 | 本地主机 | ETH |
许可证
该项目根据 MIT许可证。请参阅 LICENSE 文件以获取详细信息。