npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

bitcoinjs-mcp-server

v1.0.6

Published

MCP (Model Context Protocol) server for Bitcoin development using bitcoinjs-lib

Readme

BitcoinJS MCP Server

A Model Context Protocol (MCP) server that provides Bitcoin development tools using the bitcoinjs-lib library. This server enables Claude Code and other MCP clients to perform Bitcoin-related operations like address generation, transaction creation, and script compilation.

Features

  • Address Generation: Generate all types of Bitcoin addresses (P2PKH, P2SH, P2WPKH, P2WSH, P2TR)
  • Transaction Processing: Create, sign, and analyze Bitcoin transactions
  • PSBT Support: Handle Partially Signed Bitcoin Transactions
  • Script Operations: Compile and analyze Bitcoin scripts
  • Network Support: Mainnet, Testnet, and Regtest configurations
  • Validation: Comprehensive input validation and error handling

Installation & Usage

For MCP Clients (Claude Code, etc.)

Step 1: Install globally (Required)

npm install -g bitcoinjs-mcp-server

Step 2: Add to your MCP settings (.claude.json or .mcp.json)

{
  "mcpServers": {
    "bitcoinjs": {
      "command": "bitcoinjs-mcp-server"
    }
  }
}

That's it! The server is now ready for use with your MCP client.

Alternative: Using npx (Auto-install)

Add to your MCP settings:

{
  "mcpServers": {
    "bitcoinjs": {
      "command": "npx",
      "args": ["-y", "bitcoinjs-mcp-server"]
    }
  }
}

Note: This method may have slower startup times as it downloads the package on each use.

git clone https://github.com/Odyssey98/bitcoinjs-mcp-server.git
cd bitcoinjs-mcp-server
npm install && npm run build

Then use:

{
  "mcpServers": {
    "bitcoinjs": {
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "/path/to/bitcoinjs-mcp-server"
    }
  }
}

For Development

# Clone and install
git clone https://github.com/Odyssey98/bitcoinjs-mcp-server.git
cd bitcoinjs-mcp-server
npm install
npm run build

# Start the server
npm start

Available Tools

Address Tools

  • generate_address: Generate Bitcoin addresses of various types
  • validate_address: Validate Bitcoin address format and network
  • decode_address: Decode address to script and other details

Transaction Tools

  • create_transaction: Create new Bitcoin transactions
  • sign_transaction: Sign transactions with private keys
  • decode_transaction: Decode raw transaction hex
  • estimate_tx_size: Estimate transaction size and fees

PSBT Tools

  • create_psbt: Create Partially Signed Bitcoin Transaction
  • update_psbt: Add inputs/outputs to existing PSBT
  • sign_psbt: Sign PSBT with keys
  • finalize_psbt: Finalize and extract transaction

Utility Tools

  • generate_keypair: Generate new key pairs
  • create_multisig: Create multisignature addresses
  • compile_script: Compile Bitcoin scripts
  • hash_message: Hash messages for signing

Example Usage

Once configured in your MCP client, you can use these tools:

  • Generate a new Bitcoin address: "Generate a P2WPKH testnet address"
  • Create a transaction: "Create a transaction sending 0.001 BTC from [address] to [address]"
  • Work with multisig: "Create a 2-of-3 multisig address with these public keys: [...]"
  • Sign transactions: "Sign this transaction hex with the private key"

Development

# Development mode with hot reload
npm run dev

# Run tests
npm test

# Lint code
npm run lint

# Format code
npm run format

License

MIT