Skip to main content
Glama

Beaunifi

An MCP (Model Context Protocol) server that intelligently beautifies and minifies JavaScript and CSS files. It can detect if a file is minified and automatically beautify it before processing, then re-minify it afterward.

Features

  • πŸ”§ Beautify JS/CSS code for easier editing

  • πŸ“¦ Minify JS/CSS code for production

  • 🧠 Auto-detect minified files and handle them intelligently

  • πŸ” Workflow mode: Beautify β†’ Edit β†’ Minify (automatic)

  • πŸ”Œ MCP Compatible: Works with Claude Code, Cursor, Antigravity, and more

Related MCP server: ellmos-codecommander-mcp

Installation

# Navigate to the project directory
cd E:\Projects\OSP\beaunifi

# Create virtual environment and install dependencies
uv venv
uv pip install -e ".[dev]"

Using pip

pip install -e .

MCP Configuration

Claude Code

Add to your Claude Code settings:

{
  "mcpServers": {
    "beaunifi": {
      "command": "uv",
      "args": [
        "run",
        "--python",
        "python",
        "-m",
        "beaunifi.server"
      ],
      "cwd": "E:\\Projects\\OSP\\beaunifi"
    }
  }
}

Or use the provided config file:

# Copy the config to Claude Code directory
cp mcp-configs/claude-code.json ~/.claude/mcp-servers/beaunifi.json

Cursor

Add to your Cursor settings (~/.cursor/mcp.json):

{
  "mcpServers": {
    "beaunifi": {
      "command": "uv",
      "args": [
        "run",
        "--python",
        "python",
        "-m",
        "beaunifi.server"
      ],
      "cwd": "E:\\Projects\\OSP\\beaunifi"
    }
  }
}

Antigravity

Add to your Antigravity MCP config:

{
  "name": "beaunifi",
  "transport": {
    "type": "stdio",
    "command": "uv",
    "args": ["run", "--python", "python", "-m", "beaunifi.server"],
    "cwd": "E:\\Projects\\OSP\\beaunifi"
  }
}

Available Tools

1. beautify_js

Beautify JavaScript code

Parameters:

  • code (string): JavaScript code to beautify

  • indent_size (number, optional): Indentation size (default: 2)

2. minify_js

Minify JavaScript code

Parameters:

  • code (string): JavaScript code to minify

3. beautify_css

Beautify CSS code

Parameters:

  • code (string): CSS code to beautify

  • indent_size (number, optional): Indentation size (default: 2)

4. minify_css

Minify CSS code

Parameters:

  • code (string): CSS code to minify

5. is_minified

Check if code appears to be minified

Parameters:

  • code (string): Code to check

  • file_type (string): Either "js" or "css"

6. smart_process

Smart workflow: auto-detect minification, beautify if needed, and re-minify

Parameters:

  • code (string): Code to process

  • file_type (string): Either "js" or "css"

  • action (string): Action to perform ("read", "edit", or "write")

  • modifications (string, optional): Modifications to apply (for "edit" action)

Usage Examples

Direct Python Usage

from beaunifi.utils import beautify_js, minify_js, is_minified

# Check if code is minified
code = "function test(){return 1}"
if is_minified(code, "js"):
    pretty = beautify_js(code)
    # ... make edits ...
    final = minify_js(pretty)

MCP Tool Usage

When using with an MCP client:

"Please beautify this minified JS file: [code]"
"Minify this CSS for production: [code]"
"Smart process this file - detect if minified and handle appropriately: [code]"

Smart Process Workflow

The smart_process tool provides an intelligent workflow:

  1. Detect if the code is minified

  2. Beautify if minified (for easier editing)

  3. Perform the requested action (read/edit)

  4. Re-minify if the original was minified

This is perfect for AI assistants that need to edit minified files without losing the minification.

Development

# Run tests
uv run pytest

# Type checking
uv run mypy src/beaunifi

# Linting
uv run ruff check src/beaunifi

License

MIT

Available Tools

6 tools
beautify_cssB

Beautify CSS code to make it readable

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesCSS code to beautify
indent_sizeNoNumber of spaces for indentation

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden of disclosing side effects and return behavior. It only states the operation and goal; it does not clarify whether a formatted string is returned, whether input is preserved, or how invalid CSS is handled.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler. The phrase 'to make it readable' is slightly redundant with 'Beautify' but not harmful; overall the structure is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool the definition is mostly usable, but the return shape is never stated. With no output schema and no annotations, an agent is left to guess whether the tool returns formatted CSS or writes it somewhere.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents code and indent_size adequately. The description adds no parameter-specific meaning, but the existing schema descriptions are sufficient for an agent to understand each parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Beautify') and resource ('CSS code'), and clearly distinguishes it from siblings like beautify_js and minify_css by action and target language. The purpose clause 'to make it readable' adds useful intent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives such as beautify_js, minify_css, or is_minified. The description implies a use case but offers no explicit context, exclusions, or decision criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

beautify_jsB

Beautify JavaScript code to make it readable

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to beautify
indent_sizeNoNumber of spaces for indentation

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure, and it adds almost nothing beyond the tool's name. It doesn't state that this is a pure string transformation with no side effects, what the output shape is, or how invalid/malformed JavaScript input is handled. 'Make it readable' is a near-restatement of 'beautify' rather than behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with no filler; the action verb is front-loaded and the sentence is properly sized for a simple transformation tool. Minor deduction because 'to make it readable' is slightly redundant with the verb 'beautify,' but the overall economy is good.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool with fully documented schema properties, the description states the core function adequately. However, with no annotations and no output schema, an agent is left guessing about the return format, whether the operation mutates anything or is a pure function, and what happens on invalid JavaScript input.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline of 3 applies: both 'code' and 'indent_size' are already documented in the schema. The tool description echoes 'JavaScript code' but adds no parameter-level meaning beyond what the schema provides, so it neither helps nor hurts.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Beautify') and a specific resource ('JavaScript code'), and its JavaScript scoping structurally distinguishes it from beautify_css while the beautify action contrasts with minify_js. The purpose clause 'to make it readable' adds a bit of intent. It doesn't explicitly name siblings, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied: use this when you want readable JavaScript output. However, there is no explicit when-to-use/when-not-to-use guidance, and none of the four siblings (minify_js, beautify_css, minify_css, is_minified) are referenced as alternatives, which would meaningfully help routing for a tool that lives in a family of similar formatting utilities.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

is_minifiedA

Check if code appears to be minified based on line length and structure

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesCode to check
file_typeYesType of code (js or css)

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioral transparency burden. It does disclose that the check is heuristic ('appears to be minified') and based on 'line length and structure,' which is useful context. However, it does not state the return format, threshold behavior, edge cases, or explicitly confirm that the tool does not modify the code.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. It communicates the core purpose first and then adds the heuristic detail. Every word contributes meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter check tool with no output schema, the description is nearly complete: it identifies the input, the heuristic approach, and the boolean-like purpose implied by the tool name. The main missing piece is an explicit statement of the return value, but the name and verb make the boolean outcome reasonably inferable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already fully documents both parameters (code and file_type) with 100% coverage. The description adds some context about what aspects of the code are examined, but it does not provide additional per-parameter meaning beyond the schema, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Check if') and resource ('code') to state exactly what the tool does: detect minification. It also names the heuristic basis ('line length and structure'), which clearly distinguishes it from the sibling beautify/minify transformation tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no explicit guidance about when to use this tool versus alternatives such as beautify_js, minify_js, or smart_process. It implies a checking/detection use case, but it does not state conditions, prerequisites, or which sibling tools to prefer in other situations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

minify_cssB

Minify CSS code for production

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesCSS code to minify

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It simply restates the operation without describing the return value, error handling, or whether it is a pure transformation. It adds little beyond what the tool name already implies.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single concise sentence with the action and resource front-loaded, and no wasted words. It is appropriately sized for a simple tool, though slightly sparse in detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter utility, the description is mostly adequate but does not explicitly state the return value or provide sibling disambiguation. Since there is no output schema or annotations, a brief note such as 'returns minified CSS string' would make it complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the single 'code' parameter is already described as 'CSS code to minify'. The tool description does not add parameter-specific meaning beyond the schema, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Minify') and resource ('CSS code'), and adds a clear purpose ('for production'). It distinguishes from sibling tools like beautify_css (opposite operation), minify_js (different resource), and is_minified (detection rather than transformation).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for production' gives some context about when to use the tool, but it does not explicitly mention alternatives or exclusions. No guidance is provided for choosing this over beautify_css or minify_js, leaving usage implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

minify_jsA

Minify JavaScript code for production

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to minify

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It only restates the obvious action (minifying code) and does not mention whether the result is returned as a string, whether invalid JavaScript is rejected, whether comments are stripped, or whether the operation has any side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler words. Every word contributes to the core purpose, making it highly concise and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one parameter and no output schema, so the description is minimally adequate. However, it would be more complete if it stated that the input is minified and returned as a result, and it does not cover error behavior or constraints. These are clear gaps but not severe for such a straightforward operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the single 'code' parameter is already documented as 'JavaScript code to minify'. The tool description adds no new meaning beyond the schema, which is acceptable given the high coverage, but it does not enrich the parameter semantics further.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb ('Minify'), a specific resource ('JavaScript code'), and an intended context ('for production'). It distinguishes itself from siblings like beautify_js (opposite action) and minify_css (different language) without requiring the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for production' implies this is for production-ready output, and the resource name clearly indicates JavaScript as opposed to CSS. However, it does not explicitly describe when to choose this over beautify_js, minify_css, or is_minified, nor does it provide any exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

smart_processA

Smart workflow: auto-detect if minified, beautify if needed, process, and optionally re-minify. Perfect for editing minified files.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesCode to process
actionNoAction to perform: 'read' returns beautified code, 'edit' applies modifications, 'write' returns minified resultread
file_typeYesType of code (js or css)
indent_sizeNoNumber of spaces for indentation when beautifying
modificationsNoJSON string describing modifications to apply (for 'edit' action). Format: [{"find": "text", "replace": "new_text"}]

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses the conditional behavior (auto-detect, beautify if needed, optional re-minify), which is useful given no annotations. However, 'process' is opaque, and it does not clarify side effects or what each action returns beyond what the schema already states.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loaded, conveying the core workflow in a single sentence. The phrase 'Smart workflow' is somewhat generic but does not add meaningful bloat.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description provides only a high-level workflow. It leaves 'process' ambiguous and does not explain how the actions (read/edit/write) map to the detect-beautify-reminify flow, though the schema does document each parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the parameter definitions already carry the semantic weight. The description adds no new meaning about parameters such as action, modifications, or indent_size.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the workflow: auto-detect minification, beautify if needed, process, and optionally re-minify. This distinguishes it from the sibling beautify/minify/is_minified tools, though the word 'process' remains somewhat vague.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Perfect for editing minified files' gives clear usage context, but it does not explicitly name sibling alternatives or state when not to use this combined tool versus calling beautify_js/minify_js/is_minified directly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 6 tool updatesv1.0.0
    • First observedbeautify_css
    • First observedbeautify_js
    • First observedis_minified
    • First observedminify_css
    • First observedminify_js
    • First observedsmart_process

TDQS

A3.7/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: beautify vs minify for JS and CSS are opposites, is_minified is a detector, and smart_process combines them into a workflow. No two tools overlap in function.

Naming Consistency4/5

Most tools follow a clear verb_noun pattern (beautify_js, minify_css), but is_minified uses an is_ prefix and smart_process uses an adjective_noun style. The deviation is minor and does not cause confusion.

Tool Count5/5

Six tools is well-scoped for a code formatting/minification server. Each tool earns its place, covering the two primary languages plus detection and a combined workflow.

Completeness4/5

The set covers beautify/minify for JS and CSS, detection, and an automated workflow, which is solid for the domain. Missing support for HTML or JSON formatting is a minor gap but not a critical failure.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    C
    maintenance
    An MCP server that provides utilities for web developers to automate API integration, convert Figma designs to code, and optimize development workflows with tools for asset management and code generation.
    2
    8
    14 npm
    38
    Mozilla Public 2.0
  • A
    license
    A
    quality
    B
    maintenance
    Developer-focused MCP server for code analysis and local engineering workflows. Provides tools for JSON repair, encoding fixes, import organization, format conversion, diff inspection, and regex testing.
    23
    287 npm
    3
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server for intelligently reading Java source code, supporting extraction from Maven dependencies and local projects with dual decompilers.
    2
    88 PyPI
    154
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    A lightweight MCP server that provides 40 tools for TypeScript/JavaScript refactoring and code intelligence, directly mapping to TypeScript's tsserver protocol commands for accurate structural changes and workspace analysis.
    40
    41 npm
    3
    MIT