MariaDB

MariaDB

MCP MariaDB Server provides a Model Context Protocol interface for managing MariaDB databases and vector stores.

95
Stars
38
Forks
0
Releases

Overview

The MCP MariaDB Server exposes a Model Context Protocol (MCP) interface for managing and querying MariaDB databases, offering both standard SQL operations and optional vector/embedding-based search. It provides a set of tools for interacting with databases and vector stores: listing databases and tables, retrieving table schemas (with and without foreign key relations), and executing safe, read-only SQL queries (enforced via MCP_READ_ONLY). It also supports creating databases. For embedding workflows, optional vector store capabilities (create, delete, list, insert, and search) can be enabled by configuring an embedding provider (OpenAI, Gemini, or HuggingFace). The vector store schema includes id, document, embedding, and metadata fields. Configuration is via environment variables (e.g., DB_HOST, DB_USER, DB_PASSWORD, MCP_READ_ONLY, EMBEDDING_PROVIDER, etc.), with options for SSL/TLS and authentication methods. The server supports multiple transports (standard input/output, SSE, HTTP) and can be integrated with external authentication providers (GitHub/Google). It logs activity to logs/mcp_server.log and includes testing/documentation under src/tests. This server is designed for AI assistants to seamlessly integrate AI-driven data workflows with relational and vector databases.

Details

Owner
mariadb
Language
Python
License
MIT License
Updated
2025-12-07

Features

Standard MCP database tools

Provides tools to list databases, list tables, retrieve table schemas (with and without relations), and execute read-only SQL queries with MCP_READ_ONLY enforcement.

Create and manage databases

Supports creating databases if they do not exist, with per-query database specification.

Vector store and embedding integration

Enables creating, deleting, listing, inserting into, and querying vector stores for embedding-based search (requires EMBEDDING_PROVIDER).

Embedding providers support

Supports OpenAI, Gemini, and HuggingFace embeddings with configurable models and keys.

Config-driven environment and security

All configuration via environment variables, with SSL/TLS options, read-only mode, and external authentication examples.

Model selection and per-request configuration

Default and allowed embedding models configurable; model can be chosen per request or defaulted.

Transport options

Operates over stdio, SSE, or HTTP transports for flexible client integration.

Logging and testing

Logs activity to logs/mcp_server.log; includes testing/docs in src/tests for verification.

Audience

AI developersEnable AI-driven data workflows by querying MariaDB and vector stores through MCP.
Data engineersIntegrate semantic search and SQL queries into data pipelines.
DevOpsDeploy, monitor, and secure MCP server with logging, tests, and configurable env vars.

Tags

MCPMariaDBSQLvector storeembeddingsembedding providersOpenAIGeminiHuggingFacesemantic searchread-onlyauthenticationenvironment variablesSSLSSEHTTPClaude integrationtesting