by kukapay
An MCP server for checking and revoking ERC-20 token allowances across multiple blockchains, enhancing security and control.
Token Revoke MCP is a server that allows users to check and revoke ERC-20 token allowances across over 50 EVM-compatible blockchains. This enhances security by enabling users to manage and revoke permissions granted to decentralized applications (dApps) or smart contracts, thereby mitigating potential risks associated with malicious or compromised contracts.
To use Token Revoke MCP, you first need to clone the repository and install the dependencies. You will also need Node.js (version 18 or higher), a Moralis API Key, and an Ethereum-compatible private key. After installation, you can configure the client by providing your Moralis API Key and private key in the mcpServers
configuration. Once set up, you can interact with the server using natural language prompts to fetch token approvals, revoke allowances, and check transaction statuses.
Q: What are the prerequisites for running Token Revoke MCP? A: You need Node.js (version 18 or higher), a Moralis API Key, and an Ethereum-compatible private key.
Q: Which blockchains does Token Revoke MCP support? A: It supports over 50 EVM-compatible chains, including popular mainnets like Ethereum, Polygon, BSC, Avalanche, and various testnets.
Q: How do I revoke an allowance? A: You can submit a transaction to revoke an allowance for a specific token and spender on a chosen blockchain using a natural language prompt.
Q: Can I check the status of my revocation transaction? A: Yes, you can check the success or failure of submitted transactions using their transaction hashes.
An MCP server for checking and revoking ERC-20 token allowances, enhancing security and control.
fetch
support).Clone the Repository:
git clone https://github.com/kukapay/token-revoke-mcp.git
cd token-revoke-mcp
Install Dependencies:
npm install
Client Configuration:
{
"mcpServers": {
"token-revoke-mcp": {
"command": "node",
"args": ["path/to/token-revoke-mcp/index.js"],
"env": {
"MORALIS_API_KEY": "your moralis api key",
"PRIVATE_KEY": "your wallet private key"
}
}
}
}
Below 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.
Input Prompt:
"Show me all the token approvals for my wallet on Polygon."
Output Response:
[
{
"tokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
"tokenSymbol": "USDC",
"balance": "100.5",
"usdPrice": "1.00",
"usdValueAtRisk": "50.25",
"spenderAddress": "0x1111111254eeb25477b68fb85ed929f73a960582",
"approvedAmount": "1000.0",
"transactionHash": "0xabc...",
"timestamp": "2023-10-01T12:00:00Z"
}
]
Input Prompt:
"Revoke the allowance for token 0x2791bca1f2de4661ed88a30c99a7a9449aa84174 to spender 0x1111111254eeb25477b68fb85ed929f73a960582 on BSC."
Output Response:
Allowance revocation submitted on bsc. Transaction hash: 0x123.... Note: Transaction is not yet confirmed.
Input Prompt:
"Did my transaction 0x123... on BSC go through?"
Output Response (possible outputs):
Transaction 0x123... on bsc is still pending or not found.
Transaction 0x123... on bsc has completed with status: successful. Block number: 12345.
Transaction 0x123... on bsc has completed with status: failed. Block number: 12345.
The server supports a wide range of EVM-compatible chains based on the Moralis JS SDK’s chaindata.ts
. Examples include:
ethereum
, polygon
, bsc
, avalanche
, fantom
, arbitrum
, optimism
, etc.goerli
, mumbai
, bsc testnet
, arbitrum goerli
, optimism sepolia
, etc.SUPPORTED_CHAINS
in server.js
.This project is licensed under the MIT License. See the LICENSE file for details.
Reviews feature coming soon
Stay tuned for community discussions and feedback