mcp-config-generator

KayMas2808/mcp-config-generator

3.2

If you are the rightful owner of mcp-config-generator and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

An MCP server that generates UI configuration JSON from natural language prompts, perfect for creating form configurations, analyzing requirements, and validating JSON structures using simple English descriptions.

Tools
3
Resources
0
Prompts
0

MCP Config Generator

An MCP server that generates UI configuration JSON from natural language prompts. Perfect for creating form configurations, analyzing requirements, and validating JSON structures using simple English descriptions.

This will need to be updated as more UI config JSON examples are found, or when the renderer is complete, so all possible rules and inputs are known. It is currently based on a single example I could find.

Features

  • Natural Language Processing - Generate UI configurations for from simple English prompts
  • CLI & MCP Integration - Use directly in terminal or integrate with Cursor/other MCP clients
  • Configuration Validation - Validate existing JSON configurations
  • Requirement Analysis - Parse and analyze prompts without full generation

Quick Start

Installation

# Clone and install locally
git clone https://github.com/KayMas2808/mcp-config-generator.git
cd mcp-config-generator
npm install
npm run build

# For using globally in the terminal
npm install -g

CLI Usage

Once installed globally, you can use the tool from anywhere:

# Generate a form configuration
config-gen generate "Create a contact form with Name, Email, and Phone"

# Analyze a prompt
config-gen analyze "Student registration form with Name, Roll Number, Amount"

# Validate a configuration
config-gen validate '{"data": {"configName": "test"}, "username": "place", "password": "holder"}'

# Get help
config-gen --help

Local Usage (without global install)

# Generate a form
node cli.js generate "Create an employee form with Name, Email, Phone, Salary"

# Or use npm scripts
npm run gen "Create a form with Name and Email"
npm run analyze "Student registration form"

Cursor Integration

Step 1: Install the Package

# do this in a terminal window rather than in cursor,
# since you will have to restart cursor after changing the mcp.json file.
git clone https://github.com/KayMas2808/mcp-config-generator.git
cd mcp-config-generator
npm install
npm run build
# run this every time you want to use the tools in cursor
npm start

Step 2: Configure Cursor MCP Settings

  1. Open Cursor Settings (Cmd+, or Cursor → Settings)
  2. Search for "MCP" in the settings search
  3. Find "Mcp: Config" section
  4. Add this configuration:
{
  "mcpServers": {
    "config-generator": {
      "command": "/opt/homebrew/bin/node", // your node path - run "which node"
      "args": ["/path/to/your/mcp-config-generator/dist/index.js"],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

Step 4: Restart Cursor

After saving the configuration, restart Cursor completely for the changes to take effect.

Step 5: Use in Cursor Chat

@config-generator generate a form to capture employee Name, Email, Phone, and Salary
@config-generator analyze "Create a student registration form"
@config-generator validate {"data": {...}, "username": "place", "password": "holder"}

Available Commands

CLI Commands

CommandDescriptionExample
generateGenerate UI configuration from promptconfig-gen generate "Contact form with Name, Email"
analyzeAnalyze prompt and show requirementsconfig-gen analyze "Student registration form"
validateValidate configuration JSONconfig-gen validate '{"data": {...}}'

CLI Options

OptionDescriptionDefault
--usernameUsername for configuration"place"
--passwordPassword for configuration"holder"
--helpShow help message-

MCP Tools (available in Cursor)

ToolDescription
generate_configGenerate complete UI configuration JSON
analyze_promptParse requirements without full generation
validate_configValidate configuration structure

Usage Examples

Basic Form Generation

config-gen generate "Create a simple contact form with Name, Email, and Phone"

Output: Complete JSON configuration with form fields, validation, and UI structure.

Advanced Form with Custom Settings

config-gen generate "Student registration form with Name, Roll Number, Email, and Fee Amount" --username admin --password secret123

Requirement Analysis

config-gen analyze "Create a conference registration form with Name, Email, Company, and Registration Fee"

Output: Detailed breakdown of detected fields, validation rules, and form structure.

Configuration Validation

config-gen validate '{"data": {"configName": "test_form", "json": {...}}, "username": "obiwan", "password": "kenobi"}'

Project Structure

mcp-config-generator/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts          # MCP server implementation
│   ā”œā”€ā”€ generator.ts      # Configuration generation logic
│   ā”œā”€ā”€ parser.ts         # Natural language parsing
│   └── types.ts          # Type definitions
ā”œā”€ā”€ dist/                 # Compiled JavaScript
ā”œā”€ā”€ cli.js               # CLI interface
ā”œā”€ā”€ examples/            # Example prompts and configurations
└── package.json

Requirements

  • Node.js >= 18.0.0
  • npm >= 8.0.0

Possible Issues

"0 tools enabled" in Cursor:

  • Ensure Node.js path is absolute in MCP configuration
  • Verify the project is built (npm run build)
  • Restart Cursor after configuration changes

CLI command not found:

  • Install globally from project root: npm install -g
  • Or use local: npm run cli or node cli.js

Permission errors:

  • Make CLI executable: chmod +x cli.js
  • Check Node.js permissions

Getting Help

# Show detailed help
config-gen --help

# Check version
config-gen --version