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.
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), amountA (string), amountB (string).
Execute single-hop swaps. Parameters: tokenIn (string), tokenOut (string), amount (string), fee (number).
Execute multi-hop swaps. Parameters: path (array), amounts (array).
Get quotes for single-hop swaps. Parameters: tokenIn (string), tokenOut (string), amount (string), fee (number).
Get quotes for multi-hop swaps. Parameters: path (array), amount (string).
Get market information. Parameters: marketId (string).
Place bets by buying position tokens. Parameters: marketId (string), outcome (string), amount (string).
Get user positions for a market. 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).
No reviews yet. Be the first to review!
Sign in to join the conversation
Our bundler currently only supports TypeScript-based servers. Check back soon!