Popmelt MCP Server
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Integrations
Uses environment configuration for database connection details and server settings
Enables generation of CSS styling rules based on Talent profiles, allowing dynamic styling of UI components with support for component-specific styles and state variations
Runs on Node.js 18 or higher as a prerequisite for server operation
Popmelt MCP Server
An MCP (Model Context Protocol) server for Popmelt, providing access to Talent AI and Taste Profiles for dynamic UI component styling.
Overview
The Popmelt MCP Server leverages the Model Context Protocol to expose Talent AI profiles and styling capabilities to LLMs and other applications. It connects directly to Popmelt's PostgreSQL database to access and serve detailed Talent profiles, including structured metadata and weighted styling attributes.
Features
- Talent AI Profile Access: Retrieve complete Talent profiles with their unique aesthetic characteristics and design attributes
- CSS Styling Generation: Generate CSS styling rules directly from stored metadata
- Dynamic UI Component Styling: Easily integrate Talent-driven design choices into your UI components
- Database Integration: Direct connection to PostgreSQL database where Talent profiles are stored
- Multiple Transport Options: Run the server using stdio for command-line tools or HTTP with SSE for remote servers
Project Structure
Database Schema
The Popmelt MCP Server uses a PostgreSQL database with the following schema:
Where the metadata
JSON field has the following structure:
Getting Started
Prerequisites
- Node.js 18 or higher
- PostgreSQL database
Installation
- Clone this repository
- Install dependencies:Copy
- Copy the example environment file and update with your database details:Copy
- Set up the database:Copy
- Build the TypeScript code:Copy
Running the Server
Two server modes are available:
- Standard stdio mode (for command-line tools and direct integration):
- HTTP server with SSE support (for remote access and web integration):
The HTTP server provides:
- An SSE endpoint at
/sse
for receiving real-time updates - A POST endpoint at
/messages
for sending commands - A health check endpoint at
/health
API Reference
Resources
The server exposes the following MCP resources:
Resource URI | Description |
---|---|
talent://list | List all available talent profiles |
talent://{id} | Get a specific talent profile by ID |
talent-attribute://{id}/{attribute} | Get a specific attribute of a talent (supports dot notation for nested properties) |
component-style://{talent_id}/{component_name} | Get CSS for a specific component using a talent profile |
Tools
The server provides the following MCP tools:
Tool Name | Description | Arguments |
---|---|---|
generate-css | Generate CSS for a component based on a talent profile | talentId , component , state (optional), customProperties (optional) |
generate-component-library | Generate CSS for a complete component library | talentId |
query-talents | Perform a read-only query on talent metadata | filters |
analyze-style-compatibility | Analyze compatibility between different talent styles | talentId1 , talentId2 |
Prompts
The server offers the following MCP prompts:
Prompt Name | Description | Arguments |
---|---|---|
style-component | LLM prompt for styling a component | talentId , component , requirements (optional) |
create-talent-description | LLM prompt for creating a descriptive summary of a talent | talentId |
recommend-talent | LLM prompt for recommending talents based on requirements | projectType , brandPersonality , targetAudience , aestheticPreferences (optional) |
Example Usage
Using the MCP Client
Running the Example Script
This example script demonstrates how to use the MCP client to generate CSS for all available talents and analyze compatibility between two talents.
Development
Building the Project
Running in Development Mode
License
MIT
This server cannot be installed
An MCP server that provides access to Talent AI profiles and styling capabilities for dynamic UI component styling, connecting to PostgreSQL to serve detailed talent profiles with aesthetic characteristics and design attributes.