MariaDB MCP Server
Allows managing multiple MariaDB databases, providing tools for schema exploration, SQL query execution (SELECT, INSERT, UPDATE, DELETE, DDL), and atomic transaction support with controlled read/write permissions.
Allows managing multiple MySQL databases, providing tools for schema exploration, SQL query execution (SELECT, INSERT, UPDATE, DELETE, DDL), and atomic transaction support with controlled read/write permissions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MariaDB MCP Servershow me the schema for the orders table in the production database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mariadb-mcp-server
MCP (Model Context Protocol) server for MariaDB/MySQL databases. Provides AI assistants with safe, controlled database access through per-connection read/write permissions.
Features
Multi-connection — manage multiple MariaDB/MySQL databases from a single server
Per-connection access control —
readandwriteflags per connectionOptional limits —
statement_timeout_ms,default_row_limit,max_row_limit(all optional, unlimited by default)SQL guard — validates queries to prevent accidental writes through read tools
Transaction support — atomic multi-query execution on writable connections
Related MCP server: MySQL MCP Server
Installation
npm install -g @cemalturkcann/mariadb-mcp-serverOr use directly with npx:
npx @cemalturkcann/mariadb-mcp-serverConfiguration
The server looks for config.json in this order:
DB_MCP_CONFIG_PATHenvironment variableNext to the package (
../config.jsonrelative tosrc/)Current working directory
~/.config/mariadb-mcp/config.json
If no config is found, a default one is created automatically at ~/.config/mariadb-mcp/config.json with a local read-only connection.
Example config:
{
"connections": {
"local": {
"host": "localhost",
"port": 3306,
"user": "root",
"password": "",
"description": "Local MariaDB",
"read": true,
"write": true
},
"production": {
"host": "db.example.com",
"port": 3306,
"user": "readonly_user",
"password": "secret",
"database": "mydb",
"description": "Production (read-only)",
"read": true,
"write": false,
"statement_timeout_ms": 5000,
"default_row_limit": 50,
"max_row_limit": 500
}
}
}Connection options
Field | Type | Default | Description |
| string |
| Database host |
| number |
| Database port |
| string |
| Database user |
| string |
| Database password |
| string |
| Default database |
| string |
| Human-readable label |
| boolean |
| Allow read queries |
| boolean |
| Allow write queries |
| boolean/object |
| SSL configuration |
| number | none | Connection timeout (0 or omit = unlimited) |
| number | none | Default LIMIT for SELECT (0 or omit = unlimited) |
| number | none | Max allowed LIMIT (0 or omit = unlimited) |
MCP Tools
Tool | Description | Requires |
| List all configured connections | — |
| Show databases on a connection |
|
| Show tables (optionally in a specific database) |
|
| Show column definitions |
|
| Run SELECT / SHOW / DESCRIBE / EXPLAIN queries |
|
| Run INSERT / UPDATE / DELETE / DDL queries |
|
| Run multiple write queries atomically |
|
| Suggest a query for manual review | — |
MCP Client Setup
On first run, a default config is created automatically at ~/.config/mariadb-mcp/config.json (Linux/macOS) or %APPDATA%\mariadb-mcp\config.json (Windows). Edit it to add your connections.
Claude Code
Add to ~/.claude.json:
{
"mcpServers": {
"mariadb": {
"command": "npx",
"args": ["-y", "@cemalturkcann/mariadb-mcp-server"]
}
}
}OpenCode
Add to your opencode.json:
{
"mcp": {
"mariadb": {
"type": "local",
"command": ["npx", "-y", "@cemalturkcann/mariadb-mcp-server"]
}
}
}Other MCP Clients
Any MCP-compatible client can use this server. The binary name is mariadb-mcp-server and it communicates over stdio. To use a custom config path, set DB_MCP_CONFIG_PATH.
License
MIT
Available Tools
6 toolsdescribe_tableC
Returns column information for a table.
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | ||
| table | Yes | ||
| database | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full responsibility for disclosing behavior. It only states the output is 'column information' without mentioning read-only nature, error handling, permissions, or side effects. This is insufficient for an agent to predict behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise and front-loaded. However, it is too minimal given the tool's complexity (3 parameters, no output schema). Brevity is not always conciseness; here it sacrifices clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 3 parameters, no output schema, and sibling tools, the description is incomplete. It fails to specify the output format, parameter constraints (e.g., which connections are valid), or how to handle missing parameters like database. An agent would have to guess or infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description adds no meaning to parameters. It doesn't explain what 'connection', 'table', or 'database' represent or how they interact, leaving the agent with only the raw schema (names and types) which is insufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool returns column information for a table, which is specific and distinguishes it from siblings like list_tables (which lists table names) and execute_select (which runs queries). The verb 'returns' and resource 'column information' are appropriate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as list_tables or suggest_query. It does not mention prerequisites, typical use cases, or which sibling tools might be more appropriate for different scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_selectB
Executes a read-only SELECT/SHOW/DESCRIBE/EXPLAIN query. Row limit is enforced.
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | ||
| query | Yes | ||
| database | No | ||
| row_limit | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description declares the tool as read-only and mentions a row limit, which are important behavioral traits. However, with no annotations, it lacks disclosure of other behaviors like error handling, result format, or query length limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two concise sentences with the action verb upfront. No extraneous information is included, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 4 parameters and no annotations or output schema, the description is too minimal. It fails to explain return values, parameter dependencies, or error scenarios, which are critical for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, yet the description only adds meaning for row_limit. It does not explain the connection enum, the purpose of the optional database parameter, or expected query format, leaving three parameters undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool executes read-only SQL-type queries (SELECT/SHOW/DESCRIBE/EXPLAIN) and enforces a row limit. It distinguishes itself from sibling tools that focus on metadata or suggestions, though it could explicitly state that it returns query results.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus siblings such as describe_table or suggest_query. The description does not specify context, prerequisites, or alternatives, leaving the agent to infer usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_connectionsB
Lists configured MariaDB connections.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden but only repeats the tool name. It does not disclose any behavioral traits (e.g., read-only, returned format).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence with no unnecessary words, earning its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list operation with no parameters or output schema, the description is adequate but lacks context about connections or how to interpret results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are no parameters, so the schema coverage is 100%. The description adds no value beyond the empty schema, meeting baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (list) and resource (configured MariaDB connections), making it distinct from sibling tools like describe_table or list_tables.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, nor are there any prerequisites or context for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_databasesB
Lists databases for the selected connection.
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description only states 'lists databases' without behavioral details such as read-only nature, authentication requirements, or output format. It adds no value beyond the obvious.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, no wasted words. Properly front-loaded and appropriately sized for the tool's simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description is incomplete. It does not explain return format, scope (all databases?), or any side effects. For a list tool, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%. The description mentions 'selected connection' but does not clarify the connection parameter's meaning or relationship to list_connections. Minimal value added over the schema's enum.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists databases for a selected connection. It uses a specific verb (Lists) and resource (databases), and distinguishes from sibling tools like list_tables and list_connections.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives. It does not mention when-not-to-use or provide context for selecting between siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tablesC
Lists tables for the selected connection.
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | ||
| database | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It only states the basic function with no details on output format, pagination, permissions, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very concise (one sentence) but lacks essential details. It is not sufficiently informative for an agent to use correctly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and no annotations, the description fails to specify what the tool returns (e.g., table names) or how to use the optional database parameter. It is incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain the 'database' parameter or clarify that 'connection' is limited to 'local'. More detail on parameters is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (listing) and the resource (tables) with context (for selected connection). It is distinct from sibling tools like list_databases and list_connections.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives such as describe_table or execute_select. No context on prerequisites or limitations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
suggest_queryC
Suggests a query that should be executed manually.
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | ||
| query | Yes | ||
| reason | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must cover behavioral traits. It only states the tool suggests a query for manual execution, leaving out details like side effects, permissions, or what happens when invoked. This is minimal disclosure for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is concise but under-specifies the tool. It does not earn its place due to lack of substance; it is too sparse to be helpful beyond stating the basic action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has three parameters and no output schema, the description should provide more context. It fails to explain the role of each parameter, the outcome of the suggestion, or any prerequisites. The description is incomplete for effective tool selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0% description coverage, and the tool description adds no meaning to the parameters (connection, query, reason). With no compensation from the description, the agent has no insight into parameter semantics beyond their names.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool suggests a query for manual execution, distinguishing it from sibling tools like execute_select. The verb 'suggests' and resource 'query' are specific, and the manual execution note differentiates its purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for suggesting queries rather than executing them, especially given the sibling execute_select. However, there is no explicit guidance on when to use it or when not to, nor any mention of alternatives beyond the implied distinction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
6 tool updates
v1.0.0- First observed
describe_table - First observed
execute_select - First observed
list_connections - First observed
list_databases - First observed
list_tables - First observed
suggest_query
TDQS
Each tool has a distinct purpose: describing tables, executing SELECT queries, listing connections, databases, tables, and suggesting queries. No overlap.
All tool names follow a consistent verb_noun snake_case pattern (e.g., describe_table, list_databases).
6 tools is well-scoped for a MariaDB server, covering metadata listing, query execution, and query suggestion without being excessive or thin.
Covers read-only operations (SELECT, DESCRIBE, metadata listing) and query suggestion, but lacks write operations (INSERT/UPDATE/DELETE) and DDL commands. This gap appears intentional but limits the surface.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
PostgreSQL, MySQL, OpenAPI/Swagger, and shared Agent Memory with scoped access.
- OleanderOAuthdev.oleander
The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with MariaDB databases through SQL operations and vector-based semantic search. Supports standard database queries, schema inspection, and optional embedding-powered document storage and retrieval.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to securely connect to and manage MySQL databases with support for multiple database connections, complete CRUD operations, schema inspection, and dynamic connection management through natural language.3580MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to securely interact with MySQL databases through tools for query execution, schema inspection, and transaction management. It features built-in safety controls like row limits and query validation to ensure safe and standardized database access.454-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to safely interact with MySQL/MariaDB databases, supporting read-only queries by default with optional write operations and access control.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cemalturkcan/mariadb-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server