Analyzes changed files from git (staged and unstaged) to detect and remove AI-generated code slop patterns.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Deslop MCP Serveranalyze my TypeScript file for unnecessary comments and logging"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
deslop-mcp
An MCP (Model Context Protocol) server that detects and removes AI-generated code slop patterns.
Works with Cursor, Claude Desktop, Claude Code, and any MCP-compatible client.
What is "Slop"?
AI-generated code often includes patterns that hurt maintainability:
Comment slop: Comments that restate what code does ("This function gets the user")
Verbose logging: Entry/exit logs, debug statements left in production
Unnecessary error handling: Try-catch that only logs and re-throws
Defensive overkill: Redundant null checks in TypeScript
Async misuse:
asyncfunctions with noawaitUnused imports: Dead code from refactoring
Installation
Option 1: Clone from GitHub
git clone https://github.com/YOUR_USERNAME/deslop-mcp.git
cd deslop-mcp
npm install
npm run buildOption 2: npm (if published)
npm install -g deslop-mcpConfiguration
For Cursor
Add to your Cursor MCP settings (~/.cursor/mcp.json or via Settings > MCP):
{
"mcpServers": {
"deslop": {
"command": "node",
"args": ["/path/to/deslop-mcp/dist/index.js"]
}
}
}For Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"deslop": {
"command": "node",
"args": ["/path/to/deslop-mcp/dist/index.js"]
}
}
}For Claude Code
Add to your Claude Code MCP settings:
{
"mcpServers": {
"deslop": {
"command": "node",
"args": ["/path/to/deslop-mcp/dist/index.js"]
}
}
}Tools
deslop_analyze
Analyze code files for slop patterns.
deslop_analyze({ path: "./src" })
deslop_analyze({ path: "./src/utils/api.ts" })Returns a detailed report with:
Issues grouped by category
Priority levels (high/medium/low)
Line numbers for each issue
Auto-fixable indicators
deslop_fix
Automatically fix auto-fixable issues.
deslop_fix({ path: "./src" })
deslop_fix({ path: "./src", dryRun: true }) // Preview without changesdeslop_diff
Analyze only changed files from git.
deslop_diff({}) // Unstaged changes
deslop_diff({ staged: true }) // Staged changes onlyExample Output
# Deslop Analysis Report
## Summary
- π΄ High Priority: 12 issues
- π‘ Medium Priority: 5 issues
- π΅ Low Priority: 2 issues
- π§ Auto-fixable: 10 issues
## src/services/userService.ts
### π΄ Comment Slop (3)
- **Line 45**: Comment restates what code does instead of why
`// This function gets the user from the database`
*(auto-fixable)*
- **Line 78**: Commented-out code should be removed
`// const oldUser = await getOldUser(id);`
*(auto-fixable)*
### π΄ Verbose Logging (2)
- **Line 23**: Debug/trace logging should be removed in production
`console.log("Entering getUserById");`
*(auto-fixable)*Supported Languages
TypeScript (.ts, .tsx)
JavaScript (.js, .jsx)
Python (.py)
Java (.java)
Go (.go)
Rust (.rs)
Safety
The tool will never remove:
Error logging that captures actual errors
Comments explaining business logic or "why"
License headers or copyright notices
TODO comments with ticket references
License
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.