Installation
Bitcoin MCP Server can be installed and run in multiple ways. Choose the method that best fits your needs.
NPX (Recommended)
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:
- Clone the repository:
git clone https://github.com/AbdelStark/bitcoin-mcp
cd bitcoin-mcp
- Install dependencies:
npm install
- Build the project:
npm run build
- Start the server:
npm start
Configuration
- Copy the example environment file:
cp .env.example .env
- Configure the following environment variables:
LOG_LEVEL=info
BITCOIN_NETWORK=mainnet
SERVER_MODE=stdio
PORT=3000
Environment Variables
Variable | Description | Default |
---|---|---|
LOG_LEVEL | Logging verbosity (debug/info/warn/error) | info |
BITCOIN_NETWORK | Bitcoin network (mainnet/testnet) | mainnet |
SERVER_MODE | Server transport mode (stdio/sse) | stdio |
PORT | Port for SSE mode | 3000 |
Verifying Installation
To verify your installation is working correctly:
- Start the server in STDIO mode:
bitcoin-mcp
-
The server should start without errors and be ready to accept commands.
-
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.