Updated April 2026

Install MariaDB MCP Server

Pick your client, copy the command, done.

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/MariaDB/mcp
cd mcp

Then follow the repository README for any remaining dependency or build steps before continuing.

2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add mariadb-mcp -- python "<FULL_PATH_TO_MCP>/dist/index.js"

Replace <FULL_PATH_TO_MCP>/dist/index.js with the actual folder you prepared in step 1.

Environment Variables

Set these before running MariaDB MCP Server.

VariableDescriptionRequired
EMBEDDING_PROVIDERProvider for embeddings (openai, gemini, or huggingface)No
OPENAI_API_KEYAPI key for OpenAI embeddingsNo
GEMINI_API_KEYAPI key for Gemini embeddingsNo
HF_MODELModel name for HuggingFace embeddingsNo
MCP_READ_ONLYEnforces read-only mode for SQL queriesNo

Available Tools (11)

Once configured, MariaDB MCP Server gives your AI agent access to:

list_databasesLists all accessible databases.
list_tablesLists all tables in a specified database.
database_name
get_table_schemaRetrieves schema for a table including columns, types, and keys.
database_nametable_name
get_table_schema_with_relationsRetrieves schema with foreign key relations for a table.
database_nametable_name
execute_sqlExecutes a read-only SQL query.
sql_querydatabase_nameparameters
create_databaseCreates a new database if it does not exist.
database_name
create_vector_storeCreates a new vector store table for embeddings.
database_namevector_store_namemodel_namedistance_function
delete_vector_storeDeletes a vector store table.
database_namevector_store_name
list_vector_storesLists all vector stores in a database.
database_name
insert_docs_vector_storeBatch inserts documents and metadata into a vector store.
database_namevector_store_namedocumentsmetadata
search_vector_storePerforms semantic search for similar documents using embeddings.
database_namevector_store_nameuser_queryk

Try It Out

After setup, try these prompts with your AI agent:

List all the databases available on the server.
Show me the schema for the 'users' table in the 'production' database.
Execute a query to find all users who signed up in the last 30 days.
Search the 'knowledge_base' vector store for documents related to 'database security best practices'.
Create a new vector store named 'product_embeddings' in the 'catalog' database.
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Python 3.8+ with pip installed

Keep this setup from going cold

Save the docs, env vars, and workflow around MariaDB MCP Server in Conare so Claude Code, Codex, and Cursor remember it next time.

Need the legacy visual installer? Open Conare IDE.
Remember this setup