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.
git clone https://github.com/MariaDB/mcp
cd mcpThen 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.
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)NoOPENAI_API_KEYAPI key for OpenAI embeddingsNoGEMINI_API_KEYAPI key for Gemini embeddingsNoHF_MODELModel name for HuggingFace embeddingsNoMCP_READ_ONLYEnforces read-only mode for SQL queriesNoAvailable 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_nameget_table_schemaRetrieves schema for a table including columns, types, and keys.database_nametable_nameget_table_schema_with_relationsRetrieves schema with foreign key relations for a table.database_nametable_nameexecute_sqlExecutes a read-only SQL query.sql_querydatabase_nameparameterscreate_databaseCreates a new database if it does not exist.database_namecreate_vector_storeCreates a new vector store table for embeddings.database_namevector_store_namemodel_namedistance_functiondelete_vector_storeDeletes a vector store table.database_namevector_store_namelist_vector_storesLists all vector stores in a database.database_nameinsert_docs_vector_storeBatch inserts documents and metadata into a vector store.database_namevector_store_namedocumentsmetadatasearch_vector_storePerforms semantic search for similar documents using embeddings.database_namevector_store_nameuser_querykTry 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.