Business Intelligence
MariaDB MCP Server: The Official One Moved. What to Run Now
MariaDB deprecated its MCP server on Nov 3, 2026, and five reads wrote past its read-only flag in our test. What to run instead, and the account to give it.

MariaDB deprecated its first official MCP server, MariaDB/mcp, on November 3, 2026, and moved the work to mariadb-corporation/ai-plugins. Don't install the old one. With its read-only flag on, five reads still wrote through it in our test. Run MariaDB's replacement, the MariaDB Shell MCP server, or bytebase/dbhub with readonly = true if you want a second lock. Either way, give it a SELECT-only account.
What changed on November 3
The old repo now opens with MariaDB's notice: "effective November 3, 2026, this repository (mariadb/mcp) is officially deprecated." New work happens in the AI Plugins repo. On MariaDB's downloads page, the community server is now the one "built into MariaDB Shell".
The old repo is still up, and it still installs. We ran it at commit 9f4c4a7, the one that added the notice. The setup guides Google ranks still point at it. QueryPlane's guide clones it and never mentions the deprecation. MariaDB's own July 2025 blog post clones it too, with a sample .env that sets MCP_READ_ONLY=false.
MariaDB/mcp vs the MariaDB Shell MCP server
The new server isn't the old one in a new repo. It's a different program that runs as a plugin inside MariaDB Shell. We read its docs and source but didn't run it.
| MariaDB/mcp (deprecated) | MariaDB Shell MCP server | |
|---|---|---|
| Install | Python 3.11 and uv, from a clone of the repo | MariaDB Shell installs itself the first time an agent starts the server. Then mariadb-shell -- mcp setup |
| Which databases | Whatever DB_HOST in .env points at |
An allow-list that "starts out allowed to reach nothing" |
| Password | DB_PASSWORD in .env |
The MariaDB Shell secret store, never in a file the agent can read |
| SQL tools | execute_sql, one query |
db.execute_sql for one statement, db.execute_sql_script for a script |
| Read-only switch | MCP_READ_ONLY, on by default |
None |
| Vector tools | Five, only when EMBEDDING_PROVIDER is set |
None. Vectors come as skills |
| Other tools | create_database |
Groups for SQL checks, sandboxes, dumps and loads, and migrations |
| Remote use | SSE or streamable HTTP. "The server does not provide a default authentication method" | A Docker image on port 8080, plain HTTP, that offers API keys, OAuth2 and Keycloak. MCP_OAUTH_MODE defaults to none |
Moving from MariaDB/mcp, step by step
These steps follow MariaDB's ai-plugins docs for MariaDB Shell's MCP server 26.11.2.
- Create the agent's account first. Use the SELECT-only account in the account section below. Don't carry over the account from the old
.envunless it can only SELECT. - Add MariaDB's plugin to your agent. The ai-plugins repo has plugins for Claude Code, Codex, OpenCode, Pi, Hermes, Cursor and VS Code Copilot. You don't install MariaDB Shell by hand.
- Run
mariadb-shell -- mcp setupand allow one connection. Add the database the agent needs, with the new account, and nothing else. - Let MariaDB Shell keep the password. Don't copy it into a config file yourself.
- Take the old server out of your agent's MCP config. Remove the entry that starts the Python server. If you ran it over SSE or HTTP, stop that process too.
- Retire the old
.env. It heldDB_PASSWORDin plain text, in a file on the agent's machine. We'd rotate that password, or drop the account if nothing else uses it, and then delete the file. - Set auth if the server goes remote. MariaDB's Docker image is for many users over HTTP. Pick API keys or OAuth2 before anyone else connects. For an agent on your own machine, MariaDB says to use a local MariaDB Shell over stdio instead.
- Check it. Ask the agent for a row count, then ask it to delete a row. On the SELECT-only account, MariaDB refused every DELETE in our test with error 1142.
Still on MariaDB/mcp? Its read-only flag let five reads write
We gave the old server a full-rights account: every privilege on the database, plus FILE. MCP_READ_ONLY stayed on, as it ships. We ran it on MariaDB 13.0.2. Plain INSERT, DELETE, DROP TABLE and CALL came back with "Operation forbidden: Server is in read-only mode." Five statements that look like reads got through and wrote.
Two of them hide in a comment form only MariaDB has. MariaDB runs whatever sits inside /*M! ... */, and MySQL skips it. The old server strips comments with a regex, then checks the first word against a short list: SELECT, SHOW, DESC, DESCRIBE and USE. An August 2026 fix taught that regex to keep /*! ... */, but it still deletes /*M! ... */ as a plain comment. The check sees a SELECT, and MariaDB runs the whole text.
/*M! DELETE FROM orders WHERE id IN ( */ SELECT 6 /*M! ) */looks likeSELECT 6to the server. MariaDB ran the DELETE and the table lost a row.SELECT * FROM orders /*M! INTO OUTFILE '...' */wrote the file. Without the comment, the server refused it: "SELECT INTO OUTFILE and SELECT INTO DUMPFILE are not allowed for security reasons."
The other three start with SELECT and need no trick at all.
SELECT f_del()calls a stored function that deletes a row. The table went from 6 rows to 5.SELECT f_del_inv()is the same function withSQL SECURITY INVOKER. It deleted a row too: the account itself had DELETE.SELECT NEXTVAL(seq)moved a sequence from 1 to 2.

The README admits the flag "is a best effort attempt to prevent write operations" and "not a substitute for proper database user privileges." It's right. On a SELECT-only account, the same server sent all five to MariaDB, and MariaDB refused each one with error 1370, 1142 or 1227.
The same comment trick beats a time cap. On the SELECT-only account with a 1-second MAX_STATEMENT_TIME, /*M! SET STATEMENT max_statement_time = 0 FOR */ SELECT SLEEP(3) passed the check and ran for 3.13 seconds. It wrote nothing, but the agent lifted its own cap.
If you can't move off the old server this week, give it the SELECT-only account below today.
Which server to pick, and the account to give it
So why move to a server with no read-only flag at all? Because the old flag was a promise the server couldn't keep, and the new server doesn't make it. MariaDB's docs say so plainly: the server "restricts which servers the agent can connect to, but it doesn't restrict the SQL statements the agent runs on them." Whatever the account may run, the agent may run. The same docs say not to use "your personal developer account, an administrator account, or root."
Here's how to pick:
- MariaDB Shell MCP server, if you set up the account below. It's MariaDB's supported path, and the account is the lock.
- bytebase/dbhub with
readonly = true, if the agent has to use an account that can write, or you want a second lock. dbhub 2.1.0 refused every write in our test, even on the full-rights account. Its keyword check stopped most of them, and a READ ONLY transaction stopped the deleting function and NEXTVAL with MariaDB error 1792. It also refused both ways to lift the time cap. Its README calls it "a guardrail, not a permission boundary".
dbhub's read-only mode is off by default: with --dsn alone, execute_sql can write. Point --config at a TOML file instead:
[[sources]]
id = "shop"
dsn = "mariadb://mcp:<password>@db.internal:3306/shop"
[[tools]]
name = "execute_sql"
source = "shop"
readonly = true
Is there an MCP for MySQL? Yes, and our MySQL MCP server test picks benborla/mcp-server-mysql. Its README doesn't name MariaDB, and we didn't run it on MariaDB, so it isn't the pick here. designcomputer/mysql_mcp_server has no read-only mode, and nearly every write we sent ran on the full-rights account.
Now the account. The first two statements come from MariaDB's AI Plugins docs. The third is ours.
CREATE USER 'mcp'@'%' IDENTIFIED BY 'replace-with-a-generated-password' WITH MAX_USER_CONNECTIONS 10 MAX_STATEMENT_TIME 60;
GRANT SELECT ON `shop`.* TO 'mcp'@'%';
ALTER USER 'mcp'@'%' WITH MAX_QUERIES_PER_HOUR 1000;

MariaDB's version already leaves out EXECUTE and FILE. Keep it that way. Add the hourly limit too, for the reason below.
Never add EXECUTE. A MariaDB routine runs with its creator's rights unless it says SQL SECURITY INVOKER. We granted EXECUTE to the SELECT-only account, and SELECT f_del() deleted a row through the old server. On a plain connection, CALL, DO and SET deleted rows the same way. And MariaDB's docs say MAX_STATEMENT_TIME "doesn't apply to statements within stored procedures."
Never add FILE. INTO OUTFILE needs it. Without it, MariaDB answered with error 1227: "Access denied; you need (at least one of) the FILE privilege(s) for this operation." MariaDB's own read-only switches don't replace this. INTO OUTFILE still wrote a file under SET SESSION TRANSACTION READ ONLY, under START TRANSACTION READ ONLY and with global read_only=1.
Add MAX_QUERIES_PER_HOUR. The agent can change MAX_STATEMENT_TIME itself, so it's a default, not a cap. On a plain connection, a 1-second per-user limit stopped a 5-second sleep at about 1.1 seconds. Then the agent ran SET SESSION max_statement_time = 0, and a 3-second sleep finished. The hourly quota held: with a limit of 3, the fourth query got "User 'agent' has exceeded the 'max_queries_per_hour' resource (current value: 3)". It counts statements, "including updates", so set it from how many statements the agent should run in an hour. It won't stop one long query. We didn't test either cap through the Shell server.
Where Querio fits on MariaDB
MariaDB is one of Querio's integrations. You type the MariaDB login into Querio once, and no agent ever handles it. Make it the SELECT-only account above.
Every server on this page hands the agent raw tables, and the agent writes its own SQL each time. Querio hands it your team's definitions. Through Querio's MCP server, Claude, ChatGPT and your own agents search your team's context, describe tables, run SQL, get metrics by name and run saved queries. The metrics live as files in a git repo your team owns, so "revenue" means one thing in every agent. Each agent can do what the person who connected it can do in Querio, and nothing more.
The MCP server comes with every plan, Free included, and your own agents don't use Querio's AI credits. Querio is SOC 2 Type II and HIPAA compliant, and it logs every query and every agent action. The account keeps the agent from writing to MariaDB. The log shows you what it asked.
