mcp-python-bitcoinlib
Provides tools for Bitcoin key management, address generation, transaction building, script operations, and cryptography, interacting with the Bitcoin blockchain via the python-bitcoinlib API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-python-bitcoinlib Generate a new Bitcoin private key in WIF format"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-python-bitcoinlib
An MCP server that exposes the python-bitcoinlib API
Install
pip install mcp-python-bitcoinlibRelated MCP server: Bitcoin-MCP-Server
Usage
mcp-python-bitcoinlibMCP Configuration
mcp-name: io.github.daedalus/mcp-python-bitcoinlib
For Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mcp-python-bitcoinlib": {
"command": "mcp-python-bitcoinlib",
"env": {}
}
}
}Tools
The server exposes the following Bitcoin tools:
Key Management: Generate private keys, convert between WIF and hex
Address Generation: P2PKH, P2SH, P2WPKH, P2WSH addresses
Transaction Building: Create and sign transactions
Script Operations: Parse and create Bitcoin scripts
Cryptography: SHA256, RIPEMD160, Hash160, Hash256, ECDSA signing/verification
Development
git clone https://github.com/daedalus/mcp-python-bitcoinlib.git
cd mcp-python-bitcoinlib
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mcp-python-bitcoinlib src/Available Tools
20 toolsaddress_to_scriptC
Get the script from an address.
Inputs: address (required). Returns: result
create_p2pkh_scriptB
Create a P2PKH script from a public key hash.
Inputs: pubkey_hash (required). Returns: result
create_p2wpkh_scriptB
Create a P2WPKH script from a public key hash.
Inputs: pubkey_hash (required). Returns: result
create_transactionB
Create an unsigned Bitcoin transaction.
Inputs: outputs (required), fee, version. Returns: object
generate_private_keyA
Generate a random private key and return it as a 32-byte hex string.
Inputs: no named parameters. Returns: result
hash160_hexA
Compute Hash160 (SHA256 then RIPEMD160).
Inputs: data (required). Returns: result
hash256_hexB
Compute double SHA256.
Inputs: data (required). Returns: result
parse_scriptA
Parse a script into its opcodes.
Inputs: script_hex (required). Returns: result
privkey_to_pubkeyB
Get the public key from a private key.
Inputs: privkey (required), compressed. Returns: result
privkey_to_wifB
Convert a private key (hex) to WIF format.
Inputs: privkey (required), compressed. Returns: result
pubkey_to_addressC
Convert a public key to an address.
Inputs: pubkey (required), address_type. Returns: result
pubkey_to_p2sh_p2wpkh_redeemscriptC
Get the P2SH-P2WPKH redeemScript for a public key.
Inputs: pubkey (required). Returns: result
ripemd160_hexA
Compute RIPEMD160 hash.
Inputs: data (required). Returns: result
serialize_transactionC
Serialize and deserialize a transaction.
Inputs: tx_hex (required). Returns: object
sha256_hexC
Compute SHA256 hash.
Inputs: data (required). Returns: result
sign_messageC
Sign a message with a private key.
Inputs: message (required), privkey (required). Returns: result
sign_transactionC
Sign a transaction input with a private key.
Inputs: tx_hex (required), privkey (required), sighash_type. Returns: result
validate_addressB
Validate a Bitcoin address for a given network.
Inputs: address (required), network. Returns: object
verify_signatureB
Verify an ECDSA signature.
Inputs: signature (required), pubkey (required), message (required). Returns: result
wif_to_privkeyA
Convert a WIF-encoded private key back to hex.
Inputs: wif (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Each tool has a clearly distinct purpose: hashing functions target specific algorithms, key operations are separated, address and script creation focus on different types, and transaction operations are distinct from signing. No two tools overlap in functionality.
All tools use consistent snake_case naming with a verb-noun pattern (e.g., create_p2pkh_script, sign_transaction). Hash functions follow a uniform 'algorithm_hex' pattern. No mixing of conventions or ambiguous names.
With 20 tools, the server covers essential Bitcoin operations without being bloated. Each tool serves a specific need, from key generation and address conversion to transaction creation and signing. The count is appropriate for a comprehensive Bitcoin library.
The tool set covers major Bitcoin workflows: key management, address generation (P2PKH, P2WPKH, P2SH-P2WPKH), transaction creation and signing, message signing, hashing, and validation. Minor gaps like explicit bech32 address or multisig script creation are absent but non-critical for most use cases.
Maintenance
Related MCP Connectors
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
MCP server for developer documentation, generated by doc2mcp.
MCP server for developers documentation, generated by doc2mcp.
MCP server for doc2mcp documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseBqualityDmaintenanceA comprehensive Model Context Protocol (MCP) server for BTCPayServer integration, providing tools for payment processing, store management, user administration, webhook handling and more with full API coverage.327 npm3MIT
- AlicenseAqualityDmaintenanceThe first MCP Server dedicated to Bitcoin ecosystem236MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for Bitcoin block explorer and mempool/fee statistics, providing tools to query fees, mempool stats, blocks, transactions, addresses, hashrate, and mining pools.300 npmMIT
- FlicenseNot gradedqualityCmaintenanceA Python-based MCP server that provides mathematical tools like addition and random number generation, plus server metadata.-