Access LeetCode problems, searches, public profiles, submissions, rankings, and community solutions through MCP.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
This server is confirmed live โ we successfully called its tools/list endpoint directly (see the verified badge above). We haven't yet sandbox-tested the stdio install command below specifically, which is a separate, ongoing check.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Leetcode MCP Server.
get_daily_challengeRetrieves today's Daily Challenge problem with full description (read-only, no auth). Returns problem details for the current date as JSON. Use get_problem when you know a specific titleSlug; use search_problems to discover problems by filters.
get_problemRetrieves a single LeetCode problem by titleSlug (read-only, no auth). Returns description, examples, constraints, and metadata as JSON. Use search_problems to find problems by keyword/tag/difficulty; use get_daily_challenge for today's featured problem.
search_problemsSearches LeetCode problems by category, tags, difficulty, and keywords (read-only, no auth). Supports pagination via limit/offset. Returns matching problem list as JSON. Use get_problem when you already know the titleSlug; use this to browse or discover problems.
get_user_profileRetrieves any user's public profile by username (read-only, no auth). Returns ranking, avatar, bio, submission stats, and platform-specific progress. Use this to look up other users or public stats. Use get_user_status (requires auth) instead to verify the current session user's login stateโnot for looking up arbitrary users.
get_recent_submissionsRetrieves a user's recent submission history on LeetCode Global (read-only, no auth). Includes both accepted and failed submissions. Global onlyโnot available on CN. Use get_recent_ac_submissions for accepted-only results, or get_all_submissions (auth, current user) for paginated full history with filters.
get_recent_ac_submissionsRetrieves a user's recent accepted (AC) submissions (read-only, no auth). Available on both Global and CN. Use get_recent_submissions (Global only) to include failed attempts, or get_all_submissions (auth, current user) for full paginated history.
The jinzcdev/leetcode-mcp-server MCP server connects MCP clients to LeetCode's global and China platforms. It provides tools for discovering problems, reading problem statements, checking the daily challenge, inspecting public user data, and retrieving community solution articles.
Problem tools cover three common workflows. search_problems filters problems by keywords, tags, category, and difficulty, with pagination through limit and offset values. get_problem returns a known problem's description, examples, constraints, and metadata using its title slug. get_daily_challenge returns the current day's featured problem.
User-facing read-only tools retrieve public profiles, contest rankings, recent submissions, and recent accepted submissions. Recent submission history is available only on the global site, while accepted-submission lookup works on both supported sites. Community solution access uses a two-step flow: first list articles for a problem to obtain a topic ID, then request the article content with that ID.
The server communicates with an MCP client using either standard input/output or Streamable HTTP. Stdio is the default and is intended for local client configurations. HTTP mode starts a server that listens on a configured host and port and exposes the MCP endpoint, which defaults to /mcp.
Select the LeetCode deployment with --site global or --site cn; global is the default. Command-line options override matching environment variables. The available configuration covers the site, transport, HTTP port, HTTP host, and endpoint path.
The jinzcdev/leetcode-mcp-server MCP server does not require authentication for the listed problem, public-profile, ranking, recent-submission, or solution-article lookups. Pass a LeetCode session cookie when authenticated access to private or current-user data is needed. The cookie can be supplied with --session or through the LEETCODE_SESSION environment variable.
The repository requires Node.js 20 or newer. The documented npm execution path runs the published package with npx:
For LeetCode China, replace global with cn. To use HTTP transport, add --transport http and optionally set --port, --host, or --endpoint. The project also documents cloning the repository, installing dependencies, building it, and starting node build/index.js locally.
MCP client configuration can pass settings as command-line arguments or environment variables. Supported environment variables include LEETCODE_SITE, LEETCODE_SESSION, LEETCODE_TRANSPORT, LEETCODE_HTTP_PORT, LEETCODE_HTTP_HOST, and LEETCODE_HTTP_ENDPOINT. Session cookies should be treated as sensitive credentials.
The jinzcdev/leetcode-mcp-server MCP server exposes tools for:
Results are returned as JSON for the problem, profile, ranking, submission, and solution operations described in the listing. Use a title slug for direct problem retrieval and a topic ID for full solution retrieval.
Recent non-accepted submission history is limited to LeetCode Global. Solution listing returns article metadata and topic IDs rather than the article body, so a second tool call is required for full content. Authenticated features depend on a valid LeetCode session cookie and are intended for private or current-user data. The server accesses LeetCode's public and authenticated APIs, so site availability and API behavior may affect results.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/jinzcdev-leetcode-mcp-server)<a href="https://allmcps.com/mcp/jinzcdev-leetcode-mcp-server"><img src="https://allmcps.com/api/badge/jinzcdev-leetcode-mcp-server?style=directory" alt="Leetcode MCP Server on AllMCPs" /></a>