Skip to main content
Glama

MetaMask MCP

Un servidor de Protocolo de Contexto de Modelo (MCP) que permite a LLM interactuar con la cadena de bloques a través de MetaMask.

Con estas herramientas, sus claves privadas permanecen almacenadas de forma segura en su billetera criptográfica y nunca se comparten con el agente de IA al firmar mensajes o enviar transacciones.

Avance

https://github.com/user-attachments/assets/3fe8f20b-4666-4c36-8030-04d3e5d587c7

Related MCP server: EVM MCP Server

Requisitos

  • Node.js (v20 o superior)

  • pnpm

Configuración

  1. Clonar el repositorio

git clone https://github.com/Xiawpohr/metamask-mcp.git
cd metamask-mcp
  1. Instalar dependencias

pnpm install
  1. Construir el proyecto

pnpm build

Uso con Claude Desktop

Siga la guía https://modelcontextprotocol.io/quickstart/user y agregue la siguiente configuración:

{
  "mcpServers": {
    "metamask": {
      "command": "node",
      "args": [
        "/PATH/TO/YOUR_PROJECT/dist/index.ts"
      ]
    }
  }
}

Herramientas

  • call : Ejecutar una nueva llamada de mensaje inmediatamente sin enviar una transacción a la red.

  • get-chain-list : obtiene una lista de toda la información de las cadenas.

  • get-connect-uri : obtiene la URI de conexión para conectarse a una billetera MetaMask.

  • show-connect-qrcode : muestra el código QR de conexión para una URI de conexión determinada.

  • deploy-contract : implementa un contrato en la red, dado el código de bytes y los argumentos del constructor.

  • disconnect : Desconectar la billetera.

  • estimate-fee-per-gas : estimación de las tarifas por gas (en wei) para una transacción que probablemente se incluirá en el próximo bloque.

  • estimate-gas : estima el gas necesario para completar una transacción sin enviarla a la red.

  • get-account : Obtener la cuenta actual.

  • get-native-currency-balance : obtiene el saldo de la moneda nativa de una dirección.

  • get-token-balance : obtiene el saldo de tokens de una dirección.

  • get-block-number : obtiene el número del bloque más reciente visto.

  • get-block : obtiene información sobre un bloque mediante un número de bloque, hash o etiqueta.

  • get-chain-id : obtiene el identificador de la cadena actual.

  • get-chains : obtiene las cadenas configuradas.

  • get-ens-address : obtiene la dirección ENS para el nombre.

  • get-ens-name : obtiene el nombre ENS principal para la dirección.

  • get-gas-price : obtiene el precio actual del gas (en wei).

  • get-token : obtiene la información del token.

  • get-transaction-reeceipt : obtiene el recibo de la transacción dado un hash de la transacción.

  • get-transaction : obtiene la transacción dados los identificadores hash o de bloque.

  • read-contract : llama a una función de solo lectura en un contrato y devuelve la respuesta.

  • send-transaction : Envía transacciones a redes.

  • sign-message : Firma un mensaje.

  • switch-chain : cambia la cadena de destino.

  • verify-message : verifica que un mensaje fue firmado por la dirección proporcionada.

  • wait-for-transaction-receipt : espera a que la transacción se incluya en un bloque y luego devuelve el recibo de la transacción.

  • write-contract : ejecuta una función de escritura en un contrato.

Indicaciones

Contribuyendo

¡Agradecemos sus contribuciones! Envíen solicitudes de incorporación de cambios con cualquier mejora o corrección de errores.

Licencia

Licencia MIT

Available Tools

28 tools
callB

Executing a new message call immediately without submitting a transaction to the network.

Inputs: to (required), data (required), value.

deploy-contractC

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

Inputs: abi (required), bytecode (required), args.

disconnectC

Disconnect the wallet.

Inputs: no named parameters.

estimate-fee-per-gasC

Estimate for the fees per gas (in wei) for a transaction to be likely included in the next block.

Inputs: chainId, formatUnits.

estimate-gasA

Estimate the gas necessary to complete a transaction without submitting it to the network.

Inputs: to (required), data, value, maxFeePerGas, +2 more.

get-accountB

Get the current account.

Inputs: no named parameters.

get-blockC

Fetch information about a block at a block number, hash or tag.

Inputs: chainId, blockHash, blockNumber, blockTag.

get-block-numberB

Fetch the number of the most recent block seen.

Inputs: chainId.

get-chain-idB

Get the current chain id.

Inputs: no named parameters.

get-chain-listB

Get a list of all chains information.

Inputs: no named parameters.

get-chainsC

Get the configured chains.

Inputs: no named parameters.

get-connect-uriB

Get the connect URI to connect to a MetaMask wallet.

Inputs: no named parameters.

get-ens-addressB

Fetch the ENS address for name.

Inputs: name (required), chainId, blockNumber.

get-ens-nameB

Fetch the primary ENS name for address.

Inputs: address (required), chainId, blockNumber.

get-native-currency-balanceC

Get the native currency balance of an address.

Inputs: address (required).

get-tokenC

Fetch the token information.

Inputs: address (required), chainId.

get-token-balanceC

Get token balance of an address.

Inputs: address (required), token (required).

get-transactionC

Fetch transaction given hash or block identifiers.

Inputs: hash (required), chainId.

get-transaction-receiptC

Fetch the Transaction Receipt given a Transaction hash.

Inputs: hash (required), chainId.

read-contractC

Call a read-only function on a contract, and returning the response.

Inputs: abi (required), address (required), functionName (required), args, +1 more.

send-transactionC

Send transactions to networks.

Inputs: to (required), data, value, maxFeePerGas, +2 more.

show-connect-qrcodeC

Show the connect QR code for a given connect URI.

Inputs: uri (required).

sign-messageC

Sign a message.

Inputs: message (required).

switch-chainC

Switch the target chain.

Inputs: chainId (required), addEthereumChainParameter.

verify-messageA

Verify that a message was signed by the provided address.

Inputs: address (required), message (required), signature (required).

wait-for-transaction-receiptC

Waits for the transaction to be included on a block, and then returns the transaction receipt.

Inputs: hash (required), confirmations, chainId.

wait-secondsB

Wait the given seconds.

Inputs: seconds (required).

write-contractC

Execute a write function on a contract.

Inputs: abi (required), address (required), functionName (required), args, +4 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 28 tools

    Disambiguation4/5

    Most tools have distinct purposes, but some overlap exists, such as 'get-block' and 'get-block-number' which could cause minor confusion. However, descriptions clarify their differences, and the majority of tools target specific actions like contract operations, account management, and transaction handling without significant ambiguity.

    Naming Consistency4/5

    Tool names follow a consistent verb-noun pattern with hyphens (e.g., 'get-account', 'send-transaction'), but there are minor deviations like 'call' and 'disconnect' that lack nouns. Overall, the naming is predictable and readable, with only a few tools breaking the pattern.

    Tool Count3/5

    With 28 tools, the count is borderline high for a wallet integration server, potentially feeling heavy. While it covers many blockchain operations, some tools like 'wait-seconds' seem peripheral, and the set might benefit from consolidation to reduce complexity without losing core functionality.

    Completeness5/5

    The tool set provides comprehensive coverage for MetaMask wallet and blockchain interactions, including account management, contract operations (deploy, read, write), transaction handling, gas estimation, and network utilities. There are no obvious gaps, and it supports full CRUD-like workflows for the domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI agents to interact with 30+ Ethereum-compatible blockchain networks, providing services like token transfers, contract interactions, and ENS resolution through a unified interface.
      28
      77 npm
      381
      MIT
    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Comprehensive Model Context Protocol server that enables AI agents to interact with 30+ Ethereum-compatible blockchain networks, supporting token transfers, smart contract interactions, and ENS name resolution through a unified interface.
      1
      -
    • A
      license
      C
      quality
      D
      maintenance
      A suite of MCP servers that allow LLMs to interact with blockchains through MetaMask wallet without exposing private keys, facilitating secure AI-powered blockchain interactions and simplified user onboarding.
      25
      4
      ISC