Guides
Compile and deploy
Write a contract in conversation, compile it with solc-mcp, and deploy it from your wallet.
You'll need solc-mcp and metamask-mcp enabled, a connected wallet, and some Sepolia ETH for gas.
Deploy a contract#
Write a Greeter contract whose greeting can be updated, and deploy it on Sepolia with the greeting "gm".Write the source
The agent writes the Solidity itself, or uses yours. For example:
Greeter.sol// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; contract Greeter { string public greeting; constructor(string memory initial) { greeting = initial; } function setGreeting(string calldata next) external { greeting = next; } }Compile
compile-soliditytakes afileNameending in.soland thecontent, and returns each contract'sabi,bytecodeandcompilerVersion. If the code doesn't compile, it returns the compiler's errors, and the agent can fix the source and try again.Deploy from your wallet
deploy-contracton metamask-mcp takes theabi, thebytecodeand the constructorargs, here["gm"]. MetaMask asks you to confirm the deployment.Get the address
wait-for-transaction-receiptreturns the receipt. The new contract's address is in itscontractAddressfield.
read-contract to read greeting for free, and write-contract to call setGreeting, which asks for your signature.Launch an ERC-20 token#
erc20-mcp includes a shortcut for tokens:
Generate the contract
The
generate-erc20-contractprompt asks the agent to write an ERC-20, using a Solmate-based contract as its example.Compile it
Compile with
compile-solidityas above.Prepare the deployment
prepare-deploy-erc20-contracttakes thebytecode,name,symbolanddecimal, and returnsprepareForAction: "deploy-contract"with the ABI and constructor arguments filled in.Deploy and mint
Deploy with
deploy-contract, then useprepare-mintandsend-transactionto mint the first supply. Each step asks for your signature.
mint function is public with no access control, so anyone can mint tokens once it's deployed. That's fine for a Sepolia test. For a real token, ask the agent to restrict mint to an owner, or remove it, before you deploy.