Token导航 LogoToken导航

MCP Server · 开发工具

Bernova MCP

Bernova MCP Server 是一个用于管理 Bernova CSS-in-JS 库样式的服务器,提供配置管理、样式编译、组件管理和CSS变量管理等功能,适用于前端开发场景。

stdio官方级别未说明来源级核验工具 17bernova-mcp
开发工具TypeScriptClaudeClaude DesktopClineVS Code

快速开始

作者 / 组织
devchemical
提供方
devchemical
运行时
Node.js

工具数量

17

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

1

仓库热度

收录来源

1 个

MCP World

选型结论

Bernova MCP 属于开发工具类 MCP Server,公开资料标注 17 个工具,通过stdio 本地进程接入,适配 Claude Desktop、Claude、Cline,有可以直接复制的安装命令;接入前先确认权限范围。

分类

开发工具

传输方式

stdio

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

安装命令

npx bernova-mcp

客户端配置示例

{
  "mcpServers": {
    "bernova-mcp": {
      "command": "npx",
      "args": [
        "bernova-mcp"
      ]
    }
  }
}

按公开安装命令拼出来的示例,字段名和参数以仓库 README 为准;带 YOUR_API_KEY 这类占位符的位置记得换成自己的值。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 17 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

Bernova MCP服务器

模型上下文协议(MCP)服务器 伯诺娃 -JS中的CSS库,允许AI代理以编程方式与Bernova样式交互和管理。

⚡ 现在针对Bun进行了优化! 安装速度快3倍,启动速度快10倍。看 BUN_GUIDE.md 了解详情。

支持的IDE

  • ✅ 克劳德桌面 -Anthropic的桌面应用程序
  • ✅ VS Code -使用Cline扩展
  • ✅ 光标 -AI第一代码编辑器
  • ✅ 帆板运动 -Codeium的集成开发环境
  • ✅ 泽德 -高性能编辑器
  • ✅ 任何兼容MCP的IDE

看 CLAUDE_DESKTOP_SETUP.md 详细的IDE配置。

特性

  • 配置管理:创建、读取和更新Bernova配置
  • 风格汇编:编译不同模式的样式(完整、仅基础、仅组件)
  • 组件管理:创建、读取、更新和删除样式化组件
  • CSS变量:添加和更新CSS自定义属性(基础)
  • 媒体查询:管理响应断点
  • 验证:编译前验证样式
  • TypeScript支持:全类型安全和自动完成

安装

使用Bun(推荐)

bun add bernova-mcp

或全局安装:

bun add -g bernova-mcp

使用npm

npm install bernova-mcp

快速开始

1.在您的项目中安装Bernova

# Using Bun (recommended)
bun add bernova

# Using npm
npm install bernova

2.运行MCP服务器

# Using Bun
bunx bernova-mcp

# Using npx
npx bernova-mcp

3.配置IDE

请参阅中所有支持的IDE的完整设置指南 CLAUDE_DESKTOP_SETUP.md.

Claude Desktop的快速示例:

使用Bun(推荐):

{
  "mcpServers": {
    "bernova": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/bernova-mcp/dist/index.js"]
    }
  }
}

## Available Tools

### Configuration Tools

#### `get_config`
Get the current Bernova configuration from `bernova.config.json`.

// No parameters required


**答复:**

{ "success": true, "data": { "provider": { ... }, "themes": [ ... ] }, "message": "Configuration loaded successfully" }


#### `create_config`

使用默认值创建新的Bernova配置文件。

{ themeName?: string // Default: "default" }


**例子:**

{ "themeName": "dark-theme" }


#### `update_config`

更新Bernova配置(合并或替换)。

{ config: BernovaConfig, // Partial or complete config merge?: boolean // Default: true }


**例子:**

{ "config": { "themes": [ { "name": "dark", "stylesPath": "./src/styles/dark" } ] }, "merge": true }


#### `list_themes`

列出所有可用的主题。

// No parameters required


**答复:**

{ "success": true, "data": ["default", "dark", "light"], "message": "Found 3 theme(s)" }


______________________________________________________________________

### 编译工具

#### `compile_styles`

使用不同模式编译Bernova样式。

{ mode?: "full" | "foundationOnly" | "componentOnly" // Default: "full" }


**例子:**

{ "mode": "full" }


**模式:**

- `full`:编译基础+组件
- `foundationOnly`:仅编译CSS变量和基本样式
- `componentOnly`:仅编译组件类

#### `build_styles`

具有自定义选项的高级构建。

{ baseOutDir?: string, minifyJs?: boolean, embedCss?: boolean, types?: ("cjs" | "esm")[] }


**例子:**

{ "baseOutDir": "./dist", "minifyJs": true, "embedCss": true, "types": ["cjs", "esm"] }


______________________________________________________________________

### 组件工具

#### `create_component`

使用样式创建新组件。

{ componentName: string, styles: ComponentStyles, themeName?: string }


**例子:**

{ "componentName": "BUTTON", "styles": { "background_color": "blue", "color": "white", "padding": "10px 20px", "border_radius": "4px", "_icon": { "width": "16px", "height": "16px" }, "PRIMARY": { "background_color": "darkblue" }, "$pseudoClasses": { "hover": { "background_color": "lightblue" } } } }


#### `get_component`

获取现有组件的样式。

{ componentName: string, themeName?: string }


**例子:**

{ "componentName": "BUTTON", "themeName": "default" }


#### `update_component`

更新现有组件的样式。

{ componentName: string, styles: ComponentStyles, themeName?: string }


#### `delete_component`

删除组件。

{ componentName: string, themeName?: string }


#### `list_components`

列出主题中的所有可用组件。

{ themeName?: string }


**答复:**

{ "success": true, "data": ["BUTTON", "CARD", "INPUT"], "message": "Found 3 component(s) in theme 'default'" }


______________________________________________________________________

### CSS变量工具

#### `add_css_variable`

将CSS变量添加到基础中。

{ category: string, name: string, value: string | number, themeName?: string }


**例子:**

{ "category": "colors", "name": "primary", "value": "#0066cc" }


这将产生: `--colors-primary: #0066cc`

#### `update_css_variable`

更新现有的CSS变量。

{ category: string, name: string, value: string | number, themeName?: string }


#### `get_css_variables`

从主题中获取所有CSS变量。

{ themeName?: string }


______________________________________________________________________

### 媒体查询工具

#### `add_media_query`

添加媒体查询配置。

{ name: string, type: string, values: Record, themeName?: string }


**例子:**

{ "name": "tablet", "type": "screen", "values": { "min-width": "768px", "max-width": "1024px" } }


#### `list_media_queries`

列出主题中的所有媒体查询。

{ themeName?: string }


______________________________________________________________________

### 验证工具

#### `validate_component_styles`

在创建/更新之前验证组件样式语法。

{ styles: ComponentStyles }


**例子:**

{ "styles": { "background_color": "red", "_text": { "font-size": "16px" } } }


**答复:**

{ "success": false, "data": { "valid": false, "errors": [], "warnings": [ "Property 'font-size' should use underscores instead of hyphens" ] } }


______________________________________________________________________

## 用法示例

### 示例1:从头开始创建设计系统

AI Agent: "Create a new Bernova project with a button component"

  1. create_config({ themeName: "myapp" })
  2. add_css_variable({

category: "colors", name: "primary", value: "#007bff" })

  1. add_css_variable({

category: "spacing", name: "md", value: "16px" })

  1. create_component({

componentName: "BUTTON", styles: { background_color: "var(--colors-primary)", padding: "var(--spacing-md)", border: "none", border_radius: "4px" } })

  1. compile_styles({ mode: "full" })

### 示例2:添加响应式设计

AI Agent: "Add responsive breakpoints and make the button adapt to mobile"

  1. add_media_query({

name: "mobile", type: "screen", values: { "max-width": "767px" } })

  1. update_component({

componentName: "BUTTON", styles: { padding: "16px", $mediaQueries: { mobile: { padding: "12px", font_size: "14px" } } } })

  1. compile_styles({ mode: "componentOnly" })

### 示例3:创建组件变体

AI Agent: "Create primary and secondary button variants"

update_component({ componentName: "BUTTON", styles: { padding: "10px 20px", border_radius: "4px", PRIMARY: { background_color: "#007bff", color: "white" }, SECONDARY: { background_color: "#6c757d", color: "white" }, $pseudoClasses: { hover: { opacity: "0.9" } } } })


______________________________________________________________________

## 项目结构

bernova-mcp-server/ ├── src/ │ ├── index.ts # Main MCP server │ ├── tools/ │ │ ├── config.ts # Configuration tools │ │ ├── compile.ts # Compilation tools │ │ ├── components.ts # Component management │ │ └── variables.ts # Variables & media queries │ ├── types/ │ │ └── bernova.types.ts # TypeScript types │ └── utils/ │ ├── file-system.ts # File system utilities │ └── validators.ts # Validation utilities ├── package.json ├── tsconfig.json └── README.md


______________________________________________________________________

## Bernova风格语法参考

### 基本属性

使用下划线而不是连字符:

{ background_color: "red", // ✅ Correct font_size: "16px", // ✅ Correct // background-color: "red" // ❌ Wrong }


### 嵌套的元素

对嵌套元素(BEM)使用下划线前缀:

{ BUTTON: { padding: "10px", _icon: { // Creates .button__icon width: "16px" }, _text: { // Creates .button__text font_size: "14px" } } }


### 变体

使用大写键表示变体(BEM修饰符):

{ BUTTON: { padding: "10px", PRIMARY: { // Creates .button--primary background: "blue" }, SECONDARY: { // Creates .button--secondary background: "gray" } } }


### 伪类

使用 `$pseudoClasses` 为了 `:hover`, `:focus`等等:

{ $pseudoClasses: { hover: { background_color: "darkblue" }, focus: { outline: "2px solid blue" } } }


### 伪元素

使用 `$pseudoElements` 为了 `::before`, `::after`:

{ $pseudoElements: { before: { $content: '""', display: "block" } } }


### 媒体查询

使用 `$mediaQueries` 具有配置的断点:

{ width: "100%", $mediaQueries: { mobile: { width: "90%" }, tablet: { width: "80%" } } }


### 属性

使用 `$attributes` 对于属性选择器:

{ $attributes: { "data-active": { background_color: "green" } } }


### 高级选择器

使用 `$advancedSelector` 对于后代、子代、兄弟姐妹选择器:

{ $advancedSelector: [ { descendant: { $target: "span", color: "red" } }, { child: { $target: "p", font_size: "14px" } } ] }


### 动态值

使用 `$dynamicValues` 对于运行时CSS变量:

{ $dynamicValues: ["$bgColor", "$textColor"], background_color: "$bgColor", color: "$textColor" }


______________________________________________________________________

## TypeScript类型

服务器提供完整的TypeScript支持:

import type { BernovaConfig, ComponentStyles, CSSProperties } from 'bernova-mcp-server';


______________________________________________________________________

## 错误处理

所有工具都返回一致的响应格式:

{ success: boolean, data?: any, error?: string, message?: string }


**成功:**

{ "success": true, "data": { ... }, "message": "Operation completed successfully" }


**错误:**

{ "success": false, "error": "Component 'BUTTON' not found" }


______________________________________________________________________

## 发展

### 构建

npm run build


### 观看模式

npm run dev


### 在本地运行

npm start


______________________________________________________________________

## 需求

- Node.js>=20.0.0
- 伯诺瓦>=1.3.2
- Bernova项目 `bernova.config.json`

______________________________________________________________________

## 贡献

欢迎投稿!请随时提交拉取请求。

______________________________________________________________________

## 许可证

麻省理工学院

______________________________________________________________________

## 相关项目

- [伯诺娃](https://github.com/kubit-ui/bernova) -JS库中的CSS
- [MCP-SDK](https://github.com/modelcontextprotocol/sdk) -模型上下文协议SDK

______________________________________________________________________

## 支持

对于问题和疑问:

- Bernova问题:https://github.com/kubit-ui/bernova/issues
- MCP服务器问题:在此存储库中创建问题

______________________________________________________________________

## 更新日志

### 版本1.0.0

- 初始版本
- 用于Bernova交互的15+MCP工具
- 完全支持TypeScript
- 验证实用程序
- 配置管理
- 组件CRUD操作
- CSS变量管理
- 媒体查询支持
- 样式编译工具

工具与能力

工具数量

17

资源数量

0

提示词数量

0

能力标签

CSS-in-JSTypeScript本地部署样式管理前端开发组件管理CSS变量

支持客户端

Claude DesktopClaudeClineVS Code

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 工具数量 17 个,一次接入能覆盖的操作比单点工具更全。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude Desktop、Claude、Cline,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 Node.js,换机器要重新装一遍。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Bernova MCP

MCP World · 本页

17stdio有1 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Bernova MCP 怎么安装?

公开资料给出的安装命令是 npx bernova-mcp,运行环境为 Node.js。装完后按客户端要求写进 MCP 配置,重启客户端生效。

Bernova MCP 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Node.js;保存后完全退出客户端再打开,配置才会生效。

Bernova MCP 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Bernova MCP 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Bernova MCP 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude、Cline、VS Code;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP