leetcode-helper
Provides tools for analyzing LeetCode problems, including approach analysis, hints, complexity breakdowns, and generating discussion posts.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
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: LeetCode MCP Server
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 |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Related MCP Connectors
An MCP server that integrates with Discord to provide AI-powered features.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server for AI agent profiles and smart notes. 60+ coding prompt packs with expert personas.
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop
Related MCP Servers
- AlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and contest data.754 npm44MIT
- FlicenseAqualityDmaintenanceAn MCP server that provides tools to interact with the LeetCode API, enabling problem fetching, code template generation, and solution execution/submission.71-
- AlicenseAqualityCmaintenanceAn MCP server for agent-guided DSA practice that generates LeetCode-style problems and provides tutoring with escalating hints, concept explanations, and progress tracking.77 npmMIT
- FlicenseNot gradedqualityDmaintenanceA tutorial and working MCP server that connects to your LeetCode profile, enabling AI assistants to check solved problems and recommend new ones by topic and difficulty.1-