leetcode-helper
Provides tools for analyzing LeetCode problems, including approach analysis, hints, complexity breakdowns, and generating discussion posts.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@leetcode-helperGet approach for two sum problem"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
leetcode-helper
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 |
| problem | Pattern, steps, TC/SC |
| problem + where stuck | Nudge, no spoilers |
| problem + code | TC/SC breakdown per block |
| problem + accepted code | Discussion post ready to copy |
| problem | 3–5 problems for the same pattern |
| problem + working code | Optimization direction, not solution |
Related MCP server: Aurai Advisor (上级顾问 MCP)
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 buildConnect 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.mdAdding a New Tool
Create
src/tools/your_tool.ts— exportname,description,schema(Zod),handlerAdd one import + one entry in
src/tools/registry.tsnpm 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 |
|
Schema validation | Zod |
LLM | Anthropic |
Transport | stdio |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Navoren/leetcode-helper'
If you have feedback or need assistance with the MCP directory API, please join our Discord server