Sign In

@database-mcp/mariadb

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@database-mcp/mariadb

MCP server for MariaDB with read-only guardrails, row caps, and statement timeouts

Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
102
104%
Maintainers
1
Weekly downloads
 
Created
Source

@database-mcp/mariadb

MCP server giving AI clients safe, structured access to a MariaDB database. Two tools, guardrails on by default. MariaDB is MySQL wire-compatible, so this is a thin package over the @database-mcp/mysql adapter — identical behavior, MariaDB-flavored configuration.

Quick start (Claude Desktop / Claude Code / Cursor)

{
  "mcpServers": {
    "mariadb": {
      "command": "npx",
      "args": ["-y", "@database-mcp/mariadb"],
      "env": {
        "MARIADB_HOST": "127.0.0.1",
        "MARIADB_USER": "readonly_user",
        "MARIADB_PASSWORD": "...",
        "MARIADB_DATABASE": "mydb"
      }
    }
  }
}

Alternatives: MARIADB_PASSWORD_FILE=/run/secrets/..., a YAML file via --config (${VAR} expansion supported), or --dsn. --print-config shows the resolved config with the password redacted.

Tools

  • execute_sql { sql } — run a single SQL statement.
  • search_objects { table? } — list tables, or describe one (columns, indexes, foreign keys).

Guardrails (defaults)

GuardrailDefaultOverride
Read-onlyon--allow-write / ALLOW_WRITE
Row cap1000--max-rows / MAX_ROWS
Query timeout30000 ms--query-timeout-ms / QUERY_TIMEOUT_MS

Read-only is enforced in two layers: a conservative SQL guard, plus SET SESSION TRANSACTION READ ONLY on every pooled connection.

Part of database-mcp

One package per engine, identical tool contract, shared conformance suite: github.com/arifulislamat/database-mcp

License

MIT

Keywords

mcp

FAQs

Package last updated on 12 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts