An MCP server for checking and revoking ERC-20 token allowances, enhancing security and control. - Fetch Token Approvals: Retrieve all ERC20 token approvals for a wallet on a specified chain, including token details, balances, and USD values at risk. - Revoke Allowances: Submit transactions to revoke ERC20 token allowances for specific spenders. - Check Transaction Status: Verify the success or fa
Add this skill
npx mdskills install kukapay/token-revoke-mcpWell-documented MCP server for managing ERC-20 token allowances with clear examples and multi-chain support
1# Token Revoke MCP23An MCP server for checking and revoking ERC-20 token allowances, enhancing security and control.456789## Features1011- **Fetch Token Approvals**: Retrieve all ERC20 token approvals for a wallet on a specified chain, including token details, balances, and USD values at risk.12- **Revoke Allowances**: Submit transactions to revoke ERC20 token allowances for specific spenders.13- **Check Transaction Status**: Verify the success or failure of submitted transactions using transaction hashes.14- **Multi-Chain Support**: Supports over 50 EVM-compatible chains, including mainnets (e.g., Ethereum, Polygon, BSC) and testnets (e.g., Goerli, Mumbai).1516## Prerequisites1718- **Node.js**: Version 18 or higher (for native `fetch` support).19- **Moralis API Key**: Required for fetching token approval data.20- **Private Key**: An Ethereum-compatible private key for signing revocation transactions.2122## Installation23241. **Clone the Repository**:25 ```bash26 git clone https://github.com/kukapay/token-revoke-mcp.git27 cd token-revoke-mcp28 ```29302. **Install Dependencies**:31 ```bash32 npm install33 ```34353. **Client Configuration**:3637 ```json38 {39 "mcpServers": {40 "token-revoke-mcp": {41 "command": "node",42 "args": ["path/to/token-revoke-mcp/index.js"],43 "env": {44 "MORALIS_API_KEY": "your moralis api key",45 "PRIVATE_KEY": "your wallet private key"46 }47 }48 }49 }50 ```5152## Usage5354Below are examples of how you might interact with the server using natural language prompts as input. The outputs are the raw `text` values from the `content` array returned by the server, assuming a client translates the prompts into tool calls.5556### Example 1: Fetch Token Approvals57**Input Prompt**:58> "Show me all the token approvals for my wallet on Polygon."5960**Output Response**:61```62[63 {64 "tokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",65 "tokenSymbol": "USDC",66 "balance": "100.5",67 "usdPrice": "1.00",68 "usdValueAtRisk": "50.25",69 "spenderAddress": "0x1111111254eeb25477b68fb85ed929f73a960582",70 "approvedAmount": "1000.0",71 "transactionHash": "0xabc...",72 "timestamp": "2023-10-01T12:00:00Z"73 }74]75```7677### Example 2: Revoke an Allowance78**Input Prompt**:79> "Revoke the allowance for token 0x2791bca1f2de4661ed88a30c99a7a9449aa84174 to spender 0x1111111254eeb25477b68fb85ed929f73a960582 on BSC."8081**Output Response**:82```83Allowance revocation submitted on bsc. Transaction hash: 0x123.... Note: Transaction is not yet confirmed.84```8586### Example 3: Check Transaction Status87**Input Prompt**:88> "Did my transaction 0x123... on BSC go through?"8990**Output Response** (possible outputs):91- **Pending**:92 ```93 Transaction 0x123... on bsc is still pending or not found.94 ```95- **Success**:96 ```97 Transaction 0x123... on bsc has completed with status: successful. Block number: 12345.98 ```99- **Failure**:100 ```101 Transaction 0x123... on bsc has completed with status: failed. Block number: 12345.102 ```103104## Supported Chains105106The server supports a wide range of EVM-compatible chains based on the Moralis JS SDK’s `chaindata.ts`. Examples include:107- Mainnets: `ethereum`, `polygon`, `bsc`, `avalanche`, `fantom`, `arbitrum`, `optimism`, etc.108- Testnets: `goerli`, `mumbai`, `bsc testnet`, `arbitrum goerli`, `optimism sepolia`, etc.109- Full list: See `SUPPORTED_CHAINS` in `server.js`.110111112## License113114This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.115116
Full transparency — inspect the skill content before installing.