Sponsored by Deepsite.site

Popmelt MCP Component Generation Tools

Created By
avantjohn9 months ago
Content

Popmelt MCP Component Generation Tools

This repository provides tools for generating dynamically styled React components using the Popmelt Model Context Protocol (MCP) through natural language commands.

What's Included

  1. MCP Cursor Integration: Generate components directly in Cursor using natural language commands
  2. Frontend Sandbox: A web-based sandbox for testing component generation
  3. Command-line Tools: Scripts for generating components from the command line

Prerequisites

Getting Started

1. Start the MCP Server

First, ensure the MCP server is running:

npm run dev

This will start the server at http://localhost:3000.

2. Choose Your Tool

A. Use the Frontend Sandbox

The frontend sandbox provides a visual way to test component generation:

# Navigate to the sandbox directory
cd sandbox

# Install dependencies and start the sandbox
npm install
npm start

This will open the sandbox in your browser, where you can:

  • Enter natural language commands to generate components
  • See live previews of generated components
  • Copy TypeScript and CSS code for your own projects
  • Save a history of generated components

See the Sandbox README for more details.

B. Use the Cursor Integration

The Cursor integration allows you to generate components directly from within the Cursor editor:

  1. Install the integration:

    node setup-cursor-mcp.js
    
  2. Use in Cursor:

    • Press Cmd+Shift+G (Mac) or Ctrl+Shift+G (Windows/Linux)
    • Type: "create a button component with olivia gray"
    • The component will be generated and opened in Cursor

See the Cursor MCP README for more details.

C. Use the Command Line Tools

You can also generate components directly from the command line:

# Using the NLP generator
node cursor-nlp-component-generator.js "create a button component with olivia gray"

# Using the simpler generator
node generate-component.js button olivia-gray

Natural Language Commands

The system understands various phrasings:

  • "create a button component with olivia gray"
  • "generate a card component using olivia"
  • "make me a text component with gray style"

Supported Component Types

  • button: Interactive button components
  • card: Card containers for content
  • heading: Text headings in various sizes
  • text: General text elements
  • input: Form input elements
  • nav: Navigation components
  • badge: Badge indicator elements
  • modal: Modal dialog components
  • alert: Alert message components
  • table: Data table components

Supported Profiles

Currently supports:

  • "olivia gray" (default if none specified)

Generated Components

All components are generated with:

  • TypeScript interfaces for props
  • Modern React functional components
  • Proper typing for all props
  • Consistent directory structure

Example component usage:

import React from 'react';
import Button from './components/Button';

function App() {
  return (
    <div className="app">
      <h1>My Application</h1>
      <Button variant="primary" onClick={() => alert('Clicked!')}>
        Click Me
      </Button>
    </div>
  );
}

export default App;

Troubleshooting

If you encounter issues:

  1. Make sure the MCP server is running at http://localhost:3000
  2. Check for error messages in the console or terminal
  3. Try using different phrasing in your natural language commands
  4. Ensure you're specifying a component type in your command

Project Structure

/
├── cursor-mcp-nlp-integration.js    # Core NLP integration library
├── cursor-nlp-component-generator.js # NLP command line tool
├── cursor-prompt-commands.js        # Cursor prompt command handler
├── cursor-nlp-extension.json        # Cursor extension configuration
├── cursor-nlp-keymap.json           # Keyboard shortcuts for Cursor
├── setup-cursor-mcp.js              # Cursor integration setup script
├── CURSOR-MCP-MAIN-README.md        # Detailed Cursor integration docs
├── sandbox/                         # Frontend sandbox
│   ├── index.html                   # Sandbox HTML
│   ├── styles.css                   # Sandbox styles
│   ├── sandbox.js                   # Sandbox functionality
│   ├── setup.js                     # Sandbox setup script
│   └── README.md                    # Sandbox documentation
└── README.md                        # This file

License

MIT

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Playwright McpPlaywright MCP server
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
DeepChatYour AI Partner on Desktop
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
ChatWiseThe second fastest AI chatbot™
CursorThe AI Code Editor
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
WindsurfThe new purpose-built IDE to harness magic
Serper MCP ServerA Serper MCP Server
Tavily Mcp
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.