mcp_server_mariadb_reader
mcp_server_mariadb_reader
claude mcp add --transport stdio moosin76-mcp_server_mariadb_reader node <클론된 저장소 경로>/build/index.js \ --env MARIADB_HOST="YOUR_DB_HOST" \ --env MARIADB_PORT="YOUR_DB_PORT" \ --env MARIADB_USER="YOUR_DB_USER" \ --env MARIADB_DATABASE="YOUR_DEFAULT_DB" \ --env MARIADB_PASSWORD="YOUR_DB_PASSWORD"
How to use
This MariaDB Reader MCP Server provides tools to explore and interact with a MariaDB database via a conversational AI agent. The available tools include list_databases to fetch all accessible databases, list_tables to retrieve all tables within a specified database, get_table_schema to view the column definitions of a table, and query_table to read data from a table (defaulting to the first 100 rows). Use these tools by calling the corresponding command names through your MCP client (for example, a VS Code MCP extension) and supplying the required inputs like database and table names. The tools are designed to be straightforward: list_databases returns a list of databases, list_tables requires the database name, get_table_schema requires database and table names, and query_table takes database, table, and an optional limit to control how many rows are returned. Configure the MCP with the MariaDB connection details so the agent can query the actual database behind the scenes.
How to install
Prerequisites:
- Node.js (and npm) installed on your machine
- Git installed
- Access to a MariaDB instance and the credentials to connect
Installation steps:
- Clone the repository:
git clone https://github.com/moosin76/mcp_server_mariadb_reader.git
- Navigate to the project directory:
cd mcp_server_mariadb_reader
- Since the repository includes prebuilt executables (build/index.js), you can start using it without a build step. If you want to development-build from source, install dependencies and build:
npm install
npm run build
- Update MCP settings to point to your local clone path and provide the MariaDB connection details in the env section, then start the server via your MCP client configuration. The example config in the README shows how to reference the build/index.js file and set the required environment variables.
Notes:
- If you are not using the prebuilt bundle, you can build from src as shown above.
- Ensure the MariaDB credentials terminated in the MCP config match your environment to establish a connection.
Additional notes
Tips and common considerations:
- Environment variables MARIADB_HOST, MARIADB_PORT, MARIADB_USER, MARIADB_PASSWORD, and MARIADB_DATABASE must be set for the server to connect to MariaDB. Do not include sensitive info in logs.
- If MARIADB_DATABASE is left unset, the server may connect to the server level or require database specification per query.
- Make sure the user account has appropriate privileges to list databases, list tables, read table schemas, and query data.
- If you encounter connectivity issues, verify network access to the MariaDB host/port and confirm TLS/SSL requirements if used by your database.
- When using query_table, you can specify limit to control how many rows are returned (default is 100).
- The build/index.js path in the MCP config should reflect the actual location of the prebuilt file on your system.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.