AI Coding Ideas
← Back to Ideas

CodeOdor - Real-Time AI Code Smell Detection in Cursor IDE

An MCP server that runs in Cursor and flags architectural debt, anti-patterns, and code smells before you commit. Think eslint but for design patterns and architectural decisions, powered by Claude.

Difficulty

intermediate

Category

Developer Tools

Market Demand

Very High

Revenue Score

7/10

Platform

MCP Server

Vibe Code Friendly

⚡ Yes

Hackathon Score

🏆 8/10

What is it?

Developers waste hours in code reviews catching the same mistakes: circular dependencies, god objects, missing error handling, untested mutations. CodeOdor runs silently in Cursor as an MCP server, analyzing your file as you type, surfacing issues like 'this function has 15 parameters (anti-pattern: consider object destructuring)', 'you've repeated this 3-line snippet 8 times (consider extracting)', or 'this async chain lacks error boundaries'. It learns your codebase's conventions via a quick setup phase, then becomes your silent pair programmer. Revenue comes from a freemium model: 3 checks/day free, unlimited for $9/month, plus enterprise contracts with dev teams. Why 100% buildable right now: Claude's API now supports file context efficiently, Cursor's MCP protocol is stable and well-documented, and pattern detection doesn't require custom model training — just smart prompt engineering with your actual code as input.

Why now?

Cursor's MCP plugin ecosystem just hit critical mass (March 2026), and Claude 3.5's code understanding is now cheap and reliable enough to run per-keystroke. AI code review demand is at peak hype.

  • Real-time smell detection as you type (Implementation: Claude streaming with debounce on keystroke)
  • Codebase-aware learning (scan git history for patterns once on first run)
  • Severity scoring and auto-fix suggestions
  • Team rule sharing via JSON config files

Target Audience

Solo developers and small engineering teams (2-10 people) building in Python, JavaScript, or Go. ~50,000 Cursor users actively shipping code weekly.

Example Use Case

Sarah, a solo Rust engineer, uses CodeOdor to catch missing Result error handling before pushing. The tool flags 12 uncovered error paths in her auth module, saves her from a production incident, and she subscribes at $9/month.

User Stories

  • As a solo developer, I want to catch code smells before code review, so that I ship cleaner code and reduce revision cycles.
  • As a junior engineer, I want AI-powered explanations of why my code is problematic, so that I learn architectural patterns faster. As an engineering team lead, I want team-wide code smell data, so that I can prioritize refactoring and training.

Acceptance Criteria

MCP Server: done when Cursor can call it without errors and returns valid smell JSON. Smell Detection: done when Claude correctly flags 8+ common patterns on a test file. Caching: done when repeat analyses of same file return results under 50ms. Upgrade Flow: done when Stripe checkout grants API key and increases daily check limit.

Is it worth building?

$9/month × 120 users = $1,080 MRR at month 3. $9/month × 400 users = $3,600 MRR at month 6.

Unit Economics

CAC: ~$15 via ProductHunt organic launch and Reddit posts (estimated $600 spend equivalent in founder time across first 40 paid users). LTV: $108 (12 months at $9/month, assuming 70% annual retention). Payback: under 2 months. Gross margin: ~75% after Claude API costs (~$2/user/month at typical usage).

Business Model

Freemium SaaS (API-gated checks) + enterprise contracts.

Monetization Path

Free tier: 3 smell checks per day. Paid: unlimited checks, custom rules, integration logs. Enterprise: annual contract.

Revenue Timeline

First dollar: week 3 via freemium upgrade. $1k MRR: month 4. $3k MRR: month 7. $8k MRR: month 12.

Estimated Monthly Cost

Claude API: $80, Vercel hosting: $20, Stripe fees: ~$12, domain: $2. Total: ~$114/month at launch.

Profit Potential

Full-time viable at $3k–$8k MRR.

Scalability

High — can expand to language-specific rule engines, team analytics dashboard, and IDE integration for VS Code.

Success Metrics

Week 2: 50 Cursor community signups. Week 3: 15 paid conversions. Month 2: 80% retention.

Launch & Validation Plan

Post in Cursor community Slack with early access link, recruit 15 beta testers from Reddit r/learnprogramming and indie hacker Discord, measure daily activation.

Customer Acquisition Strategy

First customer: DM 10 active Cursor users on X offering free lifetime pro in exchange for 2 weekly feedback calls. Ongoing: ProductHunt launch, Cursor community sponsorship, Twitter code posts, Reddit r/webdev.

What's the competition?

Competition Level

Low

Similar Products

SonarQube for enterprise teams, CodeFactor for CI pipelines, ESLint for JavaScript only — none are real-time, Cursor-native, or AI-powered.

Competitive Advantage

Runs directly inside Cursor (no separate app), learns your codebase conventions, freemium model with no setup friction.

Regulatory Risks

Low regulatory risk. Code analysis is non-sensitive. GDPR compliance needed only if storing user code snippets (avoid this in v1).

What's the roadmap?

Feature Roadmap

V1 (launch): real-time smell detection, 3 checks/day free, Stripe billing, community fallback. V2 (month 2-3): custom rule JSON, team dashboards, GitHub Actions integration. V3 (month 4+): auto-fix suggestions, codebase metrics export, VS Code port.

Milestone Plan

Phase 1 (Week 1-2): MCP server scaffold, Claude integration, file watcher working, caching layer done (MVP: 4 smell patterns working). Phase 2 (Week 3): Stripe gating, npm publish, landing page live, 10 beta testers onboarded. Phase 3 (Month 2): ProductHunt launch, telemetry dashboard, support flow established, first 25 paid users.

How do you build it?

Tech Stack

Claude API with MCP server protocol, Cursor IDE, Node.js backend for MCP using @modelcontextprotocol/sdk (official Anthropic SDK), SQLite via better-sqlite3 for local cache, TypeScript — publish as npm package.

Suggested Frameworks

-

Time to Ship

3 weeks

Required Skills

Claude API integration, MCP server implementation, code parsing, TypeScript.

Resources

Cursor MCP docs, Claude API cookbook, Node.js MCP examples from Anthropic.

MVP Scope

MCP server entry point, Claude prompt for pattern detection, file watcher in Cursor, basic Stripe webhook handler, SQLite cache for recent checks, npm package bundler, landing page.

Core User Journey

Install MCP server from npm -> open a file in Cursor -> see first smell alert in sidebar -> click 'understand' -> read explanation -> upgrade to paid.

Architecture Pattern

Cursor keystroke -> MCP server receives file snapshot -> Claude API analyzes with context -> cache lookup for recent files -> results returned to Cursor UI -> telemetry logged to Postgres.

Data Model

User has one MCP Installation. Installation has many AnalysisCache entries. User has many Smells (detected issues). Smell has many FixSuggestions.

Integration Points

Claude API for analysis, MCP protocol for Cursor communication, Stripe for payments, Resend for emails, GitHub API optional (for repo scanning).

V1 Scope Boundaries

V1 excludes: team dashboards, VS Code integration, fix automation, git history analysis, paid enterprise features beyond API gating.

Success Definition

A paying developer finds CodeOdor on ProductHunt, installs the MCP server, receives smell detection on their first file, upgrades to paid within 7 days, and actively uses it 3+ times per week.

Challenges

Claude API costs scale with file size. Requires smart caching and batch analysis to stay profitable under $50/month API spend.

Avoid These Pitfalls

Do not stream Claude responses per-keystroke — MCP tools are invoked synchronously by Cursor and streaming complicates the stdio transport; use a single blocking call with a 10-second timeout instead. Do not send entire large files to Claude on every invocation — chunk files over 300 lines and only send the changed function's surrounding context (±50 lines) to keep API costs under $0.01 per check. Do not build a custom file watcher daemon that runs alongside Cursor — this conflicts with Cursor's process model; rely on Cursor's agent invoking your MCP tool explicitly rather than trying to hook into editor events. Do not store or log user source code on your server even temporarily — developers are paranoid about IP leakage and a single Reddit post claiming you do will kill the product; enforce memory-only analysis strictly. Do not rely solely on Claude to parse code structure — for detecting metrics like parameter count or nesting depth, pre-process with a lightweight AST library (acorn for JS, tree-sitter bindings) before sending to Claude, which cuts token usage and improves accuracy. Do not gate the free tier so aggressively that users never experience value — 3 checks/day will frustrate active developers; consider unlimited checks on files under 100 lines for free to drive activation.

Security Requirements

Auth: Stripe OAuth for billing. Rate limiting: 100 API calls per hour per user. Input: sanitize file paths. Data: do NOT store user code — analyze in memory only. MCP server runs locally (zero server-side code storage).

Infrastructure Plan

Hosting: Vercel for landing page and telemetry API. Database: Supabase for usage logs and billing data. MCP server: runs locally in user's Cursor (no server backend). CI/CD: GitHub Actions for npm package publishing. Monitoring: Sentry for API errors, basic usage metrics in Supabase.

Performance Targets

Expected load: 50 DAU at launch, 500 req/day. MCP server response time: under 2 seconds per smell analysis. File cache hit rate: 70%+ after week 1. Cursor IDE responsiveness: no perceptible lag from MCP calls.

Go-Live Checklist

  • Security audit: code paths don't leak user source
  • Payment flow: Stripe billing tested end-to-end with real charges reversed
  • MCP server: tested with real Cursor v0.30+
  • npm package: published and installable
  • Landing page: deployment tested
  • Privacy policy: published (clarifying no code storage)
  • 5+ beta testers: sign-off on usability
  • Rollback: documented process for reverting npm package
  • Launch: ProductHunt post drafted, Twitter thread ready, Reddit r/webdev and r/neovim outreach queued.

How to build it, step by step

1. Scaffold MCP server manually: run 'npm init -y && npm install @modelcontextprotocol/sdk @anthropic-ai/sdk better-sqlite3 typescript' — there is no create-mcp-server scaffolder; use Anthropic's official MCP TypeScript SDK examples as starting point (github.com/modelcontextprotocol/typescript-sdk). 2. Implement stdio transport using 'StdioServerTransport' from @modelcontextprotocol/sdk — Cursor communicates with MCP servers over stdio, so register your server with 'server.connect(transport)' and expose a 'detect_smells' tool definition with inputSchema for file path and content. 3. Write the smell detection tool handler: accept {filePath, fileContent, language} as input, construct a structured Claude prompt that lists 10 target anti-patterns (god objects, missing error handling, deep nesting >4 levels, repeated logic, unused params, etc.), call Anthropic client with claude-3-5-sonnet-20241022, and return parsed JSON array of {line, pattern, severity, explanation}. 4. Add debounce logic in the Cursor MCP config (mcp.json) — Cursor calls your MCP tool on demand, not on every keystroke; document this clearly so users configure a keyboard shortcut or rely on Cursor's agent to invoke it, rather than building a flawed keystroke watcher. 5. Implement SQLite cache using better-sqlite3: hash fileContent with crypto.createHash('sha256'), store {hash, results, timestamp} in local ~/.codeodor/cache.db, return cached results immediately if hash matches and entry is under 10 minutes old. 6. Build API key gating: on tool invocation, read API key from env or local config file, call your Vercel /api/check-quota endpoint to verify daily limit (free: 3/day), return quota-exceeded error with upgrade URL if limit hit. 7. Configure package.json 'bin' field pointing to compiled dist/index.js, add 'postinstall' script printing Cursor mcp.json setup instructions, then 'npm publish --access public'. 8. Build landing page on Vercel with a single CTA: 'npm install -g codeodor' + copy-paste mcp.json snippet. 9. Set up Stripe: create two products (free/pro) via Stripe dashboard, build /api/create-checkout (Vercel function) that creates a Stripe Checkout session, and /api/webhook that sets user quota in Supabase on 'checkout.session.completed'. 10. Test end-to-end: install your published npm package in a real Cursor workspace, add mcp.json config, open a deliberately smelly JS file (god function, no error handling), invoke tool via Cursor agent, verify JSON smell results appear, verify cache returns in <50ms on second call, verify Stripe checkout grants unlimited quota.

Generated

March 29, 2026

Model

claude-haiku-4-5-20251001 · reviewed by Claude Sonnet

← Back to All Ideas