Popmelt MCP Server

Popmelt MCP Server

site icon
2025.03.24 0
TypeScript动态 UI 组件样式设计Talent AI 配置文件访问CSS 样式生成开发效率内容生成
Popmelt MCP Server 是一个基于 Model Context Protocol (MCP) 的服务器,主要用于访问 Talent AI 和 Taste Profiles,以支持动态 UI 组件的样式设计。该服务器通过直接连接 PostgreSQL 数据库,提供详细的 Talent 配置文件,包括结构化元数据和加权样式属性。
View on GitHub

Overview

基本能力

产品定位

Popmelt MCP Server 是一个用于动态 UI 组件样式设计的 MCP 服务器,主要用于访问 Talent AI 和 Taste Profiles,支持 CSS 样式生成和动态 UI 组件样式集成。

核心功能

  • Talent AI Profile Access: 检索完整的 Talent 配置文件,包括其独特的美学特征和设计属性。
  • CSS Styling Generation: 从存储的元数据直接生成 CSS 样式规则。
  • Dynamic UI Component Styling: 轻松将 Talent 驱动的设计选择集成到 UI 组件中。
  • Database Integration: 直接连接到存储 Talent 配置文件的 PostgreSQL 数据库。
  • Multiple Transport Options: 支持 stdio 和 HTTP/SSE 两种传输模式。

适用场景

  • 动态 UI 组件样式设计
  • Talent AI 配置文件访问和集成
  • CSS 样式生成

工具列表

  • generate-css: 基于 Talent 配置文件生成组件的 CSS。
  • generate-component-library: 生成完整组件库的 CSS。
  • query-talents: 对 Talent 元数据执行只读查询。
  • analyze-style-compatibility: 分析不同 Talent 样式之间的兼容性。

常见问题解答

  • 如何启动服务器? 使用 npm start 启动 stdio 模式,或使用 npm run start:http 启动 HTTP/SSE 模式。
  • 如何生成 CSS? 使用 generate-css 工具,传入 talentIdcomponent 参数。

使用教程

使用依赖

  • Node.js 18 或更高版本
  • PostgreSQL 数据库

安装教程

  1. 克隆仓库
  2. 安装依赖: npm install
  3. 复制环境文件并更新数据库信息: cp .env.example .env
  4. 设置数据库: node scripts/setup-db.js
  5. 构建 TypeScript 代码: npm run build

调试方式

  • 启动 stdio 模式: bash npm start
  • 启动 HTTP/SSE 模式: bash npm run start:http
  • 检查健康状态: bash curl http://localhost:3000/health

许可证

该项目遵循 MIT 开源许可条款。