Get the FREE Ultimate OpenClaw Setup Guide →

DBJavaGenix

智能数据库代码生成工具基于MCP架构,支持MySQL等多种数据库,自动生成Entity、DAO、Service及Controller等完整分层代码,大幅提升开发效率。依托MCP协议,具备强大扩展与集成能力,可智能推断表关系与业务语义。集成Mustache、MapStruct和Lombok,实现跨语言生成、高效映射和代码简化,并提供依赖自动管理,保障项目稳定。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zhaoxingpeng-dbjavagenix npx -y dbjavagenix-mcp-server

How to use

DBJavaGenix is an MCP server that acts as an intelligent Java code generator driven by database schema analysis. It exposes a set of MCP tools for connecting to databases, inspecting table structures, and rendering complete Java project code from templates (Default, MybatisPlus, and MybatisPlus-Mixed). You can prompt the MCP client with details about your database (type, host, database name, credentials) and desired code generation options (table names, package name, author, and included features like Swagger, Lombok, and MapStruct). Available MCP tools include db_connect_test, db_query_tables, db_table_describe, db_table_columns, db_codegen_analyze, and db_codegen_generate, among others. These tools allow you to validate connections, inspect metadata, analyze schemas for code generation, and generate the full Java codebase accordingly. Using the server, you can rapidly produce layered Java code (Entity, DAO, Service, Controller, Mapper) with dependency management and SpringBoot project validation integrated into the generation flow.

How to install

Prerequisites:

  • Node.js 16+ and npm
  • A client capable of MCP interaction (e.g., Claude Desktop or any MCP client)

Installation steps:

  1. Install the MCP server globally via npm:
npm install -g dbjavagenix-mcp-server
  1. Configure the MCP client to include the server:
{
  "mcpServers": {
    "dbjavagenix": {
      "disabled": false,
      "timeout": 60,
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "dbjavagenix-mcp-server"]
    }
  }
}
  1. Start the MCP server:
npx dbjavagenix-mcp-server

开发者安装方式(可选):

  • 克隆仓库并在本地运行相关脚本(如需要自定义开发环境)
  • 按需安装本地依赖并执行开发启动命令

Additional notes

Tips and considerations:

  • Node.js 16+ is required; ensure your environment matches the recommended version for compatibility with templates.
  • The server supports multiple templates (Default, MybatisPlus, MybatisPlus-Mixed); choose the one that best fits your team's style and project needs.
  • When using the MCP tools, ensure your database credentials and network access are correct; use db_connect_test to verify connections before generating code.
  • For large schemas, monitor generation time and consider increasing the MCP client timeout if needed.
  • The npm package name for this server is dbjavagenix-mcp-server; you can upgrade or reinstall via npm as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers