What is Bitcoin SV MCP Server?
Bitcoin SV MCP Server is a collection of tools designed for interacting with the Bitcoin SV blockchain using the Model Context Protocol (MCP). It provides functionalities for wallet operations, ordinals, and various utility functions to facilitate blockchain interactions.
How to use Bitcoin SV MCP Server?
To use the server, install it globally using bun install -g bsv-mcp
, then start the server with bunx bsv-mcp
. Connect it to MCP-compatible clients like Cursor or Claude for Desktop by configuring the necessary settings with your private key.
Key features of Bitcoin SV MCP Server?
- Wallet tools for managing BSV transactions and addresses.
- Ordinals tools for working with NFTs on the BSV blockchain.
- Utility functions for data conversion and blockchain interaction.
- Integration with AI assistants through the Model Context Protocol.
Use cases of Bitcoin SV MCP Server?
- Managing Bitcoin SV wallets and transactions.
- Interacting with NFTs on the BSV blockchain.
- Using AI assistants to perform blockchain operations through natural language commands.
FAQ from Bitcoin SV MCP Server?
- Is this project stable?
No, it is currently in an experimental stage and features may change.
- How do I connect to the server?
Follow the installation and configuration instructions provided in the documentation for your specific MCP client.
- What programming language is used?
The project is developed in TypeScript.
Bitcoin SV MCP Server
⚠️ NOTICE: Experimental Work in Progress
This project is in an early experimental stage. Features may change, and the API is not yet stable. Contributions, feedback, and bug reports are welcome! Feel free to open issues or submit pull requests.
A collection of Bitcoin SV (BSV) tools for the Model Context Protocol (MCP) framework. This library provides wallet, ordinals, and utility functions for BSV blockchain interaction.
Installation
To install dependencies:
bun install
For global installation (recommended for MCP client integration):
# Install globally with bun
bun install -g bsv-mcp
# Or with npm
npm install -g bsv-mcp
External Dependencies
For full functionality of all tools, the following additional dependencies are installed:
# For ordinal listing purchase functionality
js-1sat-ord
Running the Server
Start the MCP server:
# If installed locally
bun run index.ts
# If installed globally
bunx bsv-mcp
Connecting to MCP Clients
This server implements the Model Context Protocol (MCP), allowing AI assistants to utilize Bitcoin SV functionalities. You can connect this server to various MCP-compatible clients.
Cursor
To use the BSV MCP server with Cursor:
- Install Cursor if you haven't already
- Install this package globally:
bun install -g bsv-mcp
- Open Cursor and navigate to Settings → Extensions → Model Context Protocol
- Click "Add a new global MCP server"
- Enter the following configuration in JSON format:
{
"Bitcoin SV": {
"command": "env",
"args": [
"PRIVATE_KEY_WIF=<your_private_key_wif>",
"bunx",
"bsv-mcp"
]
}
}
- Replace
<your_private_key_wif>
with your actual private key WIF (keep this secure!) - Click "Save"
The BSV tools will now be available to Cursor's AI assistant under the "Bitcoin SV" namespace.
Claude for Desktop
To connect this server to Claude for Desktop:
- Ensure you have Claude for Desktop installed and updated to the latest version
- Install this package globally:
bun install -g bsv-mcp
- Open your Claude for Desktop configuration file:
# macOS/Linux code ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows code %APPDATA%\Claude\claude_desktop_config.json
- Add the BSV MCP server to your configuration (create the file if it doesn't exist):
{ "mcpServers": { "Bitcoin SV": { "command": "env", "args": [ "PRIVATE_KEY_WIF=<your_private_key_wif>", "bunx", "bsv-mcp" ] } } }
- Replace
<your_private_key_wif>
with your actual private key WIF - Save the file and restart Claude for Desktop
- The BSV tools will appear when you click the tools icon (hammer) in Claude for Desktop
Generic MCP Client Integration
For other MCP clients that support JSON configuration:
{
"Bitcoin SV": {
"command": "env",
"args": [
"PRIVATE_KEY_WIF=<your_private_key_wif>",
"bunx",
"bsv-mcp"
]
}
}
If running the server directly:
# Set environment variable first
export PRIVATE_KEY_WIF=<your_private_key_wif>
# Then run the server
bunx bsv-mcp
Available Tools
The toolkit is organized into several categories:
Wallet Tools
Wallet tools provide core BSV wallet functionality:
Tool Name | Description |
---|---|
wallet_getPublicKey | Retrieves a public key for a specified protocol and key ID |
wallet_createSignature | Creates a cryptographic signature for the provided data |
wallet_verifySignature | Verifies a cryptographic signature against the provided data |
wallet_encrypt | Encrypts data using a specified protocol and key |
wallet_decrypt | Decrypts data using a specified protocol and key |
wallet_getAddress | Returns a BSV address for the current wallet or a derived path |
wallet_sendToAddress | Sends BSV to a specified address (supports BSV or USD amounts) |
wallet_purchaseListing | Purchases an NFT from a marketplace listing |
BSV Tools
Tools for interacting with the BSV blockchain and network:
Tool Name | Description |
---|---|
bsv_getPrice | Gets the current BSV price from an exchange API |
bsv_decodeTransaction | Decodes a BSV transaction and returns detailed information |
Ordinals Tools
Tools for working with ordinals (NFTs) on BSV:
Tool Name | Description |
---|---|
ordinals_getInscription | Retrieves detailed information about a specific inscription |
ordinals_searchInscriptions | Searches for inscriptions based on various criteria |
ordinals_marketListings | Retrieves current marketplace listings for inscriptions |
ordinals_bsv20MarketSales | Gets information about BSV20 token market sales |
ordinals_getBsv20ById | Retrieves details about a specific BSV20 token by ID |
Utility Tools
General-purpose utility functions:
Tool Name | Description |
---|---|
utils_convertData | Converts data between different encodings (utf8, hex, base64, binary) |
Using the Tools with MCP
Once connected, you can use natural language to interact with Bitcoin SV through your AI assistant. Here are some example prompts:
Wallet Operations
- "Get my Bitcoin SV address"
- "Send 0.01 BSV to 1ExampleBsvAddressXXXXXXXXXXXXXXXXX"
- "Send $5 USD worth of BSV to 1ExampleBsvAddressXXXXXXXXXXXXXXXXX"
Ordinals (NFTs)
- "Show me information about the NFT with outpoint 6a89047af2cfac96da17d51ae8eb62c5f1d982be2bc4ba0d0cd2084b7ffed325_0"
- "Search for Pixel Zoide NFTs"
- "Show me the current marketplace listings for BSV NFTs"
Blockchain Operations
- "What is the current BSV price?"
- "Decode this BSV transaction: (transaction hex or ID)"
Data Conversion
- "Convert 'Hello World' from UTF-8 to hex format"
How MCP Works
When you interact with an MCP-enabled AI assistant:
- The AI analyzes your request and decides which tools to use
- With your approval, it calls the appropriate BSV MCP tool
- The server executes the requested operation on the Bitcoin SV blockchain
- The results are returned to the AI assistant
- The assistant presents the information in a natural, conversational way
Troubleshooting
If you're having issues connecting to the server:
- Ensure the package is properly installed:
bun install -g bsv-mcp
- Verify your WIF private key is correctly set in the environment
- Check that your client supports MCP and is properly configured
- Look for error messages in the client's console output
For Claude for Desktop, check the logs at:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
For Cursor, check the Cursor MCP logs in Settings → Extensions → Model Context Protocol.
Development
This project was created using bun init
in bun v1.2.9. Bun is a fast all-in-one JavaScript runtime.
Package Configuration
To ensure the package can be run with bunx bsv-mcp
, make sure your package.json
includes:
{
"name": "bsv-mcp",
"bin": {
"bsv-mcp": "./index.ts"
},
"type": "module"
// ...other configuration
}
Running Tests
bun test
License
This project is licensed under the MIT License - see the LICENSE file for details.