Polygon MCP Server
Provides on-chain tools to interact with the Polygon PoS blockchain.
Polygon MCP Server
A Model Context Protocol (MCP) server that provides onchain tools for Claude AI, allowing it to interact with the Polygon PoS blockchain.
Features
- Call contract functions on Polygon PoS
- Get ERC20 token balances
- Transfer ERC20 tokens
- Get current gas prices
Installation
- Clone this repository:
git clone https://github.com/your-username/polygon-mcp.git
cd polygon-mcp
- Install dependencies:
npm install
- Build the project:
npm run build
Configuration
Create a .env file in the root directory with the following variables:
SEED_PHRASE="your twelve word seed phrase here"
Usage
Running the server
npm start
Using with Claude
To use this MCP server with Claude, you need to add it to your MCP settings file:
For VSCode Claude extension:
{
"mcpServers": {
"polygon": {
"command": "node",
"args": ["/path/to/polygon-mcp/build/index.js"],
"env": {
"SEED_PHRASE": "your twelve word seed phrase here"
},
"disabled": false,
"autoApprove": []
}
}
}
For Claude desktop app:
{
"mcpServers": {
"polygon": {
"command": "node",
"args": ["/path/to/polygon-mcp/build/index.js"],
"env": {
"SEED_PHRASE": "your twelve word seed phrase here"
},
"disabled": false,
"autoApprove": []
}
}
}
Available Tools
call_contract
Call a contract function on Polygon PoS.
Parameters:
contractAddress: The address of the contract to callfunctionName: The name of the function to callfunctionArgs: The arguments to pass to the functionabi: The ABI of the contractvalue(optional): The value of MATIC to send with the transaction
erc20_balance
Get the balance of an ERC20 token on Polygon PoS.
Parameters:
contractAddress: The address of the contract to get the balance of
erc20_transfer
Transfer an ERC20 token on Polygon PoS.
Parameters:
contractAddress: The address of the contract to transfer the token fromtoAddress: The address of the recipientamount: The amount of tokens to transfer
get_gas_price
Get the current gas price on Polygon PoS.
License
MIT
相關伺服器
Billy MCP Client
Access live U.S. congressional data from the Congress.gov API.
mcp-clickhousex
A read-only MCP server for ClickHouse that supports metadata discovery, parameterized queries, and query analysis.
MCP Vertica
A server for managing and querying Vertica databases, including connection, schema, and security management.
Azure Data Explorer
An MCP server for integrating with Azure Data Explorer, allowing for data querying and management.
Supabase MCP Server
An MCP server providing administrative control over a Supabase PostgreSQL database, compatible with Cursor's Composer and Codeium's Cascade.
Memory Custom
Extends the MCP Memory server to create and manage a knowledge graph from LLM interactions.
MongoDB
Interact with MongoDB databases using natural language to query collections, inspect schemas, and manage data.
Data Mesh Manager MCP
Discover data products and request access in Data Mesh Manager.
Supabase MCP Server
A server for querying and managing data in a Supabase database.
Database
Universal database MCP server supporting multiple database types including PostgreSQL, Redshift, CockroachDB, MySQL, RDS MySQL, Microsoft SQL Server, BigQuery, Oracle DB, and SQLite