← Back to MariaDB MCP Server
Install MariaDB MCP Server
Pick your client, copy the command, done.
1
Add it to Claude Code
claude mcp add mariadb-mcp -- python path/to/server.pyEnvironment 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.