AI-Powered Code Optimization MCP Server
10 AI agents analyze, fix, and verify your code — automatically.
Quick Start • Features • 12 Tools • Pricing • Demo
AI writes 41% of all code now. But AI-generated code has 2.74x more security vulnerabilities. Codeffect fixes that — automatically.
Codeffect is an MCP server that optimizes your code through a team of 10 specialized AI agents:
Your Code → [4 Analyzers] → [4 Fixers] → [2 QA Checkers] → Optimized Code
One command. Zero manual review. Works with Claude Code, Cursor, Cline, Windsurf — any MCP client.
# Install
pip install codeffect
# Add to Claude Code
claude mcp add codeffect -- python -m codeffect
# Or add to claude_desktop_config.json
{
"mcpServers": {
"codeffect": {
"command": "python",
"args": ["-m", "codeffect"]
}
}
}
Then just ask Claude:
"Optimize my code" → runs all 10 agents automatically
| Agent | Detects |
|---|---|
| CodeAnalyzer | Duplicate code, dead code, unused imports, mutable defaults, empty except blocks |
| PerfAnalyzer | O(n²) loops, string concat in loops, N+1 queries, blocking I/O, memory leaks |
| CostAnalyzer | API calls in loops, missing timeouts, SELECT *, no caching, token waste |
| SecurityAnalyzer | SQL injection, XSS, hardcoded secrets, eval(), pickle, weak crypto, path traversal |
| Agent | Fixes |
|---|---|
| DuplicateFixer | Removes unused imports, fixes var→const, cleans commented code |
| PerfFixer | list→generator, time.sleep→asyncio.sleep, structuredClone() |
| CostFixer | Adds timeouts, connection pooling, caching, streaming |
| SecurityFixer | eval→literal_eval, HTTPS, env vars, yaml.safe_load, parameterized queries |
| Agent | Validates |
|---|---|
| PreCheckQA | Syntax, function preservation, import safety, no new vulnerabilities |
| PostCheckQA | Diff generation, metrics comparison, improvement scoring, grade report |
| Tool | Description |
|---|---|
analyze_code |
Scan for duplicates, dead code, unused dependencies |
analyze_performance |
Detect O(n²), memory leaks, bottlenecks |
analyze_cost |
Find expensive API/DB/token patterns |
analyze_security |
OWASP Top 10 vulnerability detection |
full_analysis |
Run all 4 analyzers at once |
fix_duplicates |
Auto-fix code quality issues |
fix_performance |
Auto-fix performance issues |
fix_cost |
Auto-fix cost issues |
fix_security |
Auto-fix security vulnerabilities |
full_fix |
Run all 4 fixers in optimal order |
pre_check / post_check |
QA validation before and after fixes |
optimize |
One-click full pipeline: Analyze → Fix → QA → Report |
# Before: 18 issues detected
import os
import json
import unused_lib # ← unused import
password = 'supersecret' # ← hardcoded secret
def fetch_users():
for uid in ids:
requests.get(f'http://api.com/{uid}') # ← API in loop, no timeout, HTTP
data = eval(resp.text) # ← eval() injection
cursor.execute(f"SELECT * FROM users WHERE id = {uid}") # ← SQL injection
# After: Codeffect optimized
import os
import json
password = os.environ.get("PASSWORD")
def fetch_users():
session = requests.Session()
# Batch API calls instead of loop
session.get('https://api.com/batch', timeout=30)
data = ast.literal_eval(resp.text)
cursor.execute("SELECT id, name FROM users WHERE id = ?", (uid,))
Result: Score 50 → 85 | 6 security fixes | 4 performance fixes | 3 cost fixes
| Language | Analysis | Auto-Fix |
|---|---|---|
| Python | Full (AST + regex) | Full |
| JavaScript/TypeScript | Full (regex) | Full |
| Java, Go, Rust, Ruby, PHP | Generic patterns | Annotations |
| Plan | Price | Includes |
|---|---|---|
| Free | $0 | 50 optimizations/month |
| Pro | $8/mo | Unlimited optimizations, all 15 tools, priority support |
| Team | $29/mo | Everything in Pro + team dashboard, CI/CD integration |
Wallet: 0x2Fd28D0e56798796175C6AC9cdf1CE5B44670702
Accepted: ETH, USDT, USDC
Networks: Ethereum, Base (low gas), Arbitrum (low gas)
Just ask Claude: "I want to upgrade to Pro" → get payment instructions → send crypto → activate with tx hash.
- For Vibe Coders: You don't need to understand the code to optimize it. Just run
optimize. - For AI Agents: Built as MCP — any AI agent can use it automatically.
- For Teams: Catch issues before they hit production. Save 30-60% on API/DB costs.
- 10 agents > 1 linter: Static analysis + dynamic fixes + QA verification in one pipeline.
┌─────────────────────────────────────────────┐
│ MCP Client │
│ (Claude / Cursor / Cline) │
└──────────────────┬──────────────────────────┘
│
┌──────────────────▼──────────────────────────┐
│ Codeffect MCP Server │
├─────────────┬────────────┬──────────────────┤
│ Detection │ Fix │ QA │
│ ┌────────┐ │ ┌────────┐ │ ┌──────────────┐ │
│ │Code │ │ │Dup Fix │ │ │PreCheck QA │ │
│ │Perf │ │ │Perf Fix│ │ │PostCheck QA │ │
│ │Cost │ │ │Cost Fix│ │ └──────────────┘ │
│ │Security│ │ │Sec Fix │ │ │
│ └────────┘ │ └────────┘ │ │
└─────────────┴────────────┴──────────────────┘
MIT
Built for the vibe coding era.
AI writes the code. Codeffect makes it production-ready.