MCP servers

erc20-mcp

The token module. It turns token actions into encoded calls ready for your wallet. It never sends anything itself.

npm package

@roxi-os/erc20-mcp

License

MIT

Install#

Add it to your MCP client's config. Requires Node.js 20 or newer. See the quick start for where the config file lives.

claude_desktop_config.json
{
  "mcpServers": {
    "erc20": { "command": "npx", "args": ["-y", "@roxi-os/erc20-mcp"] }
  }
}

From source

bash
git clone https://github.com/ROXI-OS-SI/erc20-mcp.git
cd erc20-mcp
pnpm install
pnpm build

Then use "command": "node" with the absolute path to build/index.js as the argument.

How results are used#

Every prepare-* tool returns prepareForAction, the token contract as address, and the encoded data. The agent finishes with the metamask-mcp tool named in prepareForAction:

send-transaction

transfer, approve, mint

Asks for your signature

call

allowance, total supply

Free read, then resolve-*

deploy-contract

new token

Asks for your signature

Walkthrough: Send ERC-20 tokens.

Tools#

Writes

prepare-transfer

Prepare a token transfer. Finish with send-transaction.

ParameterTypeDescription
tokenAddressstring (0x…)The token contract address.
tokenDecimalnumberThe token's decimals, for example 6 for USDC.
tostring (0x…)Recipient address.
amountstringAmount in normal units, such as "12.5".

prepare-approve

Prepare an approval letting a spender move your tokens. Finish with send-transaction.

ParameterTypeDescription
tokenAddressstring (0x…)The token contract address.
tokenDecimalnumberThe token's decimals, for example 6 for USDC.
spenderstring (0x…)Address allowed to spend.
amountstringAmount in normal units, such as "12.5".

prepare-mint

Prepare a mint on a token with a public mint function. Finish with send-transaction.

ParameterTypeDescription
tokenAddressstring (0x…)The token contract address.
tokenDecimalnumberThe token's decimals, for example 6 for USDC.
tostring (0x…)Address receiving the new tokens.
amountstringAmount in normal units, such as "12.5".

prepare-deploy-erc20-contract

Prepare a new token deployment from compiled bytecode. Finish with deploy-contract.

ParameterTypeDescription
bytecodestring (0x…)Compiled bytecode, for example from solc-mcp.
namestringToken name.
symbolstringToken symbol.
decimalnumberToken decimals, usually 18.

Reads

prepare-total-supply

Prepare a read of the total supply. Finish with call, then resolve-total-supply.

ParameterTypeDescription
tokenAddressstring (0x…)The token contract address.

resolve-total-supply

Decode the total supply into a readable amount.

ParameterTypeDescription
tokenDecimalnumberThe token's decimals, for example 6 for USDC.
datastring (0x…)The raw result returned by metamask-mcp's call.

prepare-allowance

Prepare a read of how much a spender may move for an owner. Finish with call, then resolve-allowance.

ParameterTypeDescription
tokenAddressstring (0x…)The token contract address.
ownerstring (0x…)Token owner.
spenderstring (0x…)Approved spender.

resolve-allowance

Decode the allowance into a readable amount.

ParameterTypeDescription
tokenDecimalnumberThe token's decimals, for example 6 for USDC.
datastring (0x…)The raw result returned by metamask-mcp's call.

Prompts#

generate-erc20-contract asks the agent to write an ERC-20, with a Solmate-based contract as its example. See Compile and deploy.

Important. The example contract's mint is public with no access control. Restrict it before deploying a real token.