Ethereum Address Validator

v1.0.0
io.github.nirholas/validation-mcp-server Checked 3 days ago Published 10 months ago

Validate Ethereum addresses, keys, checksums, keccak256 hashes, function selectors, ENS

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

validate_address

Comprehensive Ethereum address validation. Validates an Ethereum address format, optionally verifying EIP-55 checksum. Returns detailed information about the address validity and format. Args: address: Address to validate (any format - with/without 0x, any case) check_checksum: Whether to verify EIP-55 checksum if present return_normalized: Return checksummed version Returns: Dictionary containing: - is_valid: Whether the address is valid - address_input:…

ParameterTypeDescription
address *string
check_checksumboolean
return_normalizedboolean

compare_addresses

Compare two Ethereum addresses for equality (case-insensitive). Compares two addresses after normalizing them, returning whether they represent the same Ethereum address regardless of case/format. Args: address1: First address address2: Second address Returns: Dictionary containing: - are_equal: Whether addresses are the same - address1: Info about first address - address2: Info about second address - comparison_method: How comparison was done…

ParameterTypeDescription
address1 *string
address2 *string

batch_validate_addresses

Validate multiple Ethereum addresses at once. Efficiently validates a list of addresses, returning summary statistics and detailed results for each address. Args: addresses: List of addresses to validate check_checksum: Verify checksums for all addresses stop_on_invalid: Stop at first invalid address Returns: Dictionary containing: - total_count: Total addresses checked - valid_count: Number of valid addresses - invalid_count: Number of invalid…

ParameterTypeDescription
addresses *array
check_checksumboolean
stop_on_invalidboolean

generate_vanity_check

Check if an address matches vanity criteria. Checks whether an Ethereum address matches specified vanity patterns (prefix, suffix, or contains) and calculates pattern difficulty. Args: address: Address to check prefix: Required prefix (after 0x), case-insensitive suffix: Required suffix, case-insensitive contains: Required substring, case-insensitive Returns: Dictionary containing: - matches_all: Whether all criteria are met - address: Checksum…

ParameterTypeDescription
address *string
containsstring
prefixstring
suffixstring

validate_private_key

Validate an Ethereum private key. Performs comprehensive validation of a private key including format, range checking, and optionally derives the corresponding address. Args: private_key: Hex-encoded private key (with or without 0x prefix) derive_address: Whether to derive and return the address Returns: Dictionary containing: - is_valid: Whether the key is valid - key_format: Detected format (hex_with_prefix/hex_without_prefix) - byte_length: Key byte len…

ParameterTypeDescription
private_key *string
derive_addressboolean

to_checksum_address

Convert any Ethereum address to EIP-55 checksummed format. Takes an address in any valid format and returns the properly checksummed version according to EIP-55 specification. Args: address: Any valid Ethereum address format Returns: Dictionary containing: - checksum_address: EIP-55 checksummed address - input_address: Original input - was_already_checksummed: Whether input was already checksummed - checksum_hash: Keccak256 hash used for checksumming…

ParameterTypeDescription
address *string

derive_address_from_private_key

Derive Ethereum address from a private key. Performs the full derivation chain: private key → public key → address, optionally returning the intermediate public key values. Args: private_key: Hex-encoded private key (with or without 0x prefix) include_public_key: Whether to include public key in response Returns: Dictionary containing: - address: Checksummed Ethereum address - address_lowercase: Lowercase address - public_key: Public key info (if inclu…

ParameterTypeDescription
private_key *string
include_public_keyboolean

derive_address_from_public_key

Derive Ethereum address from a public key. Supports both compressed (33 bytes) and uncompressed (64/65 bytes) formats. Args: public_key: Hex-encoded public key key_format: "auto", "compressed", or "uncompressed" Returns: Dictionary containing: - address: Checksummed Ethereum address - input_format_detected: Detected key format - public_key_normalized: Normalized public key formats - keccak_hash: Full keccak hash - address_bytes: Last 20 byt…

ParameterTypeDescription
public_key *string
key_formatstring

validate_signature

Validate ECDSA signature components. Validates v, r, s signature values for correctness, checking ranges and optionally enforcing EIP-2 low-s requirement. Args: v: Recovery ID (27, 28, or EIP-155 encoded with chain ID) r: Signature r value (hex string with or without 0x) s: Signature s value (hex string with or without 0x) strict: If true, enforce EIP-2 low-s requirement Returns: Dictionary containing: - is_valid: Whether signature components are valid…

ParameterTypeDescription
r *string
s *string
v *integer
strictboolean

validate_hex_data

Validate hexadecimal data for Ethereum use. Validates hex strings and attempts to identify their type based on length and format patterns. Args: data: Hex string to validate expected_type: Expected type - "auto", "address", "private_key", "public_key", "transaction_hash", "signature", "calldata" expected_length: Expected byte length (optional) Returns: Dictionary containing: - is_valid: Whether data is valid hex - input: Original…

ParameterTypeDescription
data *string
expected_lengthinteger
expected_typestring

keccak256_hash

Compute Keccak-256 hash (Ethereum's hash function). Computes the Keccak-256 hash used throughout Ethereum for addresses, signatures, storage slots, and more. Args: data: Data to hash input_type: Input format - "hex" (0x-prefixed), "text" (UTF-8 string), or "bytes" (base64 encoded) Returns: Dictionary containing: - hash: 0x-prefixed hash (64 hex chars) - hash_no_prefix: Hash without 0x prefix - input_type: Input type used…

ParameterTypeDescription
data *string
input_typestring

validate_ens_name

Validate ENS name format (offline validation only). Validates the format of an ENS name and computes its namehash. Does not perform actual resolution (requires network access). Args: name: ENS name (e.g., "vitalik.eth") check_format_only: Only check format, not resolution Returns: Dictionary containing: - is_valid_format: Whether the name format is valid - name: Original name - normalized: Normalized name - namehash: ENS namehash (recursive kec…

ParameterTypeDescription
name *string
check_format_onlyboolean

encode_function_selector

Encode function signature to 4-byte selector. Computes the keccak256 hash of the function signature and returns the first 4 bytes as the function selector. Args: function_signature: Function signature (e.g., "transfer(address,uint256)") Returns: Dictionary containing: - selector: 4-byte function selector (0x + 8 hex chars) - full_hash: Complete keccak256 hash - function_signature: Input signature - normalized_signature: Cleaned signature - para…

ParameterTypeDescription
function_signature *string

decode_function_selector

Decode 4-byte function selector to signature. Looks up the selector in a database of known function signatures. Note: Some selectors may have collisions (multiple functions with same selector). Args: selector: 4-byte selector (0x + 8 hex chars) use_database: Whether to look up in known signatures database Returns: Dictionary containing: - selector: Input selector (normalized) - known_signatures: List of known function signatures - most_likely: Most likely…

ParameterTypeDescription
selector *string
use_databaseboolean

calculate_storage_slot

Calculate contract storage slot positions. Computes storage slot locations for Solidity storage layouts, supporting simple slots, mappings, and dynamic arrays. Args: base_slot: Base storage slot (hex string, position in contract storage) key: Mapping key (for mapping types) - address or uint256 slot_type: "simple", "mapping", or "dynamic_array" Returns: Dictionary containing: - storage_slot: Computed storage slot (0x + 64 hex chars) - slot_type: Type of sl…

ParameterTypeDescription
base_slot *string
keystring
slot_typestring