
Bitcoin-MCP
Un servidor MCP de bitcoin
1
Github Watches
0
Github Forks
0
Github Stars
Bitcoin MCP Server
A Go-based service that provides a unified interface to interact with a Bitcoin node through various RPC commands using the Model Context Protocol (MCP). The server organizes Bitcoin RPC functionality into logical categories and provides a clean, well-documented API for accessing blockchain data and operations.
Features
- Comprehensive Bitcoin RPC interface using Model Context Protocol
- Organized by functional categories:
- Blockchain operations
- Mempool operations
- UTXO operations
- Blockchain management
- Secure authentication
- Comprehensive error handling
- Clean and documented API
Prerequisites
- Go 1.24 or later
- Bitcoin Core node with RPC enabled
- Basic understanding of Bitcoin RPC commands
Installation
- Clone the repository:
git clone https://github.com/moncho/bitcoin-mcp.git
cd bitcoin-mcp
- Install dependencies:
go mod download
- Build the server:
go build -o bitcoin-mcp
Configuration
Create a configuration file (config.json
) with the following structure:
{
"bitcoin": {
"rpc_url": "http://localhost:8332",
"username": "your_rpc_username",
"password": "your_rpc_password"
},
"server": {
"port": 8080,
"host": "localhost"
}
}
Running the Server
- Start your Bitcoin Core node with RPC enabled:
bitcoind -server -rpcuser=your_rpc_username -rpcpassword=your_rpc_password
- Start the MCP server:
./bitcoin-mcp -config config.json
Or using environment variables:
BITCOIN_RPC_URL=http://localhost:8332 \
BITCOIN_RPC_USER=your_rpc_username \
BITCOIN_RPC_PASS=your_rpc_password \
./bitcoin-mcp
API Usage
The server provides a RESTful API for accessing Bitcoin RPC commands. Here are some examples:
Get Blockchain Information
curl -X POST http://localhost:8080/api/v1/blockchain/info
Get Block Data
curl -X POST http://localhost:8080/api/v1/blockchain/block \
-H "Content-Type: application/json" \
-d '{"blockhash": "0000000000000000000123456789abcdef", "verbose": true}'
Get Mempool Information
curl -X POST http://localhost:8080/api/v1/mempool/info
Development
Project Structure
bitcoin-mcp/
├── cmd/
│ └── server/ # Main server application
├── pkg/
│ ├── bitcoin/ # Bitcoin RPC client
│ └── tools/ # RPC command implementations
├── config.json # Configuration file
└── README.md # This file
Adding New RPC Commands
- Add the method to the Bitcoin client in
pkg/bitcoin/client.go
- Create or update the corresponding tool in
pkg/tools/
- Register the tool in the appropriate category
- Add tests for the new functionality
Testing
Run the test suite:
go test ./...
Security Considerations
- Never expose RPC credentials in public repositories
- Use secure passwords for RPC access
- Consider rate limiting for public APIs
- Validate all input parameters
- Sanitize error messages
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Please follow the Contributing Guidelines when submitting changes.
Documentation
For detailed API documentation and specifications, see:
License
[Specify License Information]
Support
For support, please:
- Check the documentation
- Search existing issues
- Create a new issue if needed
Acknowledgments
- Bitcoin Core developers
- Go community
- All contributors to this project
相关推荐
I find academic articles and books for research and literature reviews.
Confidential guide on numerology and astrology, based of GG33 Public information
Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.
Advanced software engineer GPT that excels through nailing the basics.
Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.
Converts Figma frames into front-end code for various mobile frameworks.
Take an adjectivised noun, and create images making it progressively more adjective!
Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.
La aplicación AI de escritorio todo en uno y Docker con trapo incorporado, agentes de IA, creador de agentes sin código, compatibilidad de MCP y más.
Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx
Plataforma de automatización de flujo de trabajo de código justo con capacidades de IA nativas. Combine el edificio visual con código personalizado, auto-anfitrión o nube, más de 400 integraciones.
🧑🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.
Una lista curada de servidores de protocolo de contexto del modelo (MCP)
Reviews

user_QFzzMMU7
As a dedicated user of bitcoin-mcp, I find it incredibly practical for managing Bitcoin nodes. Created by moncho, this tool written in [language] simplifies node interaction remarkably. Its intuitive interface and comprehensive functionality make monitoring and controlling Bitcoin operations seamless. Highly recommend this for anyone in the crypto space! Check it out at https://github.com/moncho/bitcoin-mcp.