- Home
- MCP servers
- Hyperledger Fabric Agent Suite
Hyperledger Fabric Agent Suite
- go
1
GitHub Stars
go
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can deploy and automate Hyperledger Fabric test networks with a compact MCP server stack that exposes a Go REST API for network and chaincode operations and a Python MCP tool for automation. This setup lets you manage the Fabric lifecycle, deploy and query chaincode, and integrate with MCP clients in a streamlined way.
How to use
You start the Go REST API (hlf-controller) to manage your Fabric network. Run it locally to expose an HTTP API at a base URL (default http://localhost:8081). Use the Python MCP tool (hlf-mcp) to automate tasks, script interactions, and integrate with external agents.
How to install
# Prerequisites
# - Go 1.18+
# - Python 3.9+
# - pip for Python dependencies
# 1. Clone the repo
git clone <your-repo-url>
cd <repo-root>
# 2. Set up and run hlf-controller (Go REST API)
cd hlf-controller
go run main.go
# API will be available at http://localhost:8081
# 3. Set up hlf-mcp (Python MCP Tool)
cd ../hlf-mcp
pip install httpx
# (Optional) Install any other agent/MCP dependencies
Configuration and runtime notes
Configure the controller via the hlf-controller/config.yaml file to define your network topology, including peer/orderer details, certificate paths, and timeouts.
Environment and runtime options
Environment variables you can set for flexibility:
- HLF_CONFIG_PATH: Path to a custom config.yaml for the controller.
- HLF_NETWORK_SCRIPT_PATH: Overrides the Fabric network.sh path. If not set, the path from config.yaml is used, defaulting to ~/fabric-samples/test-network/network.sh.
- HLF_API_BASE: Base URL for the hlf-controller API (used by hlf-mcp), defaults to http://localhost:8081.
Integration with MCP clients
You can integrate the MCP server with MCP clients like Cursor and Claude Desktop by pointing them at the hlf-controller API. Use the provided HTTP endpoint to drive network operations and chaincode lifecycle from your automation scripts.
Example workflow you can perform with MCP
Start the controller, then use the MCP tool to bring up the network, deploy chaincode, and perform queries or invokes through the API. Your workflow can be scripted to run in sequence, enabling automated Fabric lifecycles from a single control point.
Troubleshooting tips
If the API is not reachable at http://localhost:8081, check that the Go process started without errors and that port 8081 is not blocked by a firewall. Review the controller’s logs for bootstrap messages about fabric-samples download or initialization steps.
Notes and caveats
The controller handles prerequisites on first run by downloading necessary Fabric binaries and samples. Ensure your environment has network access for that initial setup. The MCP tool is designed to integrate with external agents and can be extended for additional automation scenarios.
Available tools
hlf_controller_api
REST API exposed by the hlf-controller for managing Fabric networks, channels, and chaincode lifecycle.
hlf_mcp_tool
Python MCP tool that enables automation and agent integration with the Hyperledger Fabric setup.