MetaMask MCP
模型上下文协议 (MCP) 服务器允许 LLM 通过 MetaMask 与区块链交互。
使用这些工具,您的私钥将安全地存储在您的加密钱包中,并且在签署消息或发送交易时永远不会与 AI 代理共享。
预览
https://github.com/user-attachments/assets/3fe8f20b-4666-4c36-8030-04d3e5d587c7
要求
Node.js(v20 或更高版本)
下午
设置
克隆存储库
安装依赖项
构建项目
与 Claude Desktop 一起使用
按照指南https://modelcontextprotocol.io/quickstart/user并添加以下配置:
工具
call:立即执行新的消息调用,而无需向网络提交交易。get-chain-list:获取所有链信息的列表。get-connect-uri:获取连接 URI 以连接到 MetaMask 钱包。show-connect-qrcode:显示给定连接 URI 的连接二维码。deploy-contract:根据字节码和构造函数参数将合约部署到网络。disconnect:断开钱包连接。estimate-fee-per-gas:估计一笔交易可能被纳入下一个区块的每 gas 费用(以 wei 为单位)。estimate-gas:估计完成交易所需的气体,而无需将其提交给网络。get-account:获取当前帐户。get-native-currency-balance:获取地址的本国货币余额。get-token-balance:获取地址的代币余额。get-block-number:获取最近看到的区块的编号。get-block:获取有关块编号、哈希值或标签处的块的信息。get-chain-id:获取当前链 id。get-chains:获取配置的链。get-ens-address:获取名称的 ENS 地址。get-ens-name:获取地址的主要 ENS 名称。get-gas-price:获取当前的 gas 价格(以 wei 为单位)。get-token:获取令牌信息。get-transaction-reeceipt:根据交易哈希获取交易收据。get-transaction:获取给定哈希或块标识符的交易。read-contract:调用合约上的只读函数,并返回响应。send-transaction:向网络发送交易。sign-message:签署消息。switch-chain:切换目标链。verify-message:验证消息是否由提供的地址签名。wait-for-transaction-receipt:等待交易被包含在区块中,然后返回交易收据。write-contract:对合约执行写入功能。
提示
贡献
欢迎贡献代码!如有任何改进或错误修复,请提交 PR。
执照
MIT 许可证
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
模型上下文协议服务器允许 LLM 通过 MetaMask 与区块链交互,在启用交易和区块链操作的同时将私钥安全地保存在您的加密钱包中。
Related MCP Servers
- Asecurity-licenseAqualityA Model Context Protocol server that enables LLMs to interact with Salesforce data through SOQL queries, SOSL searches, and various API operations including record management.Last updated -10140MIT License
- Asecurity-licenseAqualityA Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.Last updated -45138MIT License
- -security-license-qualityA Model Context Protocol server that enables LLMs to interact with databases (currently MongoDB) through natural language, supporting operations like querying, inserting, deleting documents, and running aggregation pipelines.Last updated -MIT License