Deslop MCP Server
Detects and automatically removes AI-generated code slop patterns like redundant comments, verbose logging, and unnecessary error handling across multiple programming languages.
README
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 noawait - Unused 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 build
Option 2: npm (if published)
npm install -g deslop-mcp
Configuration
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 changes
deslop_diff
Analyze only changed files from git.
deslop_diff({}) // Unstaged changes
deslop_diff({ staged: true }) // Staged changes only
Example 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.