MCP Hub
Back to servers

bach-codecommander-mcp

A developer-focused MCP server providing 14 tools for code analysis, JSON repair, encoding fix, import organization, format conversion, and more

Updated
Feb 15, 2026

Quick Install

npx -y bach-codecommander-mcp

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, and format conversion capabilities.

14 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, and INI
  • 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)

ToolDescription
cc_analyze_codeFull code analysis: classes, functions, imports, LOC, complexity
cc_analyze_methodsDetailed method analysis: params, decorators, visibility, data flow
cc_extract_classesExtract Python classes/functions as separate text blocks

Import Management (2 tools)

ToolDescription
cc_organize_importsSort & deduplicate Python imports per PEP 8
cc_diagnose_importsDetect unused imports, duplicates, circular import risks

JSON Tools (2 tools)

ToolDescription
cc_fix_jsonRepair broken JSON (BOM, trailing commas, comments, single quotes)
cc_validate_jsonValidate JSON with detailed error position and context

Encoding & Text (3 tools)

ToolDescription
cc_fix_encodingFix Mojibake / double-encoded UTF-8 (27+ patterns)
cc_cleanup_fileRemove BOM, NUL bytes, trailing whitespace, normalize line endings
cc_fix_umlautsRepair broken German umlauts (70+ patterns, HTML entities, escapes)

Scanning (1 tool)

ToolDescription
cc_scan_emojiScan files for emojis with codepoint info

Format & Documentation (2 tools)

ToolDescription
cc_convert_formatConvert between JSON, CSV, and INI formats
cc_generate_licensesGenerate third-party license file (npm/pip)

Export (1 tool)

ToolDescription
cc_md_to_pdfMarkdown to HTML: headers, code blocks, tables, nested lists, blockquotes, images, checkboxes

Total: 14 tools


Shared Tools

6 tools exist in both FileCommander and CodeCommander for convenience:

FileCommanderCodeCommanderFunction
fc_fix_jsoncc_fix_jsonJSON repair
fc_validate_jsoncc_validate_jsonJSON validation
fc_fix_encodingcc_fix_encodingEncoding repair
fc_cleanup_filecc_cleanup_fileFile cleanup
fc_convert_formatcc_convert_formatFormat conversion
fc_md_to_htmlcc_md_to_pdfMarkdown to HTML 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)

Reviews

No reviews yet

Sign in to write a review