The Polygon MCP Server provides a comprehensive interface for interacting with the Polygon blockchain network, enabling AI assistants to perform wallet operations, smart contract deployments, L2 bridging, DeFi interactions, and transaction simulations. Built using ethers.js v6 and the Model Context Protocol SDK, it supports both Polygon Mainnet and Mumbai Testnet networks, handles the POL token (formerly MATIC) with backward compatibility, and includes tools for token transfers, balance checking, gas price retrieval, and integration with protocols like QuickSwap and Aave. This implementation is particularly valuable for blockchain developers, DeFi users, and applications requiring secure, programmatic access to Polygon network functionality through AI assistants.
Nessuna recensione ancora. Sii il primo a recensire!
Accedi per unirti alla conversazione
Retrieve the current wallet address.
Request testnet POL from a faucet (Amoy testnet only).
List token balances for the connected wallet.
Transfer POL or ERC20 tokens to another address. Parameters: to (string), amount (string), token (optional string).
Deploy a smart contract to Polygon. Parameters: templateId (string), params (object), constructorArgs (optional Array).
Verify a deployed contract on Polygonscan. Parameters: address (string), name (string), code (string), constructorArgs (Array).
List available contract templates.
Deposit ETH from Ethereum to Polygon. Parameters: amount (string).
Withdraw ETH/POL from Polygon to Ethereum. Parameters: amount (string).
Deposit ERC20 from Ethereum to Polygon. Parameters: token (string), amount (string).
Withdraw ERC20 from Polygon to Ethereum. Parameters: token (string), amount (string).
Swap tokens using QuickSwap. Parameters: fromToken (string), toToken (string), amount (string).
Get a price quote for a token swap. Parameters: fromToken (string), toToken (string), amount (string).
Add liquidity to a QuickSwap pool. Parameters: tokenA (string), tokenB (string), amountADesired (string), amountBDesired (string).
Execute single-hop swaps on Uniswap V3. Parameters: tokenIn (string), tokenOut (string), amount (string), fee (number).
Execute multi-hop swaps on Uniswap V3. Parameters: path (Array), amounts (Array).
Get quotes for single-hop swaps on Uniswap V3. Parameters: tokenIn (string), tokenOut (string), amount (string), fee (number).
Get quotes for multi-hop swaps on Uniswap V3. Parameters: path (Array), amount (string).
Get market information from Polymarket. Parameters: marketId (string).
Place bets by buying position tokens on Polymarket. Parameters: marketId (string), outcome (string), amount (string).
Get user positions for a market on Polymarket. Parameters: marketId (string).
Simulate a transaction to preview its effects. Parameters: txParams (object).
Estimate gas for a transaction. Parameters: txParams (object).
Get current gas prices on Polygon.
Switch between Polygon Mainnet and Amoy Testnet. Parameters: network (string).