MCP cover image
See in Github
2025-03-19

1

Github Watches

1

Github Forks

0

Github Stars

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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • modelcontextprotocol
  • Serveurs de protocole de contexte modèle

  • Mintplex-Labs
  • L'application tout-en-un desktop et Docker AI avec chiffon intégré, agents AI, constructeur d'agent sans code, compatibilité MCP, etc.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • OffchainLabs
  • Aller la mise en œuvre de la preuve de la participation Ethereum

  • n8n-io
  • Plateforme d'automatisation de workflow à code équitable avec des capacités d'IA natives. Combinez le bâtiment visuel avec du code personnalisé, de l'auto-hôte ou du cloud, 400+ intégrations.

  • huahuayu
  • Une passerelle API unifiée pour intégrer plusieurs API d'explorateur de blockchain de type étherscan avec la prise en charge du protocole de contexte modèle (MCP) pour les assistants d'IA.

    Reviews

    3 (1)
    Avatar
    user_XPz0gBpV
    2025-04-15

    The Honeycomb MCP Server by kajirita2002 is an exceptional tool for enthusiasts looking to enhance their server capabilities. It provides seamless integration and robust performance, making server management a breeze. Highly recommended for anyone seeking reliability in their MCP applications. Check it out here: https://mcp.so/server/honeycomb-mcp-server/kajirita2002