Interactive Leetcode MCP server
io.github.SPerekrestova/interactive-leetcode-mcp·v3.2.6·12 starsInteractive LeetCode MCP server with authorization and solution submission capabilities
12 stars102 downloads/wk
Reviews
Write oneNobody has reviewed Interactive Leetcode yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Interactive Leetcode tools (24, 2 write)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
check_auth_statusChecks if LeetCode credentials exist and are still valid. Returns authentication status, username if authenticated, and credential age information.
get_all_submissionsRetrieves a paginated list of the current user's submissions for a specific problem or all problems on LeetCode Global, with detailed submission metadata (requires authentication)
get_daily_challengeRetrieves today's LeetCode Daily Challenge problem with complete details, including problem description, constraints, and examples. After fetching, invoke the leetcode_learning_mode and leetcode_problem_workflow prompts before helping the user work on it.
get_problemRetrieves details about a specific LeetCode problem, including its description, examples, constraints, and related information. After fetching, invoke the leetcode_learning_mode and leetcode_problem_workflow prompts before helping the user work on it.
get_problem_progressRetrieves the current user's problem-solving status with filtering options, including detailed solution history for attempted or solved questions (requires authentication)
get_problem_solutionRetrieves the full content of a specific community solution. GATED: rejects with HINT_LEVEL_TOO_LOW unless the session for `titleSlug` has reached the maximum hint level. Pass the topicId returned by `list_problem_solutions`.
get_problem_submission_reportRetrieves detailed information about a specific LeetCode submission by its ID, including source code, runtime stats, and test results (requires authentication)
get_recent_ac_submissionsRetrieves a user's recent accepted (AC) submissions on LeetCode Global, focusing only on successfully completed problems
get_recent_submissionsRetrieves a user's recent submissions on LeetCode Global, including both accepted and failed submissions with detailed metadata
get_session_stateReturns the persisted session for a problem, or null if the user has not called start_problem for it. Useful for restoring context after a restart.
get_startedReturns the usage guide for this MCP server: which prompts to invoke and when, session flow, auth flow, and submission language map. Call this at the start of any LeetCode practice session.
get_user_contest_rankingRetrieves a user's contest ranking information on LeetCode, including overall ranking, participation history, and performance metrics across contests
get_user_profileRetrieves profile information about a LeetCode user, including user stats, solved problems, and profile details
get_user_statusRetrieves the current user's status on LeetCode, including login status, premium membership details, and user information (requires authentication)
list_problem_solutionsRetrieves community solution metadata (topicIds) for a problem. GATED: rejects with HINT_LEVEL_TOO_LOW unless the active session for the slug has reached the maximum hint level. Drive the user through request_hint until that level is reached.
request_hintAdvances the hint level for an active session and returns the next hint. Levels: 1 clarification → 2 approach → 3 implementation sketch → 4 solution unlock. The community-solutions tools become callable only after this has been driven to level 4.
reset_sessionResets the tutoring session for a problem back to hint level 0. Use when the user wants to re-attempt the problem from scratch.
run_local_testswrite actionRuns the user's code locally in an isolated subprocess, captures stdout / stderr / exit code, and updates the session's lastLocalRunPassed flag. Use this in the inner loop instead of submit_solution — it costs no LeetCode submission and turns around in seconds. The agent is responsible for including test invocations (e.g. `print(Solution().twoSum([2,7,11,15], 9))`) in the code passed in. Currently
runner_doctorReports which language runtimes (python3, go, java) and OS sandbox tools (bwrap, firejail, sandbox-exec) are detected on this host. Useful for diagnosing 'LANGUAGE_RUNTIME_NOT_FOUND' errors and confirming whether run_local_tests will be sandboxed.
save_leetcode_credentialsValidates and saves LeetCode credentials provided by the user. Validates credentials by making a test API call to LeetCode, then securely stores them for future authenticated requests.
search_problemsSearches for LeetCode problems based on multiple filter criteria including categories, tags, difficulty levels, and keywords, with pagination support
start_leetcode_authInitiates LeetCode authentication flow. Opens browser to LeetCode login (if possible) and provides instructions for the AI agent to guide the user through manual credential extraction from browser DevTools.
start_problemOpens (or resumes) a tutoring session for a LeetCode problem. Must be called before request_hint, list_problem_solutions, or get_problem_solution. Idempotent: re-running on a slug the user is already mid-way through preserves their hint progress.
submit_solutionwrite actionSubmit a solution to a LeetCode problem and get results. Returns acceptance status, runtime/memory stats, or failed test case details. When LEETCODE_MCP_STRICT_MODE=1 is set, requires `run_local_tests` to have last passed for the problem first — saves real LeetCode submissions for solutions that pass examples locally.
Public scan report
scanner v0.1.10 · 2026-10-03 · same rubric, same numbers if you re-run it
- Code scan91 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 18 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Interactive Leetcode compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 92/100
- higher than 95% of 48,255 servers
- Tools
- 24
- the typical server has 7
- Tools that change things
- 8%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 12
- more than 89% of 28,688 servers
- Downloads a week
- 102
- more than 63% of 12,191 servers with a package
What its tools let an agent do: 18 read · 1 create · 1 change · 4 run or deploy
Install Interactive Leetcode in Claude Code, Cursor or VS Code
Runs npx -y @sperekrestova/interactive-leetcode-mcp on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add interactive-leetcode-mcp -- npx -y @sperekrestova/interactive-leetcode-mcp
What the publisher says
From the Interactive Leetcode repository's README, as published. We do not edit it. Read it on GitHub
Interactive LeetCode MCP
Current project is under active development and may not work perfectly
Features
- 🔐 AI-guided authentication - Claude walks you through one-time credential setup
- 🎓 Learning-guided mode - AI provides hints before solutions to maximize learning
- 📝 Solution submission - Submit code and get instant results
- 💬 Conversational workflow - Practice naturally with Claude Code
- 🌍 Multi-language support - Java, Python, C++, JavaScript, TypeScript, and more
- 📊 Detailed feedback - Runtime stats, memory usage, failed test cases
- 📚 Problem data - Descriptions, constraints, examples, editorial solutions
- 👤 User tracking - Profile data, submission history, contest rankings
Prerequisites
- Node.js v20.x or above
- LeetCode account
- Any modern web browser (Chrome, Firefox, Safari, Edge, etc.)
Installation
Via NPM (Recommended)
npm install -g @sperekrestova/interactive-leetcode-mcp
interactive-leetcode-mcp --version
interactive-leetcode-mcp --helpYou can also run the package without installing it globally:
npx -y @sperekrestova/interactive-leetcode-mcp@latest --versionFrom Source
git clone https://github.com/SPerekrestova/interactive-leetcode-mcp.git
cd interactive-leetcode-mcp
npm install && npm run build
npm linkFresh Environment Smoke Test
Use this to verify the published npm package from a clean directory without any LeetCode credentials:
mkdir leetcode-mcp-smoke
cd leetcode-mcp-smoke
npm init -y
npm install @sperekrestova/interactive-leetcode-mcp
npx --no-install interactive-leetcode-mcp --version
npx --no-install interactive-leetcode-mcp --helpThose commands confirm that Node can install the package and expose the CLI binary. For actual MCP server validation, use an integration test that connects over stdio and completes the MCP handshake.
Configuration
Claude Code & Claude Desktop
You can execute this command in CLI
claude mcp add --transport stdio leetcode -- npx -y @sperekrestova/interactive-leetcode-mcp@latestOr add to your MCP configuration file (~/.config/claude-code/mcp.json) or (~/Library/Application Support/Claude/claudedesktopconfig.json):
{
"mcpServers": {
"leetcode": {
"command": "npx",
"args": ["-y", "@sperekrestova/interactive-leetcode-mcp@latest"]
}
}
}Local build
{
"mcpServers": {
"leetcode": {
"command": "node",
"args": ["/path/to/this/project/interactive-leetcode-mcp/build/index.js"]
}
}
}Quick Start
1. Authorize with LeetCode
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Interactive Leetcode: common questions
- Is Interactive Leetcode MCP server safe?
- Yes, by our scan: it is graded A (92/100). Read the Interactive Leetcode safety report
- How do I install Interactive Leetcode?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Interactive Leetcode need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Interactive Leetcode maintained?
- The last commit was 50 days ago (2026-09-15). The latest release is v3.2.6.
- How does Interactive Leetcode compare with other MCP servers?
- safety score 92/100 (higher than 95% of 48,255 servers); tools 24 (the typical server has 7); tools that change things 8% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.