Skip to main content
Glama

Polygon MCP Server

by Dablclub

多边形 MCP 服务器

模型上下文协议 (MCP) 服务器为 Claude AI 提供链上工具,使其能够与 Polygon PoS 区块链进行交互。

特征

  • 在 Polygon PoS 上调用合约函数
  • 获取 ERC20 代币余额
  • 转移 ERC20 代币
  • 获取当前天然气价格

安装

  1. 克隆此存储库:
git clone https://github.com/your-username/polygon-mcp.git cd polygon-mcp
  1. 安装依赖项:
npm install
  1. 构建项目:
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 :合约的 ABI
  • value (可选):随交易发送的 MATIC 值

erc20_balance

获取 Polygon PoS 上的 ERC20 代币余额。

参数:

  • contractAddress :获取余额的合约地址

erc20_transfer

在 Polygon PoS 上转移 ERC20 代币。

参数:

  • contractAddress :从中转移代币的合约地址
  • toAddress :收件人的地址
  • amount :要转移的代币数量

获取 gas_price

获取 Polygon PoS 上的当前 gas 价格。

执照

麻省理工学院

-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议 (MCP) 服务器为 Claude AI 提供链上工具,使其能够与 Polygon PoS 区块链交互以调用合约函数、管理 ERC20 代币并检查 gas 价格。

  1. 特征
    1. 安装
      1. 配置
        1. 用法
          1. 运行服务器
          2. 与 Claude 一起使用
        2. 可用工具
          1. 调用合约
          2. erc20\_balance
          3. erc20\_transfer
          4. 获取 gas\_price
        3. 执照

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A beginner-friendly Model Context Protocol (MCP) server that helps users understand MCP concepts, provides interactive examples, and lists available MCP servers. This server is designed to be a helpful companion for developers working with MCP. Also comes with a huge list of servers you can install.
            Last updated -
            3
            9
            36
            JavaScript
            Apache 2.0
          • -
            security
            A
            license
            -
            quality
            MCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.
            Last updated -
            4
            3
            TypeScript
            MIT License
          • A
            security
            A
            license
            A
            quality
            A dynamic service that creates and manages Model Context Protocol (MCP) servers, allowing users to spawn, customize, and control multiple MCP servers as child processes.
            Last updated -
            5
            65
            TypeScript
            MIT License
            • Apple
            • Linux
          • -
            security
            -
            license
            -
            quality
            A specialized server that helps users create new Model Context Protocol (MCP) servers by providing tools and templates for scaffolding projects with various capabilities.
            Last updated -
            1
            TypeScript

          View all related MCP servers

          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/Dablclub/polygon-mcp'

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