home / mcp / token revoke mcp server

Token Revoke MCP Server

An MCP server for checking and revoking ERC-20 token allowances across multiple blockchains.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "kukapay-token-revoke-mcp": {
      "command": "node",
      "args": [
        "path/to/token-revoke-mcp/index.js"
      ],
      "env": {
        "PRIVATE_KEY": "your wallet private key",
        "MORALIS_API_KEY": "your moralis api key"
      }
    }
  }
}

You can fetch ERC-20 token approvals for a wallet, revoke specific token allowances, and verify transaction outcomes across many EVM-compatible chains. This MCP server helps you lock down spend permissions and monitor risky approvals, simplifying security and control over your assets.

How to use

You run a local MCP client that connects to this server to perform three core actions: fetch current token approvals for a wallet, revoke allowances for chosen spenders, and check the status of submitted revocation transactions. Start by configuring your MCP client with the required environment variables and point it at your running MCP server. Then, perform the following typical workflows.

How to install

Prerequisites ensure you can run the server and sign transactions.

# 1) Clone the repository
git clone https://github.com/kukapay/token-revoke-mcp.git
cd token-revoke-mcp

# 2) Install dependencies
npm install

Next, configure your client to start the MCP server. Use the following JSON configuration snippet to define the MCP server entry that runs locally with Node.js and signs transactions using your private key.

{
  "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"
      }
    }
  }
}

Additional configuration and usage notes

Environment variables are required for secure operation. The MCP server expects a Moralis API key to fetch token approvals and a private key to sign revocation transactions. Keep these secrets safe and do not expose them in public clients.

Tools and capabilities

This MCP server provides the following capabilities to help you manage ERC-20 token allowances across chains.

Operational notes

- The server supports multi-chain operation, enabling token approval checks and revocation on many EVM-compatible networks. - Always verify the status of a submitted transaction by querying its hash to confirm success or failure.

Security considerations

- Use a dedicated private key with restricted permissions for revocation actions. - Rotate API keys and keys periodically and monitor for unusual revocation activity. - Store sensitive credentials in a secure vault or environment management system.

Troubleshooting

If you encounter issues starting the server, confirm that your Node.js version is 18 or higher and that your Moralis API key and private key are set in the environment that launches the server. Check logs for errors related to signing transactions or network connectivity.

Available tools

fetch_token_approvals

Fetch ERC-20 token approvals for a wallet on a specified chain including token details, balances, and USD value at risk.

revoke_allowances

Submit transactions to revoke ERC-20 token allowances for specific spenders.

check_transaction_status

Verify the success or failure of submitted revocation transactions using their hashes.