FaustoS88/Mini-Blockchain
If you are the rightful owner of Mini-Blockchain and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This repository contains a simple blockchain demonstration implemented in Rust, integrating an MCP server to expose blockchain functionalities over a network.
The Blockchain CLI in Rust is a minimal command-line application that demonstrates core Rust principles through a basic blockchain implementation. Each block in the blockchain includes an index, timestamp, user-supplied data, previous hash, and current hash. The application features a menu-driven CLI that allows users to add new blocks, print the current blockchain, and validate the blockchain's integrity. The project also integrates an MCP server that runs concurrently with the CLI, enabling external clients to interact with the blockchain using JSON commands over a network.
Features
- Basic blockchain implementation with essential block components.
- Menu-driven CLI for user interaction.
- Blockchain integrity validation.
- Concurrent MCP server for network interaction.
- JSON-based communication for MCP commands.
Usages
usage with local integration stdio
python mcp.run(transport='stdio') # Tools defined via @mcp.tool() decorator
usage with remote integration sse
python mcp.run(transport='sse', host="0.0.0.0", port=8000) # Specify SSE endpoint
usage with remote integration streamable http
yaml paths: /mcp: post: x-ms-agentic-protocol: mcp-streamable-1.0 # Copilot Studio integration
usage with platform ecosystem integration github
{"command": "docker", "args": ["run", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server"]}
usage with development frameworks fastmcp
python from mcp.server import FastMCP app = FastMCP('demo') @app.tool() async def query(): ...