comment-stripper-mcp
by yhzion
A flexible MCP server that batch processes code files to remove comments across multiple programming languages. It supports various file types and offers efficient comment removal using regex-based pattern matching.
Last updated: N/A
What is comment-stripper-mcp?
This server implements the Model Context Protocol (MCP) to provide a service that removes comments from code files. It accepts individual files, directories (including subdirectories), or direct text input, and returns the cleaned code with comments stripped out.
How to use comment-stripper-mcp?
To use the server, clone the repository, install the dependencies using npm or yarn, and then run the server in development or production mode. You can interact with the server via its API endpoints, providing code, file paths, or directory paths to strip comments from.
Key features of comment-stripper-mcp
Process files, directories, or raw text input
Cross-language support (JS, TS, Vue, CSS/SCSS/LESS, HTML, Python, Java, C#, C++, Ruby, and PHP)
Recursively handle nested directories
Regex-based pattern matching for efficient comment removal
Use cases of comment-stripper-mcp
Automated code cleanup in CI/CD pipelines
Preparing code for distribution or open-sourcing
Reducing code size for improved performance
Removing sensitive comments before sharing code
FAQ from comment-stripper-mcp
What programming languages are supported?
What programming languages are supported?
The server supports JavaScript, TypeScript, Vue, CSS/SCSS/LESS, HTML, Python, Java, C#, C++, Ruby, and PHP.
How do I configure the server?
How do I configure the server?
The server can be configured using environment variables, such as the port, host, log level, and API key.
Does the server support processing directories recursively?
Does the server support processing directories recursively?
Yes, the server can recursively process nested directories to remove comments from all supported files.
Is there an API for accessing the server's functionality?
Is there an API for accessing the server's functionality?
Yes, the server provides an MCP-compliant API with endpoints for stripping comments, getting progress, and checking authentication status.
How can I contribute to the project?
How can I contribute to the project?
Contributions are welcome! Please feel free to submit a Pull Request.