leetcode-mcp-server

MCP.Pizza Chef: jinzcdev

Nine tools work with no sign-in at all on the main site: the daily challenge, any problem by name, keyword and tag search, community solution write-ups, contest rankings and public profiles. Paste in your LeetCode browser session cookie and six more appear, covering your submission history, your progress on a problem, and tools that test or formally submit code under your own account. Formal submissions are permanent and count towards your record. Personal notes exist only on the China site.

Coding
Web/Research

Use This MCP server To

Pull up today's coding challenge and talk it through Find medium problems tagged with dynamic programming Read the top community solutions for a problem I'm stuck on Check which problems I have solved recently Test my code against the sample cases before submitting Look up someone's public profile and contest ranking

README

LeetCode MCP Server

NPM Version Chinese Doc NPM Downloads GitHub License LeetCode MCP Server on Glama 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.

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

leetcode-mcp-server FAQ

Do I need an account or a paid key?
Not for browsing. Problems, search and public solutions all work anonymously. The extra features need your LeetCode browser session cookie, which is not a developer key you sign up for but the same thing that keeps you logged in.
Can it submit answers under my name?
Yes, once you supply the session cookie. A formal submission is permanent, counts towards your record, and there is no confirmation step first.
Can I use this to work through a problem from start to finish?
Yes. Fetch the problem, talk through an approach, test it against the sample cases, then submit when you are happy with it.
How many tools do I actually get?
Nine without a cookie on the global site and fifteen with one. The China site adds four note-taking tools on top of that.
Are the note-taking features available to everyone?
No. Creating, updating and searching notes works only on the China site, not the global one, even though the feature list does not say so.
How careful should I be with the session cookie?
Treat it like a password. It sits in plain text in your settings file, and anyone who has it can act as you on LeetCode.
Can I run it as a shared service on my network?
There is a web mode, but it has no login of any kind. It listens only on your own machine by default, and opening it to the network would hand your LeetCode account to anyone who can reach it.
Is it still being maintained?
Yes. The project was updated in mid-2026 and carries an MIT licence.
How hard is setup?
Moderate. You need a recent version of Node installed, plus a short snippet pasted into your assistant's settings.