Skip to main content

Installation

Bitcoin MCP Server can be installed and run in multiple ways. Choose the method that best fits your needs.

The simplest way to run Bitcoin MCP Server is using npx:

npx -y bitcoin-mcp@latest

This command will automatically download and run the latest version of the server.

Global Installation

If you prefer to install the package globally:

npm install -g bitcoin-mcp

After installation, you can run the server using:

bitcoin-mcp

Local Development Installation

For development or contributing to the project:

  1. Clone the repository:
git clone https://github.com/AbdelStark/bitcoin-mcp
cd bitcoin-mcp
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Start the server:
npm start

Configuration

  1. Copy the example environment file:
cp .env.example .env
  1. Configure the following environment variables:
LOG_LEVEL=info
BITCOIN_NETWORK=mainnet
SERVER_MODE=stdio
PORT=3000

Environment Variables

VariableDescriptionDefault
LOG_LEVELLogging verbosity (debug/info/warn/error)info
BITCOIN_NETWORKBitcoin network (mainnet/testnet)mainnet
SERVER_MODEServer transport mode (stdio/sse)stdio
PORTPort for SSE mode3000

Verifying Installation

To verify your installation is working correctly:

  1. Start the server in STDIO mode:
bitcoin-mcp
  1. The server should start without errors and be ready to accept commands.

  2. Test a basic command (in another terminal):

echo '{"jsonrpc":"2.0","method":"get_latest_block","params":{},"id":1}' | nc localhost 3000

You should receive a JSON response with the latest block information.