Official description๐ โ๏ธ - MCP server enabling automated access to LeetCode's programming problems, solutions, submissions and public data with optional authentication for user-specific features (e.g., notes), supporting
Config template (adjust for your client)
claude mcp add leetcode-mcp-server -- npx -y leetcode-mcp-server
A pasteable skeleton generated from the repository name. Check the project README for the exact package and arguments.
Star count
154 โ ยท jinzcdev/leetcode-mcp-server ยท read from the repository page ยท (checked 2026-10-16 20:00:20)
Source
collected from the punkpeye/awesome-mcp-servers list ยท type: MCP server
Harvest history
first seen 2026-10-09 ยท last seen 2026-10-16 ยท seen 32ร ยท listed by 13 sources
Score
score 1,303 ยท 154 โ ยท 13 sources ยท mcp
FAQ (answers come from our records)
How do I install it?
We did not find an install command for this repository (our install coverage is only about 4%). Check its README or releases page.
Who is it for?
We filed it under these tags: MCP ๆๅก. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository jinzcdev/leetcode-mcp-server๏ผfirst catalogued 2026-10-09๏ผlast seen 2026-10-16ใThere is no official certification or quality rating here โ we record sources and dates only.
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. Features - ๐ **Multi-site Support**: Supportโ both leetcode.com (Global) and leetcode.cn (China) platforms - ๐ **Dual Transport Modes**: Run as a stdio process (default) or as a Streamable HTTP server for web-based integrations - ๐ **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 (v20.x or above) 2. (Optional) LeetCode session cookie for authenticated API access Installation Alternatively, you can clone the repository and run it locally: Usage The server supports two transport modes: | Transport | Description | | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | stdio (default) | Standard input/output transport for local MCP clients | | http | Streamable HTTP transport for web-based integrations and remote access | Command-Line Options | Option | Alias | Default | Description | | ------------- | ----- | ----------- | ---------------------------------------------------------------- | | --site | -s | global | LeetCode API site: global (leetcode.com) or cn (leetcode.cn) | | --session | -c | โ | LeetCode session cookie for authenticated requests | | --transport | -t | stdio | Transport mode: stdio or http | | --port | โ | 3000 | HTTP server port (Streamable HTTP only) | | --host | โ | 127.0.0.1 | HTTP server host (Streamable HTTP only) | | --endpoint | โ | /mcp | HTTP endpoint path (Streamable HTTP only) | MCP Client Configuration (stdio) Add the following server entry to your MCP client configuration file: Option 1: Using Environment Variables Option 2: Using Command Line Arguments For LeetCode China site, modify the --site parameter to cn. > [!NOTE] > > The exact configuration file location and JSON structure may vary by MCP client. Some clients use an mcp.servers wrapper or a type field โ refer to your client's documentation and adapt the example accordingly. MCP Client Configuration (Streamable HTTP) First, start the server in HTTP mode: Then connect your MCP client to the running server: To use authenticated endpoints, pass the session cookie when starting the server: > [!NOTE] > Some MCP clients use "type": "http" or "type": "streamableHttp" alongside the url field. Refer to your client's documentation for the exact HTTP transport configuration format. > [!TIP] > > The server supports the following optional environment variables: > > - LEETCODE_SITE: LeetCode API endpoint (global or cn, default: global) > - LEETCODE_SESSION: LeetCode session cookie for authenticated API access (default: empty) > - LEETCODE_TRANSPORT: Transport mode (stdio or http, default: stdio) > - LEETCODE_HTTP_PORT: HTTP server port when using Streamable HTTP (default: 3000) > - LEETCODE_HTTP_HOST: HTTP server host when using Streamable HTTP (default: 127.0.0.1) > - LEETCODE_HTTP_ENDPOINT: HTTP endpoint path when using Streamable HTTP (default: /mcp) > > **Priority Note**: > Command-line arguments take precedence over environment variables when both are specified. For example: > > - If LEETCODE_SITE=cn is set but you run leetcode-mcp-server --site global, the server will use global. > - If LEETCODE_SESSION exists but you provide --session "new_cookie", the command-line session value will be used. Available Tools