Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

database-mcp-mariadb

MCP server by arifulislamat Community

Gives AI assistants structured access to MariaDB through the execute_sql and search_objects tools. Read-only mode, row caps and statement timeouts are on by default, and secrets are kept out of logs. Aimed at AI clients that need safe database access.

  • Score 73
  • 5 stars
  • 82 a week
  • MIT
  • Updated

Install database-mcp-mariadb

Built from the published package, never by AI.

claude mcp add database-mcp-mariadb -e MARIADB_HOST=YOUR_MARIADB_HOST -e MARIADB_USER=YOUR_MARIADB_USER -e MARIADB_DATABASE=YOUR_MARIADB_DATABASE -- npx -y @database-mcp/mariadb

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install database-mcp-mariadb in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the database-mcp-mariadb block.

About

database-mcp-mariadb is an MCP server that gives AI clients safe, structured access to a MariaDB database. It is one package in the database-mcp project, which also covers SQLite, libSQL, MySQL and Postgres. Every package exposes the same two tools, execute_sql and search_objects.

Guardrails are on by default: read-only mode enforced by a SQL guard and a session-level setting, row caps of 1000 rows, and statement timeouts of 30 seconds. Connection details come from flags, a YAML file or environment variables, not chat, and passwords are kept out of logs. It is aimed at AI clients that need structured MariaDB access without write access by default.

Written from the project's README and checked against it.

Tools it gives your assistant

  • execute_sqlRuns SQL against the database with read-only mode, row caps and timeouts on by default.
  • search_objectsLists tables when called with no arguments, or returns columns, indexes and foreign keys for a named table.

What you need

  • Node.js for the npm package run with npx
  • Python with uvx for the PyPI package
  • Rust and cargo for the native binary
  • A MariaDB database and connection details set through environment variables, flags or YAML
SettingNeededWhat it is
MARIADB_HOSTEnvironment variableRequiredDatabase host
MARIADB_USEREnvironment variableRequiredDatabase user (a read-only user is recommended)
MARIADB_DATABASEEnvironment variableRequiredDatabase name
MARIADB_PASSWORDEnvironment variable, secretOptionalDatabase password (or use MARIADB_PASSWORD_FILE)

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Try asking

  • List all the tables in my MariaDB database.
  • Show the columns, indexes and foreign keys for the orders table.
  • Run a read-only SQL query that counts rows in each table.

Good to know

  • Rows are capped at 1000 by default.
  • Statements time out after 30 seconds by default.
  • Credentials cannot be passed through a tool call.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to database-mcp-mariadb

All alternatives →
Supabase supabase
97

Connects Supabase projects to AI assistants such as Cursor, Claude and Windsurf over the Model Context Protocol. It lets assistants manage tables, fetch config and query data in a Supabase project.

AAA Local and remote 172k/wk
ArcadeDB MCP Server ArcadeData
94

ArcadeDB MCP Server is the built-in Model Context Protocol server of the ArcadeDB multi-model database. It lets AI assistants and LLMs work with ArcadeDB's graph, document, time-series, vector and other data models. It suits people who already run ArcadeDB and want assistant access to it.

AAA Local 1.3k
DBHubbytebase
94

Connects MCP clients such as Claude Desktop, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite. It exposes two tools by default, with read-only mode and query timeouts available as guardrails.

AAA Local 343k/wk
MCP Toolbox for Databasesgoogleapis
94

MCP Toolbox for Databases is an open source MCP server that connects AI agents, IDEs and applications to enterprise databases. It provides prebuilt tools for exploring schemas and running queries, plus a framework for custom tools. It is aimed at developers building agents that need database access.

AAA Local 17k
MCP Toolbox for Databasesgoogleapis
94

Connects AI agents, IDEs and applications to enterprise databases through the Model Context Protocol. Offers prebuilt database tools for MCP clients and a framework for building custom tools for production agents.

AAA Local 17k
mongodb-mcp-servermongodb-js
94

MongoDB MCP Server lets AI assistants interact with MongoDB databases and MongoDB Atlas. It is an official server from mongodb-js, run locally with npx or Docker. It works with self-managed deployments and Atlas clusters.

AAA Local 203k/wk

Compare with Supabase, ArcadeDB MCP Server or DBHub

database-mcp-mariadb: common questions

What tools does database-mcp-mariadb expose?

It exposes two tools, execute_sql and search_objects. Called with no arguments, search_objects lists tables, and called with a table name it returns that table's columns, indexes and foreign keys.

Is database-mcp-mariadb read-only?

Read-only mode is on by default. The source says it is enforced by a conservative SQL guard plus a session-level read-only setting in the database.

How does database-mcp-mariadb handle passwords?

Passwords are stored in non-printable secret types, DSNs are sanitized before logging, and a redaction filter guards the log boundary. Credentials come from the environment, mounted secret files or a YAML file, never from a chat prompt.

How do I install database-mcp-mariadb?

In Claude Code run claude mcp add database-mcp-mariadb -e MARIADB_HOST=YOUR_MARIADB_HOST -e MARIADB_USER=YOUR_MARIADB_USER -e MARIADB_DATABASE=YOUR_MARIADB_DATABASE -- npx -y @database-mcp/mariadb. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is database-mcp-mariadb the official server?

database-mcp-mariadb is a community project by arifulislamat, not verified by a company domain.

Is database-mcp-mariadb free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is database-mcp-mariadb safe to use?

It scores 73 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to database-mcp-mariadb?

Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.

Does database-mcp-mariadb work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

database-mcp-mariadb Install

Add to stack

Loading.