Skip to main content
Glama
daedalus

mcp-python-bitcoinlib

by daedalus
README.md
# mcp-python-bitcoinlib

> An MCP server that exposes the python-bitcoinlib API

[![PyPI](https://img.shields.io/pypi/v/mcp-python-bitcoinlib.svg)](https://pypi.org/project/mcp-python-bitcoinlib/)
[![Python](https://img.shields.io/pypi/pyversions/mcp-python-bitcoinlib.svg)](https://pypi.org/project/mcp-python-bitcoinlib/)
[![Coverage](https://codecov.io/gh/daedalus/mcp-python-bitcoinlib/branch/main/graph/badge.svg)](https://codecov.io/gh/daedalus/mcp-python-bitcoinlib)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

## Install

```bash
pip install mcp-python-bitcoinlib
```

## Usage

```bash
mcp-python-bitcoinlib
```

## MCP Configuration

mcp-name: io.github.daedalus/mcp-python-bitcoinlib

### For Claude Desktop

Add to your `claude_desktop_config.json`:

```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

```bash
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/
```

TDQS

A3.5/5.0

Scored across 20 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues