Interactive LeetCode

Provides AI-guided LeetCode practice with authentication, problem retrieval, hints, and submission results via an MCP server.
  • javascript

4

GitHub Stars

javascript

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "sperekrestova-interactive-leetcode-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "interactive-leetcode-mcp"
      ]
    }
  }
}

You can run and interact with the Interactive LeetCode MCP to authenticate with LeetCode, fetch and practice problems, get guided hints, and submit solutions through a modular MCP server. This setup enables learning-focused practice with AI guidance and detailed feedback while keeping your workflow integrated with MCP clients.

How to use

You connect to the MCP server through an MCP client configured to run a local or remote server. Use the available tools to authorize with LeetCode, fetch problems, request hints, and submit solutions. The learning mode guides you with progressive hints, while the standard flow provides problem data, templates, and immediate feedback on submissions.

How to install

Prerequisites you need before installation:

  • Node.js v20.x or above

  • LeetCode account

  • A modern web browser (Chrome, Firefox, Safari, Edge, etc.)

Installation options you can choose from:

# Via NPM (Recommended)
npm install -g @sperekrestova/interactive-leetcode-mcp

Additional configuration and usage notes

You configure the MCP integration for local or CLI-based usage. The following examples show explicit MCP configuration blocks you can apply in your environment.

{
  "mcpServers": {
    "leetcode": {
      "command": "npx",
      "args": ["-y", "interactive-leetcode-mcp"]
    }
  }
}

Local build and alternative run method

If you prefer to run a local build directly, you can start the server with a node command that points to the built entry point.

{
  "mcpServers": {
    "leetcode": {
      "command": "node",
      "args": ["/path/to/this/project/interactive-leetcode-mcp/build/index.js"]
    }
  }
}

Troubleshooting

If you encounter authentication or cookie-related issues, initiate authentication again and ensure you have valid LeetCode cookies. Verify you are logged in to LeetCode in your browser before extracting cookies. Ensure you copy the cookie values exactly from the VALUE column without extra spaces.

If your cookies expire, re-authenticate to refresh credentials. LeetCode cookies typically stay valid for a limited period, so re-authorize when needed.

Available tools

start_leetcode_auth

Initiates an authentication flow for LeetCode, opening a browser to log in and guiding you through obtaining the necessary cookies.

save_leetcode_credentials

Validates and stores your LeetCode credentials, then makes a test API call to verify access.

check_auth_status

Checks whether you are currently authenticated and returns the username and credential age.

get_daily_challenge

Fetches today’s daily coding challenge for quick practice.

get_problem

Retrieves detailed information about a problem by its slug (titleSlug).

search_problems

Searches for problems by difficulty, tags, or keywords with filtering and pagination.

submit_solution

Submits your code with the chosen language and returns results such as acceptance, runtime, and memory usage.

get_user_profile

Retrieves your user profile information and related stats.

get_user_submissions

Fetches your submission history with optional filters.

get_user_contest_ranking

Shows your contest rankings and performance metrics.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Interactive LeetCode MCP Server - sperekrestova/interactive-leetcode-mcp | VeilStrat