MCP.so
ログイン
M

Mybatis Mapper2sql MCP Server

@handsomestWei

基本情報

カテゴリ

データベース

トランスポート

stdio

作者

handsomestWei

投稿者

handsomestWei

Mybatis Mapper2sql MCP Server について

Automatically extract SQL statements from MyBatis mapper XML files. Support automatic mocking of SQL parameters, and support automatic connection to the database to execute SQL tests and output results.

#sql#mybatis#mapper-xml

Mybatis Mapper2sql MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mapper2sql": {
      "command": "java",
      "args": [
        "-DdbType=mysql",
        "-DjdbcDriver=com.mysql.cj.jdbc.Driver",
        "-DjdbcDriverJar=/path/to/mysql-connector-java-8.0.33.jar",
        "-DjdbcUrl=jdbc:mysql://localhost:3306/testdb",
        "-DuserName=root",
        "-Dpassword=your_password_here",
        "-jar",
        "mapper2sql-mcp-server-1.0.0.jar"
      ],
      "env": {
        "JAVA_HOME": "/path/to/jdk17",
        "PATH": "/path/to/jdk17/bin;${PATH}"
      }
    }
  }
}

Mybatis Mapper2sql MCP Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is Mybatis Mapper2sql?

A Model Context Protocol (MCP) service that extracts SQL statements from MyBatis mapper XML files, optionally mocks parameters using resultMap and JDBC type inference, and tests SQL against a database. It is aimed at developers who need deterministic SQL analysis and AI collaboration.

How to use Mybatis Mapper2sql?

—

Key features of Mybatis Mapper2sql

  • Extracts SQL from MyBatis mapper XML files
  • Automatically mocks SQL parameters based on type inference
  • Tests extracted SQL by connecting to a real database
  • Uses MyBatis’s official parsing engine for deterministic results
  • Supports multiple database types

Use cases of Mybatis Mapper2sql

  • Quickly reviewing SQL structure from mapper files without parameter details
  • Generating executable SQL with mocked parameters for offline analysis
  • Validating SQL correctness by running it against a live database

よくある質問

1

What databases does Mybatis Mapper2sql support?

It supports multiple database types through JDBC connections.

2

What input does Mybatis Mapper2sql require?

The server expects a file path to a mapper XML file or a directory containing such files.

3

What tools does Mybatis Mapper2sql provide?

Three tools: `parse_mapper` (basic extraction), `parse_mapper_and_mock` (extraction with parameter mocking), and `parse_mapper_and_run_test` (extraction, mocking, and execution).

4

How does Mybatis Mapper2sql mock parameters?

It automatically generates SQL parameters based on resultMap definitions and JDBC type inference.

コメント

「データベース」の他のコンテンツ