🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
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 - npm Package Compare versions

Comparing version
0.0.0
to
0.2.0
+9
dist/adapter.d.ts
import { MysqlAdapter } from "@database-mcp/mysql";
/**
* MariaDB is MySQL wire-compatible: same driver (mysql2), same
* information_schema introspection, same session read-only enforcement.
* Quirk overrides go here if any surface; conformance decides.
*/
export declare class MariadbAdapter extends MysqlAdapter {
engine: string;
}
import { MysqlAdapter } from "@database-mcp/mysql";
/**
* MariaDB is MySQL wire-compatible: same driver (mysql2), same
* information_schema introspection, same session read-only enforcement.
* Quirk overrides go here if any surface; conformance decides.
*/
export class MariadbAdapter extends MysqlAdapter {
engine = "mariadb";
}
//# sourceMappingURL=adapter.js.map
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../src/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,YAAY;IACrC,MAAM,GAAG,SAAS,CAAC;CAC7B"}
#!/usr/bin/env node
export {};
#!/usr/bin/env node
import { loadConfig, serve } from "@database-mcp/core";
import { createRequire } from "node:module";
import { MariadbAdapter } from "./adapter.js";
const { version } = createRequire(import.meta.url)("../package.json");
try {
const config = loadConfig(process.argv.slice(2), process.env, {
envPrefix: "MARIADB",
dsnEnvVar: "MARIADB_DSN",
});
const c = config.connection;
if (!c.dsn && !c.host && !c.database) {
throw new Error("config: no database given — pass --dsn mysql://user@host/db, set MARIADB_HOST/MARIADB_USER/MARIADB_DATABASE, or use --config");
}
await serve(new MariadbAdapter(c), config, version);
}
catch (e) {
console.error(e instanceof Error ? e.message : String(e));
process.exit(1);
}
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,EAAE,OAAO,EAAE,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAwB,CAAC;AAE7F,IAAI,CAAC;IACH,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG,EAAE;QAC5D,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,aAAa;KACzB,CAAC,CAAC;IACH,MAAM,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC;IAC5B,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,IAAI,KAAK,CACb,8HAA8H,CAC/H,CAAC;IACJ,CAAC;IACD,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AACtD,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
+35
-4
{
"name": "@database-mcp/mariadb",
"version": "0.0.0",
"description": "MCP server for MariaDB with read-only guardrails, row caps, and statement timeouts. Placeholder — real release imminent.",
"version": "0.2.0",
"description": "MCP server for MariaDB with read-only guardrails, row caps, and statement timeouts",
"license": "MIT",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"bin": {
"database-mcp-mariadb": "dist/index.js"
},
"files": [
"dist"
],
"scripts": {
"build": "tsc"
},
"repository": {
"type": "git",
"url": "git+https://github.com/arifulislamat/database-mcp.git"
"url": "git+https://github.com/arifulislamat/database-mcp.git",
"directory": "mariadb/typescript"
},
"homepage": "https://github.com/arifulislamat/database-mcp#readme",
"keywords": ["mcp", "model-context-protocol", "mariadb", "database", "sql"],
"keywords": [
"mcp",
"model-context-protocol",
"mariadb",
"mysql",
"database",
"sql"
],
"dependencies": {
"@database-mcp/core": "^0.2.1",
"@database-mcp/mysql": "^0.2.1"
},
"devDependencies": {
"@types/node": "^22.0.0",
"typescript": "^5.8.0"
},
"engines": {
"node": ">=20"
},
"publishConfig": {

@@ -13,0 +44,0 @@ "access": "public"

# @database-mcp/mariadb
MCP server giving AI clients safe, structured access to MariaDB databases.
Two tools (`execute_sql`, `search_objects`), read-only by default, row caps,
statement timeouts.
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`](https://www.npmjs.com/package/@database-mcp/mysql)
adapter — identical behavior, MariaDB-flavored configuration.
**This is a placeholder release securing the package name.** The real release
follows immediately. See the
[repository](https://github.com/arifulislamat/database-mcp) for status.
## Quick start (Claude Desktop / Claude Code / Cursor)
```json
{
"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)
| Guardrail | Default | Override |
| ------------- | -------- | ----------------------------------------- |
| Read-only | on | `--allow-write` / `ALLOW_WRITE` |
| Row cap | 1000 | `--max-rows` / `MAX_ROWS` |
| Query timeout | 30000 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](https://github.com/arifulislamat/database-mcp)
## License
MIT