brontes
brontes (Greek: thunder). In myth, the Cyclops smith who forged Zeus's thunderbolts. This crate will forge clap CLIs into MCP servers.
A Rust library for transforming clap CLIs into MCP servers, inspired by njayp/ophis.
Quick start
Two lines mount and dispatch the mcp subtree on any existing clap CLI:
use Command;
async
For tiny CLIs whose only purpose is the MCP server, collapse the ceremony
into one line with brontes::run:
use Command;
async
Public surface
-
brontes::command(cfg)/brontes::handle(matches, cli, cfg)/brontes::run(cli, cfg)— mount, dispatch, and one-shot runners for themcpsubtree (mcp startfor stdio,mcp stream --host <H> --port <P>for streamable HTTP,mcp toolsto export the tool list,mcp claude {enable,disable,list}to manage Claude Desktop's MCP server config, andmcp cursor {enable,disable,list}with--workspaceto manage Cursor's user or workspacemcp.json).mcp streamflags:Flag Default Notes --host <HOST>0.0.0.0(bind-all)Bind address --port <PORT>8080TCP port --log-level <LEVEL>infotrace / debug / info / warn / error --allow-host <HOST>(none) Append to rmcp's DNS-rebind allow-list (repeatable) rmcp's DNS-rebind guard defaults to allowing only
localhost,127.0.0.1, and::1. Requests from any otherHost:header get a silent 403. For LAN or public exposure, add each reachable hostname: -
brontes::generate_tools(root, cfg) -> Result<Vec<rmcp::model::Tool>>— offline tool-list builder for consumers that wire their own server. -
brontes::Config— fluent builder for tool-name prefix, selectors, default env, annotations, deprecated commands, per-flag schema overrides, log level, and MCPImplementationidentity. -
brontes::Selector+brontes::selectors::{allow_cmds, exclude_cmds, allow_cmds_containing, exclude_cmds_containing, allow_flags, exclude_flags, no_flags}— built-in matcher factories. -
brontes::ToolAnnotations— typed mirror of rmcp's annotation surface. -
brontes::ToolInput/brontes::ToolOutput— the MCP tool-call payload shapes. -
brontes::SchemaType— coarse type classifier for per-flag overrides. -
brontes::Error/brontes::Result— error surface.
use ;
use ;
Releasing an MCP server built with brontes
If you are shipping a CLI that mounts brontes::command and want the
resulting MCP server to land on the public
MCP registry, brontes' own
.anodizer.yaml carries an annotated mcp: block
showing every field — registry name, package shape, transport,
auth method — that
anodizer needs to publish your
release end-to-end. The block is commented out in this repo because
brontes itself is a library, not a runnable server; copy it into your
own consumer's .anodizer.yaml, uncomment, and fill in your values.
Repository
https://github.com/tj-smith47/brontes
Contributing
See CONTRIBUTING.md for development setup, the local CI workflow, MSRV policy, and pull-request expectations.
License
MIT. See LICENSE.