MCP Catalogs
Home

leetcode-mcp-server

by jinzcdev·113·Score 47

MCP server providing automated access to LeetCode problems, solutions, and user data with optional authentication.

developer-toolsai-llmeducation
17
Forks
5
Open issues
2 mo ago
Last commit
2d ago
Indexed

Overview

The LeetCode MCP Server is a comprehensive tool that bridges AI assistants with LeetCode's extensive programming problem database. It enables both read-only access to public problem data and authenticated access to user-specific features like submission history and personal notes. The server supports both LeetCode Global (leetcode.com) and China (leetcode.cn) platforms, making it versatile for international users.

Try asking AI

After installing, here are 6 things you can ask your AI assistant:

you:AI-assisted programming problem solving with instant access to problem details and solutions
you:Automated tracking of personal coding progress and submission analysis
you:Integration with AI tutors to provide personalized programming education based on LeetCode content
you:Do I need a LeetCode account to use this server?
you:Can I use this server with both leetcode.com and leetcode.cn?
you:Is the source code available?

When to choose this

Choose this server if you're a developer preparing for coding interviews or practicing algorithms who wants automated access to LeetCode's problem database and solution analysis.

When NOT to choose this

Don't choose this if you need access to premium LeetCode content or features not exposed through their API, or if you're concerned about sharing your LeetCode credentials.

Tools this server exposes

12 tools extracted from the README
  • get_daily_challenge

    Retrieves today's LeetCode Daily Challenge problem

  • get_problem

    Retrieves details for a specific LeetCode problem

  • search_problems

    Searches for LeetCode problems with multiple filter criteria

  • get_user_profile

    Retrieves profile information for a LeetCode user

  • get_recent_ac_submissions

    Retrieves a user's recent accepted submissions

  • run_code

    Runs code for a problem and waits until finished

  • submit_solution

    Submits code for a problem and waits until finished

  • list_problem_solutions

    Retrieves a list of community solutions for a specific problem

  • get_note

    Retrieves notes for a specific LeetCode problem

  • create_note

    Creates a new note for a specific LeetCode problem

  • get_problem_submission_report

    Provides detailed submission analysis for a specific problem

  • get_problem_progress

    Retrieves current user's problem-solving progress

Comparable tools

leetcode-apileetcode-clileetcode-solutions-browser

Installation

Installation

Via Smithery (Recommended for Claude Desktop)

npx -y @smithery/cli install @jinzcdev/leetcode-mcp-server --client claude

Manual Installation

npm install @jinzcdev/leetcode-mcp-server -g

Claude Desktop Configuration

Add to your settings.json:

{
  "mcp": {
    "servers": {
      "leetcode": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "@jinzcdev/leetcode-mcp-server"],
        "env": {
          "LEETCODE_SITE": "global",
          "LEETCODE_SESSION": "<YOUR_LEETCODE_SESSION_COOKIE>"
        }
      }
    }
  }
}

FAQ

Do I need a LeetCode account to use this server?
No, you can access basic problem data without authentication. However, features like submission history, personal notes, and running code require authentication with a LeetCode session cookie.
Can I use this server with both leetcode.com and leetcode.cn?
Yes, the server supports both LeetCode Global (leetcode.com) and LeetCode China (leetcode.cn) platforms. You can specify the site using the --site parameter or LEETCODE_SITE environment variable.
Is the source code available?
Yes, this is an open-source project. You can clone the repository and run it locally after building the project with npm install && npm run build.

Compare leetcode-mcp-server with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.