Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Leetcode Helper

FreeNot checked

An MCP server that provides structured, AI-powered guidance for LeetCode problems, including approach analysis, hints, complexity breakdowns, and optimization d

GitHubEmbed

About

An MCP server that provides structured, AI-powered guidance for LeetCode problems, including approach analysis, hints, complexity breakdowns, and optimization directions without spoiling solutions.

README

An MCP server that gives structured, AI-powered DSA guidance inside Claude Desktop or Claude Code — approach analysis, hints, complexity breakdowns, and more, without spoiling the solution.


Tools at a Glance

Tool Input What it returns
get_approach problem Pattern, steps, TC/SC
get_hint problem + where stuck Nudge, no spoilers
get_complexity problem + code TC/SC breakdown per block
post_solution problem + accepted code Discussion post ready to copy
similar_questions problem 3–5 problems for the same pattern
upsolve problem + working code Optimization direction, not solution

Setup

Prerequisites: Node.js 18+, an ANTHROPIC_API_KEY

git clone https://github.com/Navoren/leetcode-helper.git
cd leetcode-helper
npm install
npm run build

Connect to Claude Code

Add to .claude/settings.json (project or global):

{
  "mcpServers": {
    "leetcode-helper": {
      "command": "node",
      "args": ["d:/leetcode-helper/dist/index.js"],
      "env": {
        "ANTHROPIC_API_KEY": "your-key-here"
      }
    }
  }
}

Connect to Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "leetcode-helper": {
      "command": "node",
      "args": ["/absolute/path/to/leetcode-helper/dist/index.js"],
      "env": {
        "ANTHROPIC_API_KEY": "your-key-here"
      }
    }
  }
}

Example Usage

Getting an approach:

"Use get_approach on: Given an array of integers, return indices of two numbers that add up to target."

Getting a hint when stuck:

"Use get_hint — problem: two sum, stuck on: my nested loop works but is too slow"

Generating a discussion post:

"Use post_solution with my accepted Python solution for two sum"

Upsolving:

"Use upsolve — here's my O(n²) solution, help me think toward better"


Project Structure

leetcode-mcp/
├── src/
│   ├── index.ts               # Entry point
│   ├── server.ts              # McpServer setup
│   ├── lib/
│   │   └── claude.ts          # Anthropic API client
│   └── tools/
│       ├── registry.ts        # Registers all tools (one line per tool)
│       ├── get_approach.ts
│       ├── get_hint.ts
│       ├── get_complexity.ts
│       ├── post_solution.ts
│       ├── similar_questions.ts
│       └── upsolve.ts
├── dist/                      # Compiled output
├── functional_requirement.md
├── technical_document.md
└── CLAUDE.md

Adding a New Tool

  1. Create src/tools/your_tool.ts — export name, description, schema (Zod), handler
  2. Add one import + one entry in src/tools/registry.ts
  3. npm run build

No changes to server.ts, index.ts, or claude.ts.


Tech Stack

Layer Choice
Runtime Node.js (ESM)
Language TypeScript 5
MCP SDK @modelcontextprotocol/sdk
Schema validation Zod
LLM Anthropic claude-sonnet-4-6
Transport stdio

from github.com/Navoren/leetcode-helper

Installing Leetcode Helper

This server has no published package — it is built from source. Open the repository and follow its README.

▸ github.com/Navoren/leetcode-helper

FAQ

Is Leetcode Helper MCP free?

Yes, Leetcode Helper MCP is free — one-click install via Unyly at no cost.

Does Leetcode Helper need an API key?

No, Leetcode Helper runs without API keys or environment variables.

Is Leetcode Helper hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Leetcode Helper in Claude Desktop, Claude Code or Cursor?

Open Leetcode Helper on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Leetcode Helper with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All ai MCPs