Skip to content
appsgit

Leetcode MCP Server

Leetcode MCP Server is an MCP server that adds tools to AI assistants such as Claude Desktop, Claude Code and Cursor. An MCP server enabling automated access to LeetCode's problems, solutions, and public data with optional authentication for user-specific features… It has 155 GitHub stars, is released under the MIT license and runs locally with npx -y @jinzcdev/leetcode-mcp-server.

github.com/jinzcdev/leetcode-mcp-server (opens in a new tab)

Data as of from the GitHub API; description from the project's repository. Report an error

Install Leetcode MCP Server

Generated from the server's published package. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "leetcode-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@jinzcdev/leetcode-mcp-server"
      ],
      "env": {
        "LEETCODE_SITE": "your-value",
        "LEETCODE_SESSION": "your-value"
      }
    }
  }
}

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

Claude Code

claude mcp add --env LEETCODE_SITE=your-value --env LEETCODE_SESSION=your-value --transport stdio leetcode-mcp-server -- npx -y @jinzcdev/leetcode-mcp-server

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "leetcode-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@jinzcdev/leetcode-mcp-server"
      ],
      "env": {
        "LEETCODE_SITE": "your-value",
        "LEETCODE_SESSION": "your-value"
      }
    }
  }
}

Project file; use ~/.cursor/mcp.json to enable it in every project.

VS Code

.vscode/mcp.json
{
  "servers": {
    "leetcode-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@jinzcdev/leetcode-mcp-server"
      ],
      "env": {
        "LEETCODE_SITE": "your-value",
        "LEETCODE_SESSION": "your-value"
      }
    }
  }
}

Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
LEETCODE_SITENoShown in the README's example configuration.
LEETCODE_SESSIONNoShown in the README's example configuration.

Tools (26)

Parsed from the Tools section of the README; check the repository for the current list.

  • get_daily_challenge

    ✅

  • get_problem

    ✅

  • search_problems

    ✅

  • get_user_profile

    ✅

  • get_user_contest_ranking

    ✅

  • get_recent_ac_submissions

    ✅

  • get_recent_submissions

    ✅

  • get_user_status

    ✅

  • get_problem_submission_report

    ✅

  • get_problem_progress

    ✅

  • get_all_submissions

    ✅

  • run_code

    ✅

  • submit_solution

    ✅

  • search_notes

    ❌

  • get_note

    ❌

  • create_note

    ❌

  • update_note

    ❌

  • list_problem_lists

    ✅

  • get_problem_list

    ✅

  • create_problem_list

    ✅

  • update_problem_list

    ✅

  • add_problems_to_list

    ✅

  • remove_problems_from_list

    ✅

  • reorder_problem_list

    ✅

  • list_problem_solutions

    ✅

  • get_problem_solution

    ✅

About Leetcode MCP Server

The LeetCode MCP Server is a Model Context Protocol (MCP) server that provides seamless integration with LeetCode APIs, enabling advanced automation and intelligent interaction with LeetCode's programming problems, contests, solutions, and user data.

  • algorithm
  • leetcode
  • mcp
  • ai
  • lc
  • llm
  • mcp-server

FAQ

Leetcode MCP Server FAQ

Still curious? Email info@appsgit.com.

How do I install the Leetcode MCP Server MCP server?

Add the command npx -y @jinzcdev/leetcode-mcp-server to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is Leetcode MCP Server free?

The server is open source under the MIT license, so running it is free. It does not declare any required API key.

Is Leetcode MCP Server actively maintained?

The most recent commit was on Oct 18, 2026. The latest release is v1.4.0, published Jul 12, 2026. appsgit only lists MCP servers with a commit in the last six months.