Bitcoin SV MCP Server

Bitcoin SV MCP Server

A collection of Bitcoin SV tools for the Model Context Protocol that enables AI assistants to interact with the BSV blockchain through wallet operations, ordinals (NFTs), and various blockchain utilities.

Category
访问服务器

README

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:

  1. Install Cursor if you haven't already
  2. Install this package globally: bun install -g bsv-mcp
  3. Open Cursor and navigate to Settings → Extensions → Model Context Protocol
  4. Click "Add a new global MCP server"
  5. Enter the following configuration in JSON format:
{
  "Bitcoin SV": {
    "command": "env",
    "args": [
      "PRIVATE_KEY_WIF=<your_private_key_wif>",
      "bunx",
      "bsv-mcp"
    ]
  }
}
  1. Replace <your_private_key_wif> with your actual private key WIF (keep this secure!)
  2. 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:

  1. Ensure you have Claude for Desktop installed and updated to the latest version
  2. Install this package globally: bun install -g bsv-mcp
  3. 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
    
  4. 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"
          ]
        }
      }
    }
    
  5. Replace <your_private_key_wif> with your actual private key WIF
  6. Save the file and restart Claude for Desktop
  7. 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:

  1. The AI analyzes your request and decides which tools to use
  2. With your approval, it calls the appropriate BSV MCP tool
  3. The server executes the requested operation on the Bitcoin SV blockchain
  4. The results are returned to the AI assistant
  5. The assistant presents the information in a natural, conversational way

Troubleshooting

If you're having issues connecting to the server:

  1. Ensure the package is properly installed: bun install -g bsv-mcp
  2. Verify your WIF private key is correctly set in the environment
  3. Check that your client supports MCP and is properly configured
  4. 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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选