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 input. Built for clean code maintenance and preparation.
Overview
comment-stripper-mcp is a flexible MCP server designed to batch process code files and remove comments across multiple programming languages, including JavaScript, TypeScript, Vue, CSS/SCSS/LESS, HTML, Python, Java, C#, C++, Ruby, and PHP.
To use comment-stripper-mcp, clone the repository, install the dependencies, and run the server in development or production mode. You can send requests to the API to strip comments from files or directories.
- Batch processing of individual files, directories, or raw text input - Cross-language support for various programming languages - Recursive handling of nested directories - Regex-based pattern matching for efficient comment removal - MCP-compliant API for easy integration - Comprehensive logging and error handling - Performance optimization for large files
- Cleaning up code before deployment by removing unnecessary comments.
- Preparing code for open-source contributions by stripping out comments.
- Automating the comment removal process in CI/CD pipelines.
Add to your AI client
Use these steps to connect comment-stripper-mcp in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"comment-stripper-mcp-yhzion": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comment-stripper-mcp-yhzion"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"comment-stripper-mcp-yhzion": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comment-stripper-mcp-yhzion"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"comment-stripper-mcp-yhzion": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comment-stripper-mcp-yhzion"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"comment-stripper-mcp-yhzion": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comment-stripper-mcp-yhzion"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"comment-stripper-mcp-yhzion": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comment-stripper-mcp-yhzion"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"comment-stripper-mcp-yhzion": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-comment-stripper-mcp-yhzion"
]
}
}
}FAQ
What programming languages does comment-stripper-mcp support?
It supports JavaScript, TypeScript, Vue, CSS/SCSS/LESS, HTML, Python, Java, C#, C++, Ruby, and PHP.
How do I run the server?
You can run the server in development mode using `npm run dev` or in production mode using `npm start` after building the project.
Is there an API for this project?
Yes, comment-stripper-mcp provides an API to strip comments from code files and check processing progress.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2652,"uuid":"ae6bda50-7121-4437-9966-7f4b386a9877","name":"comment-stripper-mcp","title":"comment-stripper-mcp","description":"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 input. Built for clean code maintenance and preparation.","avatar_url":"https://avatars.githubusercontent.com/u/15242292?v=4","created_at":"2025-03-13T09:23:45.304Z","updated_at":"2025-03-13T09:39:21.145Z","status":"created","author_name":"yhzion","author_avatar_url":"https://avatars.githubusercontent.com/u/15242292?v=4","tags":"comment-stripper,code-cleaner,mcp-server","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/yhzion/comment-stripper-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-10 15:34:25\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]