AI-powered code review assistant that combines the Model Context Protocol (MCP), Anthropic Claude, and Supabase to deliver fast, context-aware feedback on JavaScript and TypeScript code.
Lintelligent is a thesis project that demonstrates how MCP can enrich AI models with project-specific rules, standards, and files. Users can paste code directly or fetch source files from their GitHub repositories after authenticating with OAuth. The backend analyses code with Claude 3 Haiku, augmented by MCP tooling and repository context, and stores the feedback in Supabase along with thumbs-up/down ratings.
- Paste arbitrary code and receive structured feedback with prioritized suggestions.
- GitHub integration that lets users browse repos, branches, and filtered file trees.
- Dedicated MCP servers that supply coding standards and repository context to the AI.
- Feedback view grouped by severity, including inline fix suggestions.
- Rating system (thumbs up/down) to track feedback quality and persist statistics in Supabase.
- Secure session handling with signed cookies and strict CORS configuration.
Monorepo managed with Yarn workspaces and separate packages for the frontend, backend, and MCP servers.
Lintelligent/
├── backend/ # Express API, MCP integration, Supabase client
├── frontend/ # React 19 app with Tailwind-inspired UI components
├── mcp-servers/ # Standalone MCP servers (code standards + repo context)
└── docs/ # Project documentation (AI instructions, architecture notes, etc.)
┌─────────────────┐
│ User Input │
└────────┬────────┘
│
│ POST /api/review
▼
┌─────────────────┐
│ Frontend React │
│ (UI Layer) │
└────────┬────────┘
│
│ HTTP Request
▼
┌─────────────────┐
│ Backend Express │
│ (API Layer) │
└────────┬────────┘
│
┌────────────┴────────────┐
│ │
│ Call MCP tools │
│ │
▼ ▼
┌────────────────────┐ ┌────────────────────┐
│ MCP: code-standards│ │ MCP: repo-context │
│ Coding Standards │ │ GitHub Context │
│ Security Rules │ │ Project Files │
└──────────┬─────────┘ └──────────┬─────────┘
│ │
└────────────┬────────────┘
│
│ Return context
▼
┌─────────────────┐
│ Backend Express │
│ (combines all) │
└────────┬────────┘
│
│ Code + Context
▼
┌─────────────────┐
│ AI Anthropic │
│ Claude Sonnet │
└────────┬────────┘
│
│ JSON Response
▼
┌─────────────────┐
│ Backend Express │
└────────┬────────┘
│
┌────────────┴────────────┐
│ │
│ Save review │ Return JSON
│ │
▼ ▼
┌───────────────────┐ ┌─────────────────┐
│ Database Supabase │ │ Frontend React │
│ (Dead End) │ │ │
└───────────────────┘ └────────┬────────┘
│
│ Display
▼
┌─────────────────┐
│ User Feedback │
└─────────────────┘
- Frontend: React 19, TypeScript, react-simple-code-editor, PrismJS, Tailwind-style theming.
- Backend: Node.js (ESM), Express, Helmet, CORS, cookie-parser, Supabase, MCP SDK.
- AI & MCP: Anthropic Claude 3 Haiku plus two TypeScript MCP servers (
code-standards,repo-context). - Tooling: Yarn workspaces, TSX for development runs,
concurrentlyfor combined dev startup.
- Node.js 20 or later.
- Yarn (classic v1) installed globally.
- Accounts and credentials for Anthropic, GitHub OAuth, and Supabase.
- Clone the repository and switch to the project root.
- Install all workspace dependencies:
yarn install
Create /Users/Dev/Projects/Lintelligent/backend/.env and populate:
PORT=3001
SESSION_SECRET=change-me
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
GITHUB_REDIRECT_URI=http://localhost:3001/api/auth/github/callback
ANTHROPIC_API_KEY=sk-...
SUPABASE_URL=https://<project>.supabase.co
SUPABASE_ANON_KEY=...
PORT and GITHUB_REDIRECT_URI can stay at their defaults for local development. Set NODE_ENV=production in production to enable secure cookies.
- Start frontend and backend together:
yarn dev
- Or run them separately:
yarn start:backend yarn start:frontend
The frontend runs on http://localhost:3000 and the backend on http://localhost:3001.
-
Backend:
yarn workspace backend build # Compiles TypeScript to dist/ yarn workspace backend start # Runs the compiled code
The build outputs to
backend/dist/. Ensure all environment variables are set before runningstart. -
Frontend:
yarn workspace frontend build # Creates optimized production build in build/The build outputs to
frontend/build/and can be served by any static file server or deployed to platforms like Vercel.
-
Frontend tests (React Testing Library):
yarn workspace frontend testRuns tests in watch mode by default. Press
ato run all tests, orqto quit. -
Backend tests (Vitest):
yarn workspace backend testRuns all test suites once. Tests are located in
backend/src/__tests__/.
Primary backend endpoints:
GET /– health check.GET /api/auth/github/login&GET /api/auth/github/callback– GitHub OAuth flow.GET /api/auth/me&POST /api/auth/logout– session status.GET /api/github/repos,/branches,/tree,/contents– proxied GitHub API calls (requires login).POST /api/review– sends code to Claude through MCP and returns structured feedback.PATCH /api/review/:id/rating– stores thumbs-up/down for a review.
Refer to backend/src/index.ts for the full implementation.
Two MCP servers live under mcp-servers/:
code-standards: returns high-priority coding standards and security rules for the selected language.repo-context: gathers repository context (package.json, tsconfig, related files) to provide project awareness to the AI.
The backend launches them automatically via npx tsx src/index.ts during a review and compresses their responses into concise hints that accompany the prompt.
Currently, Supabase serves as a logging archive for AI-generated feedback and user ratings. When a user submits code for review, the AI's suggestions and feedback are automatically saved along with the original code. Users can rate the quality of the AI feedback with thumbs up/down, and these ratings are persisted. However, this data is not yet displayed in the UI.
Future features could include:
- A review history page showing past code reviews with their ratings
- Statistics and analytics based on user ratings
- Learning loops to improve AI suggestions based on rating patterns
The code_reviews table schema:
create table if not exists code_reviews (
id uuid primary key,
created_at timestamptz default now(),
code text not null,
language text not null,
review_type text not null,
ai_feedback jsonb not null,
ai_model text not null,
user_rating integer,
rated_at timestamptz
);Additional background and guidelines:
docs/CLAUDE.md– detailed project plan and requirements.docs/README.md– supplementary architecture details.
- GitHub login fails: verify
GITHUB_CLIENT_ID/SECRETand that the redirect URL matches your GitHub OAuth app settings. - No AI response: ensure
ANTHROPIC_API_KEYis valid and the account has access to Claude 3 Haiku. - Supabase errors: double-check
SUPABASE_URL,SUPABASE_ANON_KEY, and that thecode_reviewstable exists.
Distributed under the MIT License. See LICENSE for details.