Repo of the Day
Bruce-Hopkins/Leafi
Published: Nov 27, 2026
Open repository ↗Contribute to Bruce-Hopkins/Leafi development by creating an account on GitHub.
Summary
Leafi is a TypeScript project that provides an MCP server for running multi-step automations built from linked LLM agents. Your agent designs a flow, saves it, and can reuse it later instead of rebuilding the same chain of steps in every prompt. It installs into Hermes, Claude Code, Cursor, Pi, or any other MCP client as a single-file server, and the repository is MIT licensed.
What it is useful for
The README positions leafi for "precise, efficient, multi-step automations" where a flow is designed once and then invoked reliably. A concrete example from the docs asks the agent to "find this month's most-cited arXiv papers on small code models and brief me on them in a few paragraphs. You may use web, not bash." That last sentence matters: the prompt declares which tools the flow may use, so you can constrain an automation to have web access without letting it run shell commands.
It suits recurring research-and-summarise tasks, and any workflow where the sequence of agent steps is worth keeping rather than re-describing each session. Because the agent shows you the flow it built and asks for permission before running it, the automation is reviewable before it does anything.
Limitations worth knowing: the README calls leafi a prototype and says updates are coming soon. Setup requires Node.js 22 or newer. For a generic MCP client, you must download the server file yourself and paste the printed mcpServers entry into your client configuration, using .env.example to fill in settings by hand.
How engineers can use it
On macOS, Linux, or WSL2, with Hermes, Claude Code, or Cursor:
curl -fsSL https://raw.githubusercontent.com/Bruce-Hopkins/leafi/main/install.sh | sh
On Windows, in PowerShell:
irm https://raw.githubusercontent.com/Bruce-Hopkins/leafi/main/install.ps1 | iex
Pi installs leafi as an extension package rather than through the installer:
pi install npm:pi-leafi
node ~/.pi/agent/npm/node_modules/pi-leafi/dist/server.mjs init
For a manual Hermes install on macOS and Linux:
hermes plugins install Bruce-Hopkins/leafi/hermes-plugin --enable
node ~/.hermes/plugins/leafi/dist/server.mjs init
On Windows, the second command uses "$env:LOCALAPPDATA\hermes\plugins\leafi\dist\server.mjs". For another MCP client, download the single-file server to ~/.leafi/server.mjs and run node ~/.leafi/server.mjs init.
init is the installer's setup checklist, and it ends by printing the entry to paste into your client's mcpServers. Settings can also be edited by hand from .env.example. Afterwards, leafi settings (or node <server> settings for manual installs) changes configuration, and you drive flows by prompting your agent to build and run an automation.