Interactive LeetCode MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_startedA | Returns 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_daily_challengeA | Retrieves 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_problemA | Retrieves 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. |
| search_problemsA | Searches for LeetCode problems based on multiple filter criteria including categories, tags, difficulty levels, and keywords, with pagination support |
| get_user_profileB | Retrieves profile information about a LeetCode user, including user stats, solved problems, and profile details |
| get_recent_submissionsB | Retrieves a user's recent submissions on LeetCode Global, including both accepted and failed submissions with detailed metadata |
| get_recent_ac_submissionsA | Retrieves a user's recent accepted (AC) submissions on LeetCode Global, focusing only on successfully completed problems |
| get_user_statusA | Retrieves the current user's status on LeetCode, including login status, premium membership details, and user information (requires authentication) |
| get_problem_submission_reportA | Retrieves detailed information about a specific LeetCode submission by its ID, including source code, runtime stats, and test results (requires authentication) |
| get_problem_progressA | Retrieves the current user's problem-solving status with filtering options, including detailed solution history for attempted or solved questions (requires authentication) |
| get_all_submissionsA | Retrieves 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_user_contest_rankingA | Retrieves a user's contest ranking information on LeetCode, including overall ranking, participation history, and performance metrics across contests |
| start_problemA | Opens (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. |
| request_hintA | Advances 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. |
| get_session_stateA | Returns 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. |
| reset_sessionA | Resets the tutoring session for a problem back to hint level 0. Use when the user wants to re-attempt the problem from scratch. |
| list_problem_solutionsA | Retrieves 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. |
| get_problem_solutionA | Retrieves the full content of a specific community solution. GATED: rejects with HINT_LEVEL_TOO_LOW unless the session for |
| run_local_testsA | Runs 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. |
| runner_doctorA | Reports 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. |
| start_leetcode_authA | Initiates 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. |
| save_leetcode_credentialsA | Validates 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. |
| check_auth_statusA | Checks if LeetCode credentials exist and are still valid. Returns authentication status, username if authenticated, and credential age information. |
| submit_solutionA | Submit 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 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| leetcode_workspace_setup | Guides the agent to create a workspace file with code template for a LeetCode problem |
| leetcode_learning_mode | Enforces learning-guided mode where the agent provides hints before solutions |
| leetcode_problem_workflow | Guides the complete problem-solving workflow from fetch to submission |
| leetcode_authentication_guide | Provides comprehensive instructions for guiding users through LeetCode authentication with manual cookie extraction |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| problem-categories | A list of all problem classification categories in LeetCode platform, including difficulty levels (Easy, Medium, Hard) and algorithmic domains. These categories help organize and filter coding problems for users based on their complexity and topic area. Returns an array of all available problem categories. |
| problem-tags | A detailed collection of algorithmic and data structure tags used by LeetCode to categorize problems. These tags represent specific algorithms (like 'dynamic-programming', 'binary-search') or data structures (such as 'array', 'queue', 'tree') that are relevant to solving each problem. Returns an array of all available problem tags for filtering and searching problems. |
| problem-langs | A complete list of all programming languages officially supported by LeetCode for code submission and problem solving. Returns an array of all available programming languages on the platform. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/SPerekrestova/interactive-leetcode-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server