npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fu-orm-code-generator

v1.0.11

Published

A Model Context Protocol (MCP) server for MyBatis code generation with enterprise-grade layered architecture

Downloads

18

Readme

Fu ORM Code Generator

A Model Context Protocol (MCP) server for MyBatis code generation with enterprise-grade layered architecture.

Features

  • 🚀 Batch Code Generation: Generate ORM code for multiple database tables at once
  • 🏗️ Enterprise Architecture: Built with layered architecture and dependency injection
  • 🔄 Smart Conversion: Automatically converts database field names (snake_case) to Java property names (camelCase)
  • 📋 Template Support: Multiple code generation templates including MyBatis Plus and enterprise patterns
  • 🎯 Type Mapping: Comprehensive database type to Java type mapping
  • 📝 Rich Documentation: Generated code includes complete Javadoc comments

Installation

npm install -g fu-orm-code-generator

Usage

This MCP server provides tools for generating MyBatis ORM code. It's designed to work with MCP-compatible clients like Claude Desktop.

Available Tools

  1. generate_orm_code: Batch generate ORM code from database table structures
  2. visit_online_templates: Browse available online templates
  3. download_online_template: Download templates from remote server
  4. choose_local_template: Select a local template for code generation
  5. visit_local_templates: View locally available templates
  6. set_user_info: Configure user information for code comments
  7. get_user_info: View current user configuration

Example Usage

// Generate ORM code for multiple tables
{
  "basePackage": "com.example.project",
  "mainSourceDirectory": "/path/to/project/src/main/java",
  "tables": [
    {
      "tableName": "user_info",
      "remark": "User information table",
      "fields": [
        {
          "fieldName": "id",
          "dataType": "BIGINT",
          "remark": "User ID"
        },
        {
          "fieldName": "user_name",
          "dataType": "VARCHAR",
          "remark": "Username"
        }
      ]
    }
  ]
}

Generated Code Structure

For a table named user_info, the generator creates:

  • Entity: com.example.entity.UserInfo.java
  • Mapper: com.example.mapper.UserInfoMapper.java
  • Repository: com.example.repository.IUserInfoRepository.java
  • Service: com.example.service.IUserInfoService.java
  • Controller: com.example.controller.UserInfoController.java

Type Mappings

| Database Type | Java Type | |---------------|-----------| | TINYINT, SMALLINT, INT, INTEGER | java.lang.Integer | | BIGINT | java.lang.Long | | FLOAT, DOUBLE, DECIMAL, NUMERIC | java.math.BigDecimal | | CHAR, VARCHAR, TEXT, etc. | java.lang.String | | DATE, TIME, DATETIME, TIMESTAMP | java.lang.String | | BOOLEAN, BOOL, BIT | java.lang.Boolean |

Configuration

The server stores configuration in data/config.json and supports:

  • Template selection
  • User information (author name and email)
  • Custom template directories

Templates

Two built-in templates are available:

  1. mybatis_plus: Standard MyBatis Plus template
  2. 期货管理平台(无需审批): Enterprise futures management platform template

Architecture

The project follows a clean layered architecture:

  • Presentation Layer: MCP tool handlers
  • Application Layer: Business logic services
  • Domain Layer: Core entities and repository interfaces
  • Infrastructure Layer: Concrete implementations

Requirements

  • Node.js >= 16.0.0
  • MCP-compatible client (e.g., Claude Desktop)

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.