LeetCode MCP Server

by MCP-Mirror

953 downloads Not rated yet MIT license

About

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. It supports both…

Details

License
MIT license

Explore

- 🌐 Multi-site Support: Support​ both leetcode.com (Global) and leetcode.cn (China) platforms
- 📊 Problem Data Retrieval: Obtain detailed problem descriptions, constraints, examples, official editorials, and ​user-submitted solutions
- 👤 User Data Access: Retrieve user profiles, submission history, and contest performance
- 🔒 ​Private Data Access: Create and query user notes, track problem-solving progress, and analyze submission details (AC/WA analysis)
- 🔍 Advanced Search Capabilities: Filter problems by tags, difficulty levels, categories, and keywords
- 📅 Daily Challenge Access: Easily access daily challenge problems

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name LeetCode MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

1. Node.js runtime environment
2. (Optional) LeetCode session cookie for authenticated API access

To install leetcode-mcp-server for Claude Desktop automatically via Smithery:

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

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

npx -y @jinzcdev/leetcode-mcp-server --site global

npx -y @jinzcdev/leetcode-mcp-server --site global --session <YOUR_LEETCODE_SESSION_COOKIE>

Alternatively, you can clone the repository and run it locally:


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

User-specific data access requires LeetCode session authentication:

1. Log in to LeetCode (Global or China site)
2. Extract
LEETCODE_SESSION cookie from browser developer tools
3. Configure server with
--session flag or LEETCODE_SESSION` environment variable

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "leetcode mcp server": {
            "jinzcdev_leetcode-mcp-server": {
                "command": "npx",
                "args": [
                    "-y",
                    "@smithery/cli",
                    "install",
                    "@jinzcdev/leetcode-mcp-server",
                    "--client",
                    "claude"
                ]
            }
        }
    }
}

McpServers

{
    "jinzcdev_leetcode-mcp-server": {
        "command": "npx",
        "args": [
            "-y",
            "@smithery/cli",
            "install",
            "@jinzcdev/leetcode-mcp-server",
            "--client",
            "claude"
        ]
    }
}

NPM Version
GitHub License
smithery badge
Chinese Doc
Stars

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.

<a href="https://glama.ai/mcp/servers/@jinzcdev/leetcode-mcp-server">
LeetCode Server MCP server
</a>

Features

- 🌐 Multi-site Support: Support​ both leetcode.com (Global) and leetcode.cn (China) platforms
- 📊 Problem Data Retrieval: Obtain detailed problem descriptions, constraints, examples, official editorials, and ​user-submitted solutions
- 👤 User Data Access: Retrieve user profiles, submission history, and contest performance
- 🔒 ​Private Data Access: Create and query user notes, track problem-solving progress, and analyze submission details (AC/WA analysis)
- 🔍 Advanced Search Capabilities: Filter problems by tags, difficulty levels, categories, and keywords
- 📅 Daily Challenge Access: Easily access daily challenge problems

Prerequisites

1. Node.js runtime environment
2. (Optional) LeetCode session cookie for authenticated API access

Installation

Installing via Smithery

To install leetcode-mcp-server for Claude Desktop automatically via Smithery:

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

Manual Installation

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.