MCP.so
Sign In

comment-stripper-mcp

@yhzion

About comment-stripper-mcp

A flexible MCP server that batch processes code files to remove comments across multiple programming languages. Currently supports JavaScript, TypeScript, and Vue files with regex-based pattern matching. Handles individual files, directories (including subdirectories), and text i

Basic information

Category

Other

Runtime

node

Transports

stdio

Publisher

yhzion

Config

No standard config provided

This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.

Repository

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is comment-stripper-mcp?

comment-stripper-mcp is an MCP server that batch processes code files to remove comments across multiple programming languages using regex-based pattern matching. It supports JavaScript, TypeScript, Vue, CSS/SCSS/LESS, HTML, Python, Java, C#, C++, Ruby, and PHP files. The server is built with Node.js and TypeScript, following Test-Driven Development methodology.

How to use comment-stripper-mcp?

Install Node.js 18+, clone the repository, and install dependencies. Use npm run dev for development or npm run build && npm start for production. The server runs on port 3000 by default. Configure via environment variables in a .env file. The main endpoint is POST /api/strip-comments accepting text, filePath, directoryPath, recursive, fileTypes, and trackProgress parameters.

Key features of comment-stripper-mcp

  • Process files, directories, or raw text input
  • Cross-language support for 11 programming languages
  • Recursively handle nested directories
  • Regex-based pattern matching for efficient comment removal
  • MCP-compliant API for easy integration
  • Comprehensive logging with multiple levels
  • API authentication for secure access
  • Progress tracking for large directory processing

Use cases of comment-stripper-mcp

  • Clean code files before analysis or transformation
  • Remove comments from source code for minification or obfuscation
  • Strip comments from legacy codebases to simplify migration
  • Batch process multiple files across directories and subdirectories
  • Preprocess code before sending to language models or code review tools

FAQ from comment-stripper-mcp

How does comment-stripper-mcp remove comments?

It uses regex-based pattern matching specifically tailored for each supported language to identify and remove both single-line and multi-line comments.

What file types are supported?

JavaScript, TypeScript, Vue, CSS/SCSS/LESS, HTML, Python, Java, C#, C++, Ruby, and PHP files.

What are the runtime requirements?

Node.js 18 or higher, with npm or yarn installed.

How is the server configured?

Through environment variables defined in a .env file, covering port, host, log level, performance settings (chunk size, max workers, memory limit), and API authentication key.

How can I troubleshoot MCP connection issues with Claude Desktop?

Use absolute paths in the Claude Desktop config, ensure clean Node.js environment (e.g., via NVM), and check log files. The server includes stability improvements like process.stdin.resume() and keep-alive mechanisms.

Comments

More Other MCP servers