MariaDB Reader MCP Server

by moosin76

Integrations

  • Enables database exploration and interaction with MariaDB databases, providing tools to list databases, view tables, retrieve table schemas, and query table data with customizable limits.

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 ),不需要单独的构建步骤。

  1. **克隆存储库:**将此存储库克隆到您选择的位置。
    git clone https://github.com/moosin76/mcp_server_mariadb_reader.git
  2. 修改MCP设置文件:

示例设置:

{ "mcpServers": { "mcp_server_mariadb_reader": { "command": "node", "args": ["<클론된 저장소 경로>/build/index.js"], // 클론된 저장소 내 build/index.js 파일 경로 "env": { "MARIADB_HOST": "YOUR_DB_HOST", // MariaDB 호스트 주소 "MARIADB_PORT": "YOUR_DB_PORT", // MariaDB 포트 번호 (예: "3306") "MARIADB_USER": "YOUR_DB_USER", // MariaDB 사용자 이름 "MARIADB_PASSWORD": "YOUR_DB_PASSWORD", // MariaDB 비밀번호 "MARIADB_DATABASE": "YOUR_DEFAULT_DB" // (선택) 기본 데이터베이스 이름 }, "disabled": false, "autoApprove": [] } // 다른 MCP 서버 설정... } }

警告:

  • 您需要将<클론된 저장소 경로>部分更改为您实际克隆存储库的本地路径。 (例如C:/Users/YourUser/Documents/GitHub/mcp_server_mariadb_reader
  • 您需要修改env对象中的 MariaDB 连接信息以匹配您的实际环境。

开发(修改源代码时)

该存储库包含构建的文件,因此您无需按照以下步骤使用服务器。要直接修改源代码( src目录)并应用更改,请按照以下步骤操作:

  1. 安装依赖项(第一次或更改package.json时):
    npm install
  2. 修复后构建:
    npm run build
    • 此命令将src目录中的 TypeScript 代码编译为build目录中的 JavaScript 代码。
  3. (可选)在开发过程中检测更改并自动构建:
    npm run watch

执照

该项目根据[输入许可信息]许可证分发。

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

为 AI 助手提供探索和与 MariaDB 数据库交互的工具,允许他们列出数据库、查看表格、检查模式定义和查询数据。

  1. 기능
    1. 설정
      1. 개발 (소스 코드 수정 시)
        1. 라이선스

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            Allows 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 -
            1
            360
            Python
            MIT License
            • Linux
            • Apple
          • A
            security
            A
            license
            A
            quality
            This server enables AI models to interact with MySQL databases through a standardized interface.
            Last updated -
            5
            618
            58
            JavaScript
            MIT License
            • Linux
            • Apple
          • -
            security
            F
            license
            -
            quality
            Enables 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 -
            9
            JavaScript
            • Apple
          • -
            security
            F
            license
            -
            quality
            Enables AI assistants to interact with Metabase, providing access to dashboards, questions, databases, and tools for executing queries and viewing data through natural language.
            Last updated -
            JavaScript
            • Apple

          View all related MCP servers

          ID: w38r2tn7t6