Use Fablo with AI Agents

Outline

  1. Install the Fablo Skill
  2. Connect the MCP Server

Install the Fablo Skill

The Fablo skill teaches coding agents such as Claude Code, Cursor, and Codex how to configure, validate, run, and troubleshoot Fablo networks. It also tells them to ask before destructive operations and to keep keys and snapshots private.

Install it with the skills CLI, which detects your agents and adds the skill to each of them:

npx skills add hyperledger-labs/fablo --skill fablo

By default the skill is added to the current project. Add -g to add it for your user instead, or -a <agent> to choose the agent, for example -a claude-code. To update it later, run npx skills update.

The skill is a single file, skills/fablo/SKILL.md. If your agent is not supported by the skills CLI, point the agent at that file.

Connect the MCP Server

fablo mcp lets an agent start and manage a network through MCP tools. Each tool runs one Fablo command. The agent writes the config in the network directory itself, with the help of the Fablo skill above, validates it, and starts the network. Every other Fablo command has a tool too: stopping, resuming, snapshotting, and pruning the network, and managing chaincodes and channels. The server also gives the agent the Fablo skill and the config schema.

It requires Jaiph on the PATH. Install it with curl -fsSL https://jaiph.org/install | bash, and add ~/.local/bin to the PATH if jaiph is still not found. By default the server runs in a temporary directory: fablo mcp unpacks it from the Fablo Docker image for its version, so it always matches the installed script.

The server runs no agent of its own, so it works with any MCP client. The client needs to edit files in the network directory to write the config.

Use one server for each network directory. The directory is required: pass it as an absolute path, because most clients do not set a working directory. Starting a network and building chaincodes can take several minutes, so give the tools a generous timeout.

Claude Code

claude mcp add fablo -- /absolute/path/to/fablo mcp /absolute/path/to/network

Add --scope user to make the server available in every project. Claude Code needs no timeout change: its default tool timeout for stdio servers is about 28 hours.

Cursor

Add the server to .cursor/mcp.json in the project, or to ~/.cursor/mcp.json for all projects:

{
  "mcpServers": {
    "fablo": {
      "command": "/absolute/path/to/fablo",
      "args": ["mcp", "/absolute/path/to/network"]
    }
  }
}

Cursor loads it on the next start. Servers can be toggled under Customize in the sidebar.

Codex

codex mcp add fablo -- /absolute/path/to/fablo mcp /absolute/path/to/network

Or add it to ~/.codex/config.toml. The timeouts are in seconds; the defaults are too short for network_up:

[mcp_servers.fablo]
command = "/absolute/path/to/fablo"
args = ["mcp", "/absolute/path/to/network"]
startup_timeout_sec = 120
tool_timeout_sec = 900

For the tools and the safety model, see the MCP server documentation.