Skip to main content
Glama
mcp-server-hyperledger-fabric

mcp-server-hyperledger-fabric

by rene-dekart

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FABRIC_KEYYesPath to the private key (PEM).
FABRIC_TLSNoUse TLS. Set to false only for local/dev test-network use.true
FABRIC_CERTYesPath to the enrollment signcert (PEM).
FABRIC_MSP_IDYesMSP ID of the identity.
FABRIC_CHANNELNoDefault channel named in the server instructions sent to the client.
FABRIC_REST_URLNoGateway REST API base URL, used for get_blockchain_info.
FABRIC_READ_ONLYNoRegister only read tools; invoke_chaincode and endorse_chaincode are not exposed.false
REQUEST_TIMEOUT_MSNoDeadline for each network call in milliseconds.30000
FABRIC_CHAINCODE_APINoChaincode API descriptions file or directory generated by mcp-server-hyperledger-fabric scan../chaincode-api
FABRIC_LOG_TRANSIENTNoLog transientData values in full. Default logs only keys, byte sizes, and a short hash.false
FABRIC_PEER_ENDPOINTYesgRPC endpoint of the gateway peer, in host:port format.
FABRIC_PEER_TLS_CERTNoPath to the peer's TLS CA cert (PEM). Required when TLS is enabled, which is the default.
FABRIC_DEDUP_WINDOW_MSNoDedup window for invoke_chaincode in milliseconds. 0 disables deduplication.0
FABRIC_PEER_TLS_SERVER_NAMENoOverride TLS server name, for example when using an SSH tunnel.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Hyperledger Fabric gateway server for peer peer0.org1.example.com:7051, MSP Org1MSP. Channel is a required argument of every ledger tool; use the one the user names. Read with query_chaincode. Write with invoke_chaincode (returns txid and commit status); endorse_chaincode dry-runs a write without committing. After an invoke commit-status timeout the transaction may still have committed: check get_transaction before retrying.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
resources
{
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
query_chaincodeA

Evaluate a chaincode read function on Hyperledger Fabric and return its result. Use for reads, never for state changes.

invoke_chaincodeA

Submit a chaincode transaction that changes state. Returns transaction ID and commit status. Use only when a state change is intended. A commit-status timeout does NOT mean the transaction failed — it may still commit; check get_transaction before retrying.

get_blockA

Read a block from the Fabric ledger by block number and return a summary (number, hashes, transactions).

get_blockchain_infoA

Read ledger height and hashes for a channel via the Fabric Gateway REST API. Requires FABRIC_REST_URL.

get_chaincode_eventsB

Read recent chaincode events from the Fabric ledger (event name, transaction, block, payload).

get_transactionA

Find a transaction by its ID by scanning blocks forward from startBlock. Returns the block summary containing the transaction.

get_block_by_hashA

Find a block by its data hash by scanning blocks forward from startBlock. Returns the block summary.

endorse_chaincodeA

Validate a chaincode transaction by endorsing it without submitting to the orderer. Nothing is committed. Use to check a write will pass before invoking.

check_network_statusA

Check peer health: ledger height, last block, response latency. Use before a series of calls to confirm the peer is reachable.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 9 tools

Disambiguation4/5

Most tools have clearly distinct purposes: read chaincode, invoke, endorse, block/transaction lookup, and event retrieval are well separated. The main overlap is between get_blockchain_info and check_network_status, both of which report ledger height/status, though one is channel-level info and the other is peer health.

Naming Consistency5/5

All tool names use consistent snake_case with a verb_noun pattern such as get_block, query_chaincode, invoke_chaincode, and check_network_status. The convention is predictable throughout.

Tool Count5/5

Nine tools is well-scoped for a Hyperledger Fabric gateway server, covering reads, writes, endorsement, events, transactions, blocks, and health checks without excessive surface area.

Completeness4/5

The set covers core ledger and chaincode operations including reads, state-changing invokes, endorsement checks, transaction lookup, block lookup, and events. Minor gaps exist around chaincode metadata, channel listing, or richer event filtering, but the main workflows are supported.

Maintenance

ActivityMaintained
ResponsivenessOutdated data