All plugins

mariadb-guard

Companion to mariadb-dev; install it together with mariadb-dev, whose MCP server it redirects to. A pre_tool_call hook that blocks the agent from running the mariadb/mysql command-line clients (and similar) for what the mariadb MCP tools do, so no database password reaches a command line, plus a short system-prompt rule saying so. Pure Python, no dependencies, no network calls, no file access. Setting MARIADB_PLUGIN_ALLOW_CLI=1 disables it.

MariaDB2Toolsv26.11.0Updated 5 days ago

About

Companion to mariadb-dev; install it together with mariadb-dev, whose MCP server it redirects to. A pre_tool_call hook that blocks the agent from running the mariadb/mysql command-line clients (and similar) for what the mariadb MCP tools do, so no database password reaches a command line, plus a short system-prompt rule saying so. Pure Python, no dependencies, no network calls, no file access. Setting MARIADB_PLUGIN_ALLOW_CLI=1 disables it.

MariaDB guard plugin for Hermes Agent

Version 26.11.0

A companion to the mariadb-dev and
mariadb-sql plugins. It stops the agent from using
the MariaDB and MySQL command-line clients for what the mariadb MCP server's
tools do, so that work goes through the MCP server.

Why

A command-line client run from the agent's terminal needs the password on its
command line (-p<password>) or in its environment. From there it reaches the
process list, logs, and the conversation the model provider sees. A connection
opened through the MCP server reads its password from the operating system's
secret store, so the agent never sees a password at all.

To give the agent a server, configure it in the MCP server yourself, either
interactively with mariadb-shell -- mcp setup or with its
command-line options.
For a local test server, the agent deploys a sandbox with a random root password
it generates; the password is stored with the sandbox's connection.

What it does

It looks at only five clients, and each only where an MCP tool does the job:

ClientBlocked whenUse instead
mariadb, mysqlit runs SQLdb.execute_sql, db.execute_sql_script
mariadb-shell, mysqlshit runs SQL (SQL mode)db.execute_sql, db.execute_sql_script
mariadb-shell, mysqlshit calls -- <object> <method> that a tool wraps, such as -- util dump-schemasthe matching tool, here util.dump_schemas
mariadb-dumpits output is piped into another clientutil.copy_instance, util.copy_schemas, util.copy_tables
  • A blocked terminal call gets an explanation naming the tool to use instead.
    A client is caught behind a path, env, a pipe, &&, sh -c "..." or
    $(...).
  • Everything else runs: --version and --help, Python or JavaScript mode, a
    dump written to a file, mariadb-shell -- mcp setup, an API call no tool
    wraps, and every other client. The agent keeps the features the MCP tools do
    not have yet.
  • A system-prompt section says the same before the first tool call.

Installation

Hermes runs hooks only from a Python plugin, and a Python plugin cannot also
carry skills and an MCP server. So the guard is a package of its own, installed
next to mariadb-dev (or mariadb-sql):

hermes plugins install mariadb-guard --enable

Then start a new Hermes session. That installs the release the
Hermes plugin catalog
pins; to install the main branch instead, give this folder of the repository:
hermes plugins install mariadb/ai-plugins#hermes/guard-plugin --enable.

Turning it off

If you want the agent to run the clients itself, start Hermes with
MARIADB_PLUGIN_ALLOW_CLI=1 in its environment, or run
hermes plugins disable mariadb-guard. The model cannot turn it off: the
variable is read from Hermes' own environment, not from the command the model
runs.

Limits

The guard reads the command the way a shell would split it, but it does not
run it. A command built at run time ($(echo mariadb) -e ...), or a client
started from execute_code instead of terminal, is not caught. The guard is a
safety net, not a sandbox; the MCP server's instructions and the plugin's
system-prompt section are what steer the agent in the first place.

License

GPL-2.0, see LICENSE.

README from the reviewed commit 6723579; it updates when the author re-pins.

More by MariaDB

2 plugins by MariaDB in the catalog.

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section