mcpField
E
Ethereum Keystore Encryption

Ethereum Keystore Encryption

Local
github.com/nirholasFinance28Updated 3w ago

About Ethereum Keystore Encryption

Keystore MCP Server is an MCP server for encrypting and decrypting Ethereum keystore files under the Web3 Secret Storage V3 standard. It targets users who keep wallet keys in cold storage and provides tools for file handling and password changes.

Key features

  1. 01Follows Web3 Secret Storage V3 format
  2. 02Supports scrypt and PBKDF2 key derivation
  3. 03Provides 9 tools and 4 resources
  4. 04Includes 4 prompt workflows
  5. 05Saves keystore files with 0600 permissions

Use cases

  1. 01Create encrypted keystore files for cold storage wallets
  2. 02Batch encrypt keys for multiple wallets
  3. 03Audit or migrate existing keystore files

MCP support

This project is an MCP server that exposes keystore-related tools, resources and prompts to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"nirholas-keystore": {
"command": "uvx",
"args": [
"keystore-mcp-server"
]
}
}
}
Run commanduvx keystore-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypikeystore-mcp-server1.0.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Keystore MCP Server

PyPI MCP Registry

A Model Context Protocol (MCP) server for Ethereum keystore encryption, decryption, and management following the Web3 Secret Storage Definition Version 3 standard.

Features

Tools (9)
  • encrypt_keystore - Encrypt private key to Web3 Secret Storage V3 format
  • decrypt_keystore - Decrypt keystore to recover private key
  • save_keystore_file - Save keystore with standard Ethereum naming
  • load_keystore_file - Load and validate keystore files
  • get_keystore_info - Extract metadata without decryption
  • validate_keystore - Validate keystore structure
  • change_keystore_password - Change password and optionally upgrade KDF
  • batch_encrypt_keystores - Encrypt multiple wallets
  • keystore_to_private_key_file - Export decrypted private key (dangerous)
Resources (4)
  • keystore://specification - Web3 Secret Storage V3 specification
  • keystore://security-guide - Security best practices
  • keystore://kdf-comparison - Scrypt vs PBKDF2 comparison
  • keystore://examples/{type} - Example keystores
Prompts (4)
  • secure_wallet_backup - Guided backup creation
  • keystore_migration - Migration from legacy formats
  • keystore_recovery - Recovery assistance
  • keystore_security_audit - Security audit workflow

Installation

pip install -e .

# Or with dev dependencies
pip install -e ".[dev]"

Usage

Running the Server
keystore-mcp-server
Claude Desktop Configuration
{
  "mcpServers": {
    "keystore": {
      "command": "keystore-mcp-server"
    }
  }
}

Cryptographic Standards

Web3 Secret Storage V3
  • KDF: scrypt (recommended) or pbkdf2
  • Cipher: AES-128-CTR
  • MAC: Keccak-256
  • UUID: Version 4
Default Scrypt Parameters
ParameterValueDescription
N262144 (2^18)CPU/memory cost
r8Block size
p1Parallelization
dklen32Derived key length
Default PBKDF2 Parameters
ParameterValueDescription
c262144Iterations
prfhmac-sha256PRF
dklen32Derived key length

Security

⚠️ Important Security Notes:

  1. Never share keystore passwords - Treat like private keys
  2. Use strong passwords - Minimum 12 characters, mixed case, numbers, symbols
  3. Secure file storage - Files created with 0600 permissions
  4. Air-gapped operations - Use offline for high-value wallets
  5. Backup keystores - Store encrypted backups in multiple locations

Examples

Encrypt a Private Key
result = await encrypt_keystore(
    private_key="0x...",
    password="strong-password-123",
    kdf="scrypt"
)
Decrypt a Keystore
result = await decrypt_keystore(
    keystore=keystore_json,
    password="strong-password-123"
)
Save Keystore File
result = await save_keystore_file(
    keystore=keystore_json,
    directory="./keystores"
)
# Creates: UTC--2024-01-15T10-30-00.000Z--address.json

Testing

pytest tests/ -v

License

MIT License

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.