npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bach-codecommander-mcp

v1.3.2

Published

A developer-focused MCP server providing 17 tools for code analysis, JSON repair, encoding fix, import organization, format conversion, diff, and regex testing

Readme

BACH CodeCommander MCP Server

License: MIT npm version Node.js

A developer-focused Model Context Protocol (MCP) server that gives AI assistants code analysis, JSON repair, encoding fix, import organization, format conversion, file diff, and regex testing capabilities.

17 tools optimized for developers - the coding companion to FileCommander.


Why CodeCommander?

While FileCommander handles filesystem operations, CodeCommander focuses on code intelligence:

  • Python Code Analysis - AST-based class/method extraction, complexity metrics, import analysis
  • JSON Repair - Fix broken JSON automatically (trailing commas, single quotes, BOM, comments)
  • Import Organization - Sort and deduplicate Python imports per PEP 8
  • Encoding Fix - Repair Mojibake and double-encoded UTF-8 (27+ patterns)
  • Umlaut Repair - Fix broken German characters (70+ patterns)
  • Format Conversion - Convert between JSON, CSV, INI, YAML, TOML, XML, and TOON
  • File Diff - Compare two files with unified diff output (LCS algorithm)
  • Regex Tester - Test regular expressions with match details, groups, and replace preview
  • Markdown Export - Convert Markdown to professional HTML/PDF with code blocks, tables, nested lists, blockquotes
  • Cross-platform - Works on Windows, macOS, and Linux

Installation

Prerequisites

Option 1: Install from NPM

npm install -g bach-codecommander-mcp

Option 2: Install from Source

git clone https://github.com/lukisch/bach-codecommander-mcp.git
cd bach-codecommander-mcp
npm install
npm run build

Configuration

Claude Desktop

Add to your claude_desktop_config.json:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

If installed globally via NPM:

{
  "mcpServers": {
    "codecommander": {
      "command": "bach-codecommander"
    }
  }
}

If installed from source:

{
  "mcpServers": {
    "codecommander": {
      "command": "node",
      "args": ["/absolute/path/to/bach-codecommander-mcp/dist/index.js"]
    }
  }
}

Using Both Servers Together

FileCommander and CodeCommander are designed to work side by side:

{
  "mcpServers": {
    "filecommander": {
      "command": "bach-filecommander"
    },
    "codecommander": {
      "command": "bach-codecommander"
    }
  }
}

Tools Overview

Code Analysis (3 tools)

| Tool | Description | |------|-------------| | cc_analyze_code | Full code analysis: classes, functions, imports, LOC, complexity | | cc_analyze_methods | Detailed method analysis: params, decorators, visibility, data flow | | cc_extract_classes | Extract Python classes/functions as separate text blocks |

Import Management (2 tools)

| Tool | Description | |------|-------------| | cc_organize_imports | Sort & deduplicate Python imports per PEP 8 | | cc_diagnose_imports | Detect unused imports, duplicates, circular import risks |

JSON Tools (2 tools)

| Tool | Description | |------|-------------| | cc_fix_json | Repair broken JSON (BOM, trailing commas, comments, single quotes) | | cc_validate_json | Validate JSON with detailed error position and context |

Encoding & Text (3 tools)

| Tool | Description | |------|-------------| | cc_fix_encoding | Fix Mojibake / double-encoded UTF-8 (27+ patterns) | | cc_cleanup_file | Remove BOM, NUL bytes, trailing whitespace, normalize line endings | | cc_fix_umlauts | Repair broken German umlauts (70+ patterns, HTML entities, escapes) |

Scanning (1 tool)

| Tool | Description | |------|-------------| | cc_scan_emoji | Scan files for emojis with codepoint info |

Format & Documentation (2 tools)

| Tool | Description | |------|-------------| | cc_convert_format | Convert between JSON, CSV, INI, YAML, TOML, XML, and TOON formats | | cc_generate_licenses | Generate third-party license file (npm/pip) |

Developer Utilities (2 tools)

| Tool | Description | |------|-------------| | cc_diff_files | Compare two files with unified diff output (configurable context lines) | | cc_regex_test | Test regex patterns against text/files with match details, groups, and replace preview |

Export (2 tools)

| Tool | Description | |------|-------------| | cc_md_to_html | Markdown to standalone HTML with CSS styling (headers, code blocks, tables, nested lists, blockquotes, images, checkboxes) | | cc_md_to_pdf | Markdown to PDF via headless browser (Edge/Chrome). Falls back to HTML if no browser is available |

Total: 17 tools


Shared Tools

7 tools exist in both FileCommander and CodeCommander for convenience:

| FileCommander | CodeCommander | Function | |---------------|---------------|----------| | fc_fix_json | cc_fix_json | JSON repair | | fc_validate_json | cc_validate_json | JSON validation | | fc_fix_encoding | cc_fix_encoding | Encoding repair | | fc_cleanup_file | cc_cleanup_file | File cleanup | | fc_convert_format | cc_convert_format | Format conversion (JSON/CSV/INI/YAML/TOML/XML/TOON) | | fc_md_to_html | cc_md_to_html | Markdown to HTML export | | fc_md_to_pdf | cc_md_to_pdf | Markdown to PDF export |


Tool Prefix

All tools use the cc_ prefix (CodeCommander) to avoid conflicts with FileCommander's fc_ prefix and other MCP servers.


Security

See SECURITY.md for detailed security information.

Key points:

  • All file-modifying tools support dry_run mode
  • Backup creation is enabled by default for destructive operations
  • No built-in sandboxing - security is delegated to the MCP client
  • Designed for local development use via stdio transport

Development

npm install
npm run dev    # Watch mode
npm run build  # One-time build
npm start      # Start server

Changelog

See CHANGELOG.md for the full version history.


License

MIT - Lukas (BACH)