Back to Browse

Database MCP Server

Data & AnalyticsModerate6.2MCP RegistryLocal
Free

Server data from the Official MCP Registry

MCP server for MariaDB. Read-only by default, row caps, timeouts, secrets never logged.

About

MCP server for MariaDB. Read-only by default, row caps, timeouts, secrets never logged.

Security Report

6.2
Moderate6.2Moderate Risk

A well-architected database MCP server with strong security-by-default principles, comprehensive credential handling, and proper input validation. The codebase demonstrates excellent separation of concerns and layered guardrails (SQL guards + server-level read-only enforcement). Minor quality observations around error handling breadth and test coverage completeness do not materially impact security posture. Package verification found 2 issues (1 critical, 0 high severity).

8 files analyzed · 6 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

env_vars

Check that this permission is expected for this type of plugin.

File System Read

Reads files on your machine. Normal for tools that analyze or process local data.

File System Write

Writes or modifies files on your machine. Check that this is expected for the tool.

HTTP Network Access

Connects to external APIs or services over the internet.

TCP Network Access

Opens direct network connections, common for database or messaging tools.

process_spawn

Check that this permission is expected for this type of plugin.

Unverified package source

We couldn't verify that the installable package matches the reviewed source code. Proceed with caution.

What You'll Need

Set these up before or after installing:

Database hostOptional

Environment variable: MARIADB_HOST

Database user (a read-only user is recommended)Optional

Environment variable: MARIADB_USER

Database password (or use MARIADB_PASSWORD_FILE)Required

Environment variable: MARIADB_PASSWORD

Database nameOptional

Environment variable: MARIADB_DATABASE

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-arifulislamat-database-mcp-mariadb": {
      "env": {
        "MARIADB_HOST": "your-mariadb-host-here",
        "MARIADB_USER": "your-mariadb-user-here",
        "MARIADB_DATABASE": "your-mariadb-database-here",
        "MARIADB_PASSWORD": "your-mariadb-password-here"
      },
      "args": [
        "-y",
        "database-mcp"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

database-mcp

CI License: MIT npm PyPI Node >= 20

MCP servers that give AI clients safe, structured access to SQL databases.

One installable package per database engine, in TypeScript (npm) and Python (PyPI). Every package exposes the same minimal two-tool surface, execute_sql and search_objects, with guardrails on by default: read-only mode, row caps, and statement timeouts.

Packages

Both lines are published and pass the same language-agnostic conformance suite against real databases in CI, so behavior is identical regardless of language. Every engine is also listed on the MCP Registry with both install options.

Go and Rust implementations are planned.

Design principles

  • Two tools, no more. A tiny tool surface keeps the model's context window clean. search_objects progressively discloses schema: call it with no arguments to list tables, with a table name to get columns, indexes, and foreign keys.
  • Safe by default. Read-only mode is enforced in two layers: a conservative SQL guard, plus a session-level read-only setting in the database itself. Rows are capped (default 1000) and statements time out (default 30s).
  • Configured at launch, never via chat. Connection details come from flags, a YAML config file, or environment variables. Credentials are never accepted through a tool call.
  • Secrets never appear in logs. Passwords live in non-printable secret types, DSNs are sanitized before logging, and a redaction filter guards the log boundary.

Quick start

Pick your engine's package; each README has the full config surface. SQLite via npm:

{
  "mcpServers": {
    "sqlite": {
      "command": "npx",
      "args": ["-y", "@database-mcp/sqlite", "--dsn", "/absolute/path/to/database.db"]
    }
  }
}

Or via PyPI: use "command": "uvx" and "args": ["database-mcp-sqlite", "--dsn", "/absolute/path/to/database.db"]. Flags, environment variables, and YAML config are identical across both lines.

Networked engines take credentials from the environment (MYSQL_*, MARIADB_*, POSTGRES_*/DATABASE_URL, LIBSQL_URL/LIBSQL_AUTH_TOKEN), *_FILE mounted secrets, or a YAML file via --config. Never from a chat prompt.

Contributing

See CONTRIBUTING.md. The short version: the conformance suite is the definition of done. A change is mergeable only when conformance/run.mjs passes against every affected server.

License

MIT

Reviews

No reviews yet

Be the first to review this server!