Skip to main content
Glama
moosin76

MariaDB Reader MCP Server

by moosin76

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)。

Related MCP server: MCP MariaDB Server

环境

要使用此服务器,您需要克隆 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

执照

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

Available Tools

4 tools
get_table_schemaB

특정 테이블의 스키마(컬럼 정의)를 가져옵니다.

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYes데이터베이스의 이름입니다.
tableYes테이블의 이름입니다.

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it implies a read operation ('가져옵니다' - retrieves), it lacks details on permissions, rate limits, error handling, or response format. For a tool with no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (2 required parameters, no output schema) and high schema coverage, the description is minimally adequate. However, it lacks behavioral context (e.g., permissions, errors) and does not reference sibling tools, which could improve completeness for agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters ('database' and 'table') clearly documented in the input schema. The description does not add any additional meaning beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when the schema handles parameter documentation effectively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '특정 테이블의 스키마(컬럼 정의)를 가져옵니다' translates to 'Retrieves the schema (column definitions) of a specific table.' This specifies the verb ('가져옵니다' - retrieves) and resource ('스키마' - schema). However, it does not explicitly differentiate from sibling tools like 'list_tables' or 'query_table', which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools like 'list_databases', 'list_tables', or 'query_table', nor does it specify prerequisites or contexts for usage. This leaves the agent without explicit direction on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_databasesB

접근 가능한 모든 데이터베이스 목록을 보여줍니다.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states the tool shows a list, implying a read-only operation, but does not disclose any behavioral traits such as permissions required, rate limits, pagination, or what 'accessible' entails. The description is minimal and lacks critical operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without unnecessary details. It is appropriately concise and front-loaded, though it could be slightly more informative to improve completeness without sacrificing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. However, it lacks details on behavioral aspects like what 'accessible' means or how the list is formatted, which would be helpful for an agent. The absence of an output schema means the description should ideally hint at the return format, but it does not.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description does not need to add parameter semantics, so it meets the baseline for tools with no parameters. No additional parameter information is required or provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '접근 가능한 모든 데이터베이스 목록을 보여줍니다' (shows a list of all accessible databases). It specifies the verb '보여줍니다' (shows) and the resource '데이터베이스 목록' (database list), but does not explicitly differentiate it from sibling tools like 'list_tables' or 'get_table_schema'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention any prerequisites, context for usage, or comparisons with sibling tools such as 'list_tables' or 'query_table', leaving the agent to infer usage based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_tablesC

특정 데이터베이스 내의 모든 테이블 목록을 보여줍니다.

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYes데이터베이스의 이름입니다.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool shows table lists but doesn't describe return format (e.g., array of names, pagination), permissions required, rate limits, or error conditions. This leaves significant gaps for a tool that likely interacts with a database system.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Korean that directly states the tool's function. There's no wasted wording, though it could be slightly more structured (e.g., by front-loading the core action more explicitly).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a database tool. It doesn't explain what the output looks like (e.g., list format, metadata included), error handling, or behavioral constraints. For a tool with one parameter but potentially complex database interactions, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single 'database' parameter thoroughly. The description adds no additional parameter semantics beyond implying the tool operates within a database context, which is already clear from the schema. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: '보여줍니다' (shows/displays) + '모든 테이블 목록' (all table list) + '특정 데이터베이스 내의' (within a specific database). It specifies the verb (show/list), resource (tables), and scope (within a database), though it doesn't explicitly differentiate from sibling tools like 'list_databases' or 'get_table_schema'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_databases' (for listing databases instead of tables) or 'get_table_schema' (for detailed table info), nor does it specify prerequisites or exclusions for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

query_tableC

특정 테이블에서 데이터를 조회합니다 (제한된 행 반환).

ParametersJSON Schema
NameRequiredDescriptionDefault
databaseYes데이터베이스의 이름입니다.
limitNo반환할 최대 행 수 (기본값 100).
tableYes테이블의 이름입니다.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'limited rows returned', which hints at a constraint, but fails to cover critical aspects like read-only status, potential permissions needed, error handling, or response format. This is inadequate for a query tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Korean that directly states the tool's purpose and a key constraint ('limited rows returned'). It is front-loaded with no wasted words, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a database query tool with no annotations and no output schema, the description is insufficient. It lacks details on behavior, error cases, return values, and usage context, leaving significant gaps for an agent to operate effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters ('database', 'table', 'limit') with clear descriptions. The description adds no additional meaning beyond what the schema provides, such as query syntax or examples, resulting in a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('query_table' translates to 'retrieve data from a specific table') and the resource ('table'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_table_schema' (which might return metadata) or 'list_tables' (which lists tables rather than querying data), missing full sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_table_schema' or 'list_tables'. It mentions 'limited rows returned', but this doesn't clarify usage context, exclusions, or prerequisites, leaving the agent without explicit direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 4 tool updatesv1.0.0
    • First observedget_table_schema
    • First observedlist_databases
    • First observedlist_tables
    • First observedquery_table

TDQS

B3.4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: get_table_schema retrieves column definitions, list_databases shows available databases, list_tables enumerates tables within a database, and query_table fetches data from a table. The descriptions clearly differentiate their functions, making misselection unlikely.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with snake_case (e.g., get_table_schema, list_databases, list_tables, query_table). The naming is predictable and readable throughout the set, with no deviations in style.

Tool Count4/5

With 4 tools, the count is reasonable for a database reader server, but it feels slightly thin for covering all typical read operations. While core functions are present, additional tools like querying across tables or advanced filtering might enhance completeness without being excessive.

Completeness3/5

The tool set covers basic read operations (list databases, list tables, get schema, query data), but there are notable gaps for a database reader. Missing operations include querying with custom SQL, joining tables, or advanced filtering, which could limit agent capabilities in complex scenarios.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with MariaDB databases through SQL operations and vector-based semantic search. Supports standard database queries, schema inspection, and optional embedding-powered document storage and retrieval.
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with MariaDB databases through schema exploration, query execution, and database statistics. Includes security features like read-only mode, parameterized queries, and connection pooling with support for both JSON and Markdown output formats.
    -
  • A
    license
    B
    quality
    C
    maintenance
    Enables AI assistants to securely interact with MariaDB and MySQL databases using granular per-connection read/write permissions and transaction support. It allows users to manage multiple database connections, explore schemas, and execute controlled SQL queries through a standardized interface.
    6
    21 npm
    5
    MIT