Blockchain CLI in Rust
A simple blockchain implementation in Rust featuring SHA-256 hashing, CLI interface, and MCP server integration. Demonstrates core blockchain concepts through block creation and chain validation while exposing blockchain functionalities over a network.
Overview
Mini-Blockchain is a simple blockchain implementation in Rust that demonstrates core blockchain concepts through block creation and chain validation, featuring a command-line interface (CLI) and MCP server integration.
To use Mini-Blockchain, clone the repository, navigate to the project folder, and run the application using Cargo. The CLI will provide options to add blocks, print the blockchain, and validate its integrity.
- Basic blockchain implementation with SHA-256 hashing. - Menu-driven CLI for user interaction. - MCP server integration for external access to blockchain functionalities.
- Learning and demonstrating blockchain principles.
- Testing blockchain functionalities in a controlled environment.
- Integrating with other applications via the MCP server.
Add to your AI client
Use these steps to connect Blockchain CLI in Rust in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mini-blockchain-faustos88": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mini-blockchain-faustos88"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mini-blockchain-faustos88": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mini-blockchain-faustos88"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mini-blockchain-faustos88": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mini-blockchain-faustos88"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mini-blockchain-faustos88": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mini-blockchain-faustos88"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mini-blockchain-faustos88": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mini-blockchain-faustos88"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mini-blockchain-faustos88": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mini-blockchain-faustos88"
]
}
}
}FAQ
What programming language is used for Mini-Blockchain?
Mini-Blockchain is implemented in Rust, focusing on safety and performance.
How can I run the MCP server?
The MCP server runs concurrently with the CLI and listens on 127.0.0.1:7878 for external commands.
Can I add multiple blocks?
Yes! You can add as many blocks as you want using the CLI options.