Stylus MCP Tools

Tools for Stylus development and interaction.

  1. createStylusProject - Create a new Cargo Stylus project

    Demo

    • Parameters:

      • projectName: Project name

      • path: Path to create the project (optional)

  2. initStylusProject - Initialize a Stylus project in the current directory

    Demo

    • Parameters:

      • path: Path to initialize the project (optional)

  3. exportStylusAbi - Export a Solidity ABI for a Stylus contract

    Demo

    • Parameters:

      • output: The output file

      • path: Path to the Stylus project (optional)

      • json: Write a JSON ABI instead using solc. Requires solc (default: true)

      • rustFeatures: Rust crate's features list. Required to include feature specific ABI (optional)

  4. checkStylusContract - Check if a Stylus contract is valid for deployment

    Demo

    • Parameters:

      • path: Path to the Stylus project (optional)

  5. deployStylusContract - Deploy a Stylus contract to the Arbitrum network. Uses environment variables for secure authentication and supports gas estimation mode.

    Demo

    • Parameters:

      • endpoint: RPC endpoint URL

      • path: Path to the Stylus project (optional)

      • estimateGas: Only estimate gas instead of deploying (optional boolean)

      • Uses STYLUS_PRIVATE_KEY, STYLUS_PRIVATE_KEY_PATH, or STYLUS_KEYSTORE_PATH environment variables for authentication.

  6. verifyStylusContract - Verify the deployment of a Stylus contract

    Demo

    • Parameters:

      • deploymentTx: Deployment transaction hash

      • endpoint: RPC endpoint URL (optional)

      • path: Path to the Stylus project (optional)

  7. activateStylusContract - Activate an already deployed Stylus contract. Uses environment variables for secure authentication.

    Demo

    • Parameters:

      • contractAddress: Deployed contract address

      • endpoint: RPC endpoint URL

      • path: Path to the Stylus project (optional)

      • Uses STYLUS_PRIVATE_KEY, STYLUS_PRIVATE_KEY_PATH, or STYLUS_KEYSTORE_PATH environment variables for authentication.

  8. cacheStylusContract - Cache a contract using the Stylus CacheManager. Uses environment variables for secure authentication and supports multiple cache operations.

    Demo

    • Parameters:

      • subcommand: Cache subcommand ('bid', 'status', 'suggest-bid', 'help')

      • contractAddress: Contract address to cache

      • endpoint: RPC endpoint URL

      • path: Path to the Stylus project (optional)

      • bidAmount: Bid amount for 'bid' subcommand (optional)

      • Uses STYLUS_PRIVATE_KEY, STYLUS_PRIVATE_KEY_PATH, or STYLUS_KEYSTORE_PATH environment variables.

  9. generateStylusBindings - Generate C code bindings for a Stylus contract from project source with automatic ABI preparation and cleanup

    Demo

    • Parameters:

      • projectPath: The Stylus project path

      • outDir: Output directory for C bindings

      • rustFeatures: Rust features for ABI generation (optional)

      • abiOutputPath: Custom ABI JSON path (optional)

      • keepAbiFile: Keep generated ABI file (optional, default: false)

  10. replayStylusTransaction - Replay a Stylus transaction in GDB debugger

    Demo

    • Parameters:

      • txHash: Transaction hash to replay

      • endpoint: RPC endpoint URL (optional)

      • path: Path to the Stylus project (optional)

  11. traceStylusTransaction - Trace a Stylus transaction

    Demo

    • Parameters:

      • txHash: Transaction hash to trace

      • endpoint: RPC endpoint URL (optional)

      • path: Path to the Stylus project (optional)

  12. deployMultipleStylusContracts - Deploy multiple Stylus contracts to the Arbitrum network in sequence

    • Parameters:

      • endpoint: RPC endpoint URL

      • projectPaths: Array of paths to Stylus projects that should be deployed

      • estimateGas: Only estimate gas instead of deploying (optional boolean)

      • Uses STYLUS_PRIVATE_KEY, STYLUS_PRIVATE_KEY_PATH, or STYLUS_KEYSTORE_PATH environment variables for authentication.

Last updated