Skip to main content
Glama
Master CSS MCP

Master CSS MCP

Official

Getting started

Related MCP server: Memory Bank MCP Server

MCP server

This repository also contains the Master CSS Model Context Protocol (MCP) server, published as @master/css-mcp and listed in the MCP Registry as io.github.master-co/master-css. Its source lives in packages/mcp. It is built on the official MCP TypeScript SDK (@modelcontextprotocol/sdk) and runs over stdio.

{
  "mcpServers": {
    "master-css": {
      "command": "npx",
      "args": ["-y", "@master/css-mcp@latest", "--root", "/absolute/path/to/project"]
    }
  }
}
  • Tools — inspect, trace and suggest classes; render and compare generated CSS; audit setup, query the manifest and inspect CSS-first directives; lint files or buffers; preview fixes before mastercss_apply_preview writes them.

  • Resources — mastercss://workspace/manifest, mastercss://workspace/entries and mastercss://workspace/packages.

  • Prompts — debug-missing-css, review-mastercss-classes and migrate-to-mastercss.

See the MCP server README for every tool and the MCP guide for client setup.

Community

  • Documentation — Set up Master CSS and look up supported behavior.

  • GitHub Discussions — Ask questions, discuss ideas, and share your work. English and Chinese are welcome.

  • GitHub Issues — Report reproducible bugs and track implementation work.

  • Releases — Follow version changes and release notes.

Use Discussions for technical support so answers remain available to other users. Discord remains a secondary community space; real-time support is not guaranteed. See the support guide.

Our Code of Conduct applies to all Master CSS community channels.

Contributing

Please see our CONTRIBUTING for workflow.

Inspiration

Some of the core concepts and designs are inspired by these giants.

  • The concept of enhanced syntax is inspired by SASS and TypeScript

  • The concept of Virtual CSS is inspired by the Virtual DOM

  • CSS-first theme configuration and the @theme directive are inspired by Tailwind CSS.

License

Master CSS software, reusable examples, and the public skill are licensed under the MIT License. The website copyright notice covers the site's original implementation, prose, illustrations, and brand assets. Code samples provided for reuse and copies of MIT-licensed software remain MIT.

Available Tools

17 tools
mastercss_apply_previewApply Master CSS PreviewB
Destructive

Apply a previously generated preview token after validating hashes and workspace containment.

Inputs: confirmToken (required). Returns: result, version, metadata, diagnostics

mastercss_css_compareCompare Master CSS OutputB
Read-onlyIdempotent

Compare class lists or source buffers under one manifest, or pass beforeSnapshot and afterSnapshot to compare resolved projects, including changed definitions and known consumers. Does not verify browser rendering.

Inputs: context, filePath, afterHtml, beforeHtml, +6 more. Returns: result, version, metadata, diagnostics

mastercss_extract_classesExtract Master CSS ClassesC
Read-onlyIdempotent

Extract class positions and validation summaries from project files or an in-memory source buffer.

Inputs: content, context, filePath, patterns, +1 more. Returns: result, version, metadata, diagnostics

mastercss_inspect_classInspect Master CSS ClassB
Read-onlyIdempotent

Inspect one Master CSS class and return semantic parts, generated rules, variables, and CSS text.

Inputs: className (required), context. Returns: result, version, metadata, diagnostics

mastercss_inspect_directivesInspect Master CSS DirectivesC
Read-onlyIdempotent

Inspect CSS-first directives from a stylesheet entry or in-memory CSS content and report manifest/CSS effects.

Inputs: content, context, filePath, entryPath, +1 more. Returns: result, version, metadata, diagnostics

mastercss_lint_contentLint Master CSS ContentB
Read-onlyIdempotent

Run Master CSS class-list diagnostics on an in-memory source buffer without writing files.

Inputs: content (required), filePath (required), rules, context. Returns: result, version, metadata, diagnostics

mastercss_lint_projectLint Master CSS ProjectC
Read-onlyIdempotent

Run Master CSS class-list diagnostics and return fix proposals without writing files.

Inputs: rules, context, patterns. Returns: result, version, metadata, diagnostics

mastercss_manifest_queryQuery Master CSS ManifestB
Read-onlyIdempotent

Query active manifest tokens, utilities, mixins, custom media, custom containers, and token families.

Inputs: kind, limit, query, context, +1 more. Returns: result, version, metadata, diagnostics

mastercss_preview_directive_formatPreview Master CSS Directive FormatB

Create a safe preview for formatting Master CSS directives, or format in-memory content without writing files.

Inputs: range, ttlMs, content, context, +2 more. Returns: result, version, metadata, diagnostics

mastercss_preview_fixesPreview Master CSS FixesB

Create a diff preview for lint fixes or generated CSS output and return a confirmation token.

Inputs: mode, rules, ttlMs, context, +2 more. Returns: result, version, metadata, diagnostics

mastercss_render_cssRender Master CSSC
Read-onlyIdempotent

Generate CSS from an HTML fragment or a whitespace-separated class list.

Inputs: html, context, classList. Returns: result, version, metadata, diagnostics

mastercss_scan_projectScan Master CSS ProjectB
Read-onlyIdempotent

Scan source files and stylesheet entries. Set includeSnapshot to capture a resolved project state for later impact comparison. Pass designSystem to inspect stylesheet token references and design policies; add routeStylesheets globs for stylesheets imported from JavaScript.

Inputs: classes, context, patterns, includeCss, +3 more. Returns: result, version, metadata, diagnostics

mastercss_setup_auditAudit Master CSS SetupA
Read-onlyIdempotent

Audit package, entry stylesheet, manifest, integration, and package-resolution setup for a workspace.

Inputs: no named parameters. Returns: result, version, metadata, diagnostics

mastercss_suggest_classesSuggest Master CSS ClassesB
Read-onlyIdempotent

Suggest project-aware classes for an isolated CSS declaration block. Preserves the complete block when conversion needs review. Checks declaration output, not surrounding cascade or browser rendering. Does not write files.

Inputs: declarations (required), context. Returns: result, version, metadata, diagnostics

mastercss_suggest_syntaxSuggest Master CSS SyntaxC
Read-onlyIdempotent

Return language-service completions and hover context for a document position.

Inputs: content (required), filePath (required), position (required), limit, +2 more. Returns: result, version, metadata, diagnostics

mastercss_trace_classTrace Master CSS ClassB
Read-onlyIdempotent

Trace one class from project extraction through generated CSS, missing CSS classification, and engine inspection.

Inputs: className (required), context, patterns, includeCss. Returns: result, version, metadata, diagnostics

mastercss_workspace_infoMaster CSS Workspace InfoA
Read-onlyIdempotent

Report workspace roots, resolved Master CSS packages, and project manifest status.

Inputs: no named parameters. Returns: result, version, metadata, diagnostics

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools target clearly distinct phases such as scanning, extracting, linting, inspecting, tracing, rendering, and previewing. There is some potential confusion between paired tools like lint_content vs lint_project, suggest_syntax vs suggest_classes, inspect_class vs trace_class, and scan_project vs extract_classes, but the descriptions generally clarify scope and input type.

    Naming Consistency5/5

    All tools share the mastercss_ prefix and use snake_case names with predictable verb-oriented phrasing such as lint_content, scan_project, inspect_class, render_css, and apply_preview. The pattern is consistent enough that an agent can infer naming conventions for related operations.

    Tool Count4/5

    At 17 tools the surface is slightly heavy, but the domain is broad CSS tooling covering setup, scanning, linting, inspection, tracing, rendering, manifests, comparison, and preview application. Each tool appears to earn its place rather than being redundant filler.

    Completeness5/5

    The set covers the full workflow from workspace setup audit and project scanning through extraction, linting, suggestions, class inspection, tracing, manifest queries, CSS rendering, comparison, and preview/apply safety. There are no obvious lifecycle dead ends for a Master CSS analysis and language-service server.

    Maintenance

    ActivityActive
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers