MetaMask MCP

deploy-contract

Deploy smart contracts to the blockchain using bytecode and constructor arguments with the MetaMask MCP server, ensuring secure interaction with your crypto wallet.

Instructions

Deploy a contract to the network, given bytecode, and constructor arguments.

Input Schema

NameRequiredDescriptionDefault
abiYesThe contract's ABI.
argsNoArguments to pass when deploying the contract. Inferred from abi.
bytecodeYesThe contract's bytecode.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "abi": { "description": "The contract's ABI.", "items": { "anyOf": [ { "additionalProperties": false, "properties": { "inputs": { "items": { "allOf": [ { "properties": { "internalType": { "type": "string" }, "name": { "anyOf": [ { "anyOf": [ { "not": {} }, { "pattern": "[a-zA-Z$_][a-zA-Z0-9$_]*", "type": "string" } ] }, { "const": "", "type": "string" } ] } }, "type": "object" }, { "anyOf": [ { "additionalProperties": false, "properties": { "type": { "anyOf": [ { "const": "address", "type": "string" }, { "const": "bool", "type": "string" }, { "pattern": "^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$", "type": "string" }, { "const": "function", "type": "string" }, { "const": "string", "type": "string" }, { "pattern": "^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$", "type": "string" }, { "pattern": "^(address|bool|function|string|bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?|u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?)(\\[[0-9]{0,}\\])+$", "type": "string" } ] } }, "required": [ "type" ], "type": "object" }, { "additionalProperties": false, "properties": { "components": { "items": { "$ref": "#/properties/abi/items/anyOf/0/properties/inputs/items" }, "type": "array" }, "type": { "anyOf": [ { "const": "tuple", "type": "string" }, { "pattern": "^tuple(\\[[0-9]{0,}\\])+$", "type": "string" } ] } }, "required": [ "type", "components" ], "type": "object" } ] } ] }, "type": "array" }, "name": { "type": "string" }, "type": { "const": "error", "type": "string" } }, "required": [ "type", "inputs", "name" ], "type": "object" }, { "additionalProperties": false, "properties": { "anonymous": { "type": "boolean" }, "inputs": { "items": { "allOf": [ { "$ref": "#/properties/abi/items/anyOf/0/properties/inputs/items" }, { "properties": { "indexed": { "type": "boolean" } }, "type": "object" } ] }, "type": "array" }, "name": { "$ref": "#/properties/abi/items/anyOf/0/properties/inputs/items/allOf/0/properties/name/anyOf/0/anyOf/1" }, "type": { "const": "event", "type": "string" } }, "required": [ "type", "inputs", "name" ], "type": "object" }, { "allOf": [ { "properties": { "constant": { "type": "boolean" }, "gas": { "type": "number" }, "payable": { "type": "boolean" } }, "type": "object" }, { "anyOf": [ { "additionalProperties": false, "properties": { "inputs": { "items": { "$ref": "#/properties/abi/items/anyOf/0/properties/inputs/items" }, "type": "array" }, "name": { "pattern": "[a-zA-Z$_][a-zA-Z0-9$_]*", "type": "string" }, "outputs": { "items": { "$ref": "#/properties/abi/items/anyOf/0/properties/inputs/items" }, "type": "array" }, "stateMutability": { "enum": [ "pure", "view", "nonpayable", "payable" ], "type": "string" }, "type": { "const": "function", "type": "string" } }, "required": [ "type", "inputs", "name", "outputs", "stateMutability" ], "type": "object" }, { "additionalProperties": false, "properties": { "inputs": { "items": { "$ref": "#/properties/abi/items/anyOf/0/properties/inputs/items" }, "type": "array" }, "stateMutability": { "enum": [ "payable", "nonpayable" ], "type": "string" }, "type": { "const": "constructor", "type": "string" } }, "required": [ "type", "inputs", "stateMutability" ], "type": "object" }, { "additionalProperties": false, "properties": { "inputs": { "items": [], "maxItems": 0, "minItems": 0, "type": "array" }, "stateMutability": { "enum": [ "payable", "nonpayable" ], "type": "string" }, "type": { "const": "fallback", "type": "string" } }, "required": [ "type", "stateMutability" ], "type": "object" }, { "additionalProperties": false, "properties": { "stateMutability": { "const": "payable", "type": "string" }, "type": { "const": "receive", "type": "string" } }, "required": [ "type", "stateMutability" ], "type": "object" } ] } ] } ] }, "type": "array" }, "args": { "description": "Arguments to pass when deploying the contract. Inferred from abi.", "items": {}, "type": "array" }, "bytecode": { "description": "The contract's bytecode.", "type": "string" } }, "required": [ "abi", "bytecode" ], "type": "object" }
ID: cw2ldcetl4