Polygon MCP Server
多边形 MCP 服务器
模型上下文协议 (MCP) 服务器为 Claude AI 提供链上工具,使其能够与 Polygon PoS 区块链进行交互。
特征
在 Polygon PoS 上调用合约函数
获取 ERC20 代币余额
转移 ERC20 代币
获取当前天然气价格
Related MCP server: Scenario Word
安装
克隆此存储库:
git clone https://github.com/your-username/polygon-mcp.git
cd polygon-mcp安装依赖项:
npm install构建项目:
npm run build配置
在根目录中创建一个.env文件,其中包含以下变量:
SEED_PHRASE="your twelve word seed phrase here"用法
运行服务器
npm start与 Claude 一起使用
要将此 MCP 服务器与 Claude 一起使用,您需要将其添加到您的 MCP 设置文件中:
对于 VSCode Claude 扩展:
{
"mcpServers": {
"polygon": {
"command": "node",
"args": ["/path/to/polygon-mcp/build/index.js"],
"env": {
"SEED_PHRASE": "your twelve word seed phrase here"
},
"disabled": false,
"autoApprove": []
}
}
}对于 Claude 桌面应用程序:
{
"mcpServers": {
"polygon": {
"command": "node",
"args": ["/path/to/polygon-mcp/build/index.js"],
"env": {
"SEED_PHRASE": "your twelve word seed phrase here"
},
"disabled": false,
"autoApprove": []
}
}
}可用工具
调用合约
在 Polygon PoS 上调用合约函数。
参数:
contractAddress:要调用的合约地址functionName:要调用的函数的名称functionArgs:传递给函数的参数abi:合约的 ABIvalue(可选):随交易发送的 MATIC 值
erc20_balance
获取 Polygon PoS 上的 ERC20 代币余额。
参数:
contractAddress:获取余额的合约地址
erc20_transfer
在 Polygon PoS 上转移 ERC20 代币。
参数:
contractAddress:从中转移代币的合约地址toAddress:收件人的地址amount:要转移的代币数量
获取 gas_price
获取 Polygon PoS 上的当前 gas 价格。
执照
麻省理工学院
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that provides onchain tools for Claude AI, allowing it to interact with the Solana blockchain through a standardized interface for operations like managing assets, executing token operations, and retrieving network information.7-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that allows Claude AI to interact with custom tools, enabling extension of Claude's capabilities through the MCP framework.-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that extends Claude's capabilities by providing tools to interact with the Solana blockchain, allowing AI agents to perform operations like executing transactions, managing wallets, and accessing token information.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables gasless blockchain transactions directly from Claude conversations, allowing users to execute transfers, swaps, and other operations without holding native tokens.10 npm2MIT