Beaunifi
Beaunifi is an MCP server for beautifying, minifying, and intelligently processing JavaScript/CSS code.
Beautify JavaScript code with configurable indentation.
Minify JavaScript code for production.
Beautify CSS code with configurable indentation.
Minify CSS code for production.
Detect whether JS/CSS code appears to be minified.
Run a smart workflow that auto-detects minification, beautifies when needed, supports read/edit/write actions, and re-minifies as appropriate.
Integrate with MCP clients such as Claude Code, Cursor, Antigravity, and OpenCode.
Provides tools to beautify and minify CSS code, detect whether CSS appears minified, and support a smart workflow for editing minified CSS while preserving minification.
Provides tools to beautify and minify JavaScript code, detect whether JavaScript appears minified, and support a smart workflow for editing minified JavaScript while preserving minification.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Beaunifi beautify this minified JS file"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Using UV (Recommended)
# Navigate to the project directory
git clone https://github.com/hussainbiedouh/beaunifi.git
cd 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": "C:\\path\\to\\beaunifi"
}
}
}Or use the provided config file:
# Copy the config to Claude Code directory
cp mcp-configs/claude-code.json ~/.claude/mcp-servers/beaunifi.jsonOpenCode
OpenCode nests servers under mcp.servers in ~/.config/opencode/opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"servers": {
"beaunifi": {
"type": "local",
"command": [
"C:\\path\\to\\beaunifi\\.venv\\Scripts\\python.exe",
"-m",
"beaunifi.server"
],
"cwd": "C:\\path\\to\\beaunifi",
"environment": {
"PYTHONIOENCODING": "utf-8"
}
}
}
}
}Or use the provided config file:
cp mcp-configs/opencode.json ~/.config/opencode/opencode.jsoncEvery client expects a different key, so the same file will not work across all of them. mcp-client-config has the full table and what each failure mode looks like.
Cursor
Add to your Cursor settings (~/.cursor/mcp.json):
{
"mcpServers": {
"beaunifi": {
"command": "uv",
"args": [
"run",
"--python",
"python",
"-m",
"beaunifi.server"
],
"cwd": "C:\\path\\to\\beaunifi"
}
}
}Antigravity
Add to your Antigravity MCP config:
{
"name": "beaunifi",
"transport": {
"type": "stdio",
"command": "uv",
"args": ["run", "--python", "python", "-m", "beaunifi.server"],
"cwd": "C:\\path\\to\\beaunifi"
}
}Available Tools
1. beautify_js
Beautify JavaScript code
Parameters:
code(string): JavaScript code to beautifyindent_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 beautifyindent_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 checkfile_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 processfile_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:
Detect if the code is minified
Beautify if minified (for easier editing)
Perform the requested action (read/edit)
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/beaunifiLicense
MIT
Available Tools
6 toolsbeautify_cssB
Beautify CSS code to make it readable
Inputs: code (required), indent_size.
beautify_jsB
Beautify JavaScript code to make it readable
Inputs: code (required), indent_size.
is_minifiedA
Check if code appears to be minified based on line length and structure
Inputs: code (required), file_type (required).
minify_cssB
Minify CSS code for production
Inputs: code (required).
minify_jsA
Minify JavaScript code for production
Inputs: code (required).
smart_processA
Smart workflow: auto-detect if minified, beautify if needed, process, and optionally re-minify. Perfect for editing minified files.
Inputs: code (required), file_type (required), action, indent_size, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 6 tools
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.
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.
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.
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
Related MCP Connectors
MCP Server for JFrog, providing tools for development and artifact management.
A MCP server built for developers enabling Git based project management with project and personalβ¦
An MCP server that provides asset auto generator
An MCP server that automatically collects feedback on your MCP server.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn 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.847 npm38Mozilla Public 2.0
- AlicenseBqualityBmaintenanceDeveloper-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.23206 npm4MIT
- AlicenseAqualityBmaintenanceAn MCP server for intelligently reading Java source code, supporting extraction from Maven dependencies and local projects with dual decompilers.2102 PyPI154Apache 2.0
- AlicenseAqualityDmaintenanceA 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.4038 npm3MIT