Skip to main content
Glama
Bootstrap Studio MCP Server

Bootstrap Studio MCP Server

by fengweimian

Bootstrap Studio MCP Server

An MCP (Model Context Protocol) server that provides tools for analyzing Bootstrap Studio .bsdesign project files, generating Bootstrap 5 component code, and looking up Bootstrap documentation. Designed to complement Bootstrap Studio's built-in AI assistant with file-level project analysis and code generation capabilities.

Features

Project Analysis (7 tools)

Tool

Description

bs_read_project

Parse a .bsdesign file and return a comprehensive project overview

bs_list_pages

List all pages with metadata and component counts

bs_get_page_tree

Get the full component tree for a specific page

bs_find_components

Search components by type, label, or text content

bs_get_css

Extract all custom CSS/SASS code from the project

bs_get_js

Extract all custom JavaScript code from the project

bs_get_text_content

Extract all visible text from a page

Code Generation (5 tools)

Tool

Description

bs_generate_component

Generate Bootstrap 5 component HTML (21 components: navbar, card, form, modal, table, carousel, accordion, alert, badge, breadcrumb, progress, spinner, hero, features, footer, contact-form, pricing, testimonial, timeline, faq, stats)

bs_generate_layout

Generate complete page layouts (full-page, dashboard)

bs_generate_custom_css

Generate custom CSS with responsive breakpoints

bs_generate_custom_js

Generate custom JavaScript (smooth scroll, navbar effects, form validation, tooltips, etc.)

bs_compare_versions

Check Bootstrap 4 to 5 class name migrations

Documentation Lookup (2 tools)

Tool

Description

bs_lookup_class

Look up Bootstrap 5 CSS class documentation

bs_search_component

Search Bootstrap 5 component reference with code examples

Project Editing (6 tools)

Tool

Description

bs_update_component

Update component properties, CSS classes, text, or label

bs_add_component

Add a new component at a specified position in the tree

bs_remove_component

Remove a component from a page by its path

bs_set_css_code

Write custom CSS using Bootstrap Studio's native structured block format

bs_set_js_code

Write custom JavaScript code

bs_batch_update

Update multiple components in a single request (single file write)

Related MCP server: Webpixels MCP Server

Installation

git clone https://github.com/niz1230/bootstrap-studio-mcp-server.git
cd bootstrap-studio-mcp-server
npm install
npm run build

Configuration

Add to your MCP client configuration (e.g., opencode.json):

{
  "mcp": {
    "bootstrap-studio": {
      "type": "local",
      "command": ["node", "C:\\path\\to\\bootstrap-studio-mcp-server\\dist\\index.js"]
    }
  }
}

Requirements

  • Node.js >= 18

  • npm >= 9


Bootstrap Studio MCP 服务器(中文说明)

一个 MCP(模型上下文协议) 服务器,提供分析 Bootstrap Studio .bsdesign 项目文件、生成 Bootstrap 5 组件代码以及查询 Bootstrap 文档的工具。旨在补充 Bootstrap Studio 内置 AI 助手的功能,提供文件级项目分析和代码生成能力。

功能

项目分析(7 个工具)

工具

说明

bs_read_project

解析 .bsdesign 文件,返回完整项目概览

bs_list_pages

列出所有页面及其元数据和组件数量

bs_get_page_tree

获取指定页面的完整组件树

bs_find_components

按类型、标签或文本内容搜索组件

bs_get_css

提取项目中所有自定义 CSS/SASS 代码

bs_get_js

提取项目中所有自定义 JavaScript 代码

bs_get_text_content

提取页面中所有可见文本

代码生成(5 个工具)

工具

说明

bs_generate_component

生成 Bootstrap 5 组件 HTML(21 种组件:导航栏、卡片、表单、模态框、表格、轮播、折叠面板、提示框、徽章、面包屑、进度条、加载动画、英雄区、特性区、页脚、联系表单、定价表、用户评价、时间线、常见问题、数据统计)

bs_generate_layout

生成完整页面布局(全页面、仪表盘)

bs_generate_custom_css

生成包含响应式断点的自定义 CSS

bs_generate_custom_js

生成自定义 JavaScript(平滑滚动、导航栏效果、表单验证、提示框等)

bs_compare_versions

检查 Bootstrap 4 到 5 的类名迁移

文档查询(2 个工具)

工具

说明

bs_lookup_class

查询 Bootstrap 5 CSS 类名文档

bs_search_component

搜索 Bootstrap 5 组件参考和代码示例

项目编辑(6 个工具)

工具

说明

bs_update_component

修改组件属性、CSS 类、文本或标签

bs_add_component

在指定位置添加新组件

bs_remove_component

按路径删除组件

bs_set_css_code

写入自定义 CSS(Bootstrap Studio 原生结构化格式)

bs_set_js_code

写入自定义 JavaScript 代码

bs_batch_update

批量修改多个组件(一次文件写入)

安装

git clone https://github.com/niz1230/bootstrap-studio-mcp-server.git
cd bootstrap-studio-mcp-server
npm install
npm run build

配置

添加到 MCP 客户端配置中(例如 opencode.json):

{
  "mcp": {
    "bootstrap-studio": {
      "type": "local",
      "command": ["node", "C:\\path\\to\\bootstrap-studio-mcp-server\\dist\\index.js"]
    }
  }
}

环境要求

  • Node.js >= 18

  • npm >= 9

Available Tools

8 tools
bs_compare_versionsCompare Bootstrap Class Between VersionsA
Read-onlyIdempotent

Check if a Bootstrap CSS class needs migration between Bootstrap 4 and Bootstrap 5.

Handles common renames: mr- -> me-, ml- -> ms-, font-weight- -> fw-, text-left -> text-start, etc.

Args:

  • class_name (string): The Bootstrap CSS class to check

Returns: Migration suggestion if the class changed between versions.

Inputs: class_name (required).

bs_generate_componentGenerate Bootstrap Component HTMLA
Read-onlyIdempotent

Generate ready-to-use Bootstrap 5 component HTML that can be pasted into Bootstrap Studio's Custom Code panel.

Generates production-quality HTML for common Bootstrap components with proper attributes and structure.

Available components: accordion, alert, badge, breadcrumb, card, carousel, contact-form, faq, features, footer, form, hero, modal, navbar, pricing, progress, spinner, stats, table, testimonial, timeline

Args:

  • component (string): Component type to generate

  • description (string, optional): Context/comments about the component's purpose

Returns: Formatted HTML string for the requested component.

Inputs: component (required), description.

bs_generate_custom_cssGenerate Custom CSS CodeA
Read-onlyIdempotent

Generate custom CSS code based on a description of styling needs. Produces ready-to-paste CSS for Bootstrap Studio's CSS editor.

Includes responsive breakpoints, CSS custom properties, and Bootstrap-compatible patterns.

Args:

  • request (string): Description of the styling you need (e.g. "hero section with gradient background", "card hover effects")

Returns: Custom CSS code with comments and responsive considerations.

Inputs: request (required).

bs_generate_custom_jsGenerate Custom JavaScript CodeA
Read-onlyIdempotent

Generate custom JavaScript code for Bootstrap Studio's JS editor. Includes common patterns like smooth scroll, navbar effects, form validation, back-to-top buttons, and tooltip initialization.

Args:

  • request (string): Description of the JavaScript functionality you need

Returns: Custom JS code wrapped in DOMContentLoaded ready to paste.

Inputs: request (required).

bs_generate_layoutGenerate Page LayoutA
Read-onlyIdempotent

Generate a complete Bootstrap 5 page layout structure that can be pasted into Bootstrap Studio.

Available layouts: dashboard, full-page

Args:

  • layout (string): Layout type to generate

  • description (string, optional): Context about the layout's purpose

Returns: Complete HTML layout with Bootstrap grid system and components.

Inputs: layout (required), description.

bs_get_jsGet Custom JavaScript from ProjectA
Read-onlyIdempotent

Extract all custom JS files and their content from a .bsdesign file.

Bootstrap Studio stores custom scripts in the assets.js section. This tool retrieves them.

Args:

  • file_path (string): Absolute path to the .bsdesign file

  • file_name (string, optional): Get a specific JS file by name. If omitted, returns all JS files.

Returns: JS file names and their content blocks.

Inputs: file_path (required), file_name.

bs_get_text_contentGet All Text Content from PageA
Read-onlyIdempotent

Extract all visible text content from a page in a .bsdesign file.

Useful for reviewing copy, checking placeholder text, or auditing content.

Args:

  • file_path (string): Absolute path to the .bsdesign file

  • page_name (string, optional): Page name. If omitted, first page is used.

Returns: All text content found on the page.

Inputs: file_path (required), page_name.

bs_lookup_classLook Up Bootstrap CSS ClassA
Read-onlyIdempotent

Look up documentation for a Bootstrap 5 CSS class. Returns description, usage, and related classes.

Args:

  • class_name (string): Bootstrap CSS class to look up (e.g. "container", "btn", "d-flex", "g-3")

Returns: Description of the class, its variants, and usage examples.

Inputs: class_name (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool has a distinct function: extracting text, generating layouts/CSS/JS/components, looking up classes, comparing versions, and retrieving JS files. No overlap in purpose.

    Naming Consistency5/5

    All tools follow the 'bs_verb_noun' pattern consistently, using clear action prefixes like 'get', 'generate', 'compare', 'lookup'. No naming anomalies.

    Tool Count4/5

    Eight tools cover the main needs for a Bootstrap Studio assistant. The count is reasonable and not overwhelming, though a few more utilities (e.g., for managing pages) could be added.

    Completeness4/5

    Core workflows are covered: content extraction, layout generation, custom code creation, component generation, and class references. Minor gaps like file manipulation or page management do not hinder typical use.

    Related MCP Connectors

    Related MCP Servers