MariaDB 读取器 MCP 服务器
该项目是一个用于探索和与 MariaDB 数据库交互的模型上下文协议 (MCP) 服务器。该服务器提供的工具允许像 Cline 这样的 AI 助手访问 MariaDB 数据库并查询信息。
功能
该 MCP 服务器提供以下工具:
list_databases:返回所有可访问数据库的列表。list_tables:返回指定数据库中所有表的列表。输入:
database(字符串,必需) - 要检索表列表的数据库的名称。
get_table_schema:返回指定表的模式(列定义)。输入:
database(字符串,必需) - 表所属数据库的名称。table(字符串,必需) - 要查询架构的表的名称。
query_table:从指定的表中检索数据。默认情况下它返回前 100 行。输入:
database(字符串,必需) - 表所属数据库的名称。table(字符串,必需) - 要从中检索数据的表的名称。limit(数字,可选) - 返回的最大行数(默认值:100)。
环境
要使用此服务器,您需要克隆 GitHub 存储库并在 MCP 客户端(例如 VS Code 扩展)的设置文件中注册服务器信息。该存储库包含预先构建的可执行文件( build/index.js ),不需要单独的构建步骤。
**克隆存储库:**将此存储库克隆到您选择的位置。
git clone https://github.com/moosin76/mcp_server_mariadb_reader.git修改MCP设置文件:
示例设置:
警告:
您需要将
<클론된 저장소 경로>部分更改为您实际克隆存储库的本地路径。 (例如C:/Users/YourUser/Documents/GitHub/mcp_server_mariadb_reader)您需要修改
env对象中的 MariaDB 连接信息以匹配您的实际环境。
开发(修改源代码时)
该存储库包含构建的文件,因此您无需按照以下步骤使用服务器。要直接修改源代码( src目录)并应用更改,请按照以下步骤操作:
安装依赖项(第一次或更改
npm install修复后构建:
npm run build此命令将
src目录中的 TypeScript 代码编译为build目录中的 JavaScript 代码。
(可选)在开发过程中检测更改并自动构建:
npm run watch
执照
该项目根据[输入许可信息]许可证分发。
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
为 AI 助手提供探索和与 MariaDB 数据库交互的工具,允许他们列出数据库、查看表格、检查模式定义和查询数据。
Related MCP Servers
- Asecurity-licenseAqualityAllows AI assistants to list tables, read data, and execute SQL queries through a controlled interface, making database exploration and analysis safer and more structured.Last updated -898MIT License
- -security-license-qualityEnables AI assistants to interact with Metabase databases and dashboards, allowing users to list and execute queries, access data visualizations, and interact with database resources through natural language.Last updated -71
- -security-license-qualityEnables AI assistants to interact with Metabase, providing access to dashboards, questions, databases, and tools for executing queries and viewing data through natural language.
- -security-license-qualityEnables AI assistants to interact with MariaDB databases through standard SQL operations and advanced vector/embedding-based search. Supports database management, schema inspection, and semantic document storage and retrieval with multiple embedding providers.Last updated -MIT License