Skip to content

apex-500/codeffect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Codeffect

AI-Powered Code Optimization MCP Server

10 AI agents analyze, fix, and verify your code — automatically.

Quick StartFeatures12 ToolsPricingDemo


AI writes 41% of all code now. But AI-generated code has 2.74x more security vulnerabilities. Codeffect fixes that — automatically.

What is Codeffect?

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.

Quick Start

# 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

Features

Detection Team (4 Agents)

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

Fix Team (4 Agents)

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

QA Team (2 Agents)

Agent Validates
PreCheckQA Syntax, function preservation, import safety, no new vulnerabilities
PostCheckQA Diff generation, metrics comparison, improvement scoring, grade report

12 MCP Tools

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

Demo

# 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

Supported Languages

Language Analysis Auto-Fix
Python Full (AST + regex) Full
JavaScript/TypeScript Full (regex) Full
Java, Go, Rust, Ruby, PHP Generic patterns Annotations

Pricing

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

Pay with Crypto (MetaMask)

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.

Why Codeffect?

  • 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.

Architecture

┌─────────────────────────────────────────────┐
│                 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 │ │                  │
│  └────────┘ │ └────────┘ │                  │
└─────────────┴────────────┴──────────────────┘

License

MIT


Built for the vibe coding era.
AI writes the code. Codeffect makes it production-ready.

Releases

No releases published

Packages

 
 
 

Contributors