Skip to main content
MCP server CX Codex

interactive-leetcode-mcp — Claude Code MCP server

Wires LeetCode into your agent: fetch problems, step through hints, run sample tests locally, submit code. Handy when you grind interview prep inside the chat.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add interactive-leetcode-mcp -- npx -y @sperekrestova/interactive-leetcode-mcp
Open on GitHub

What interactive-leetcode-mcp does

The server gives the agent access to LeetCode problems and your account. You sign in once: the agent opens the browser, you log in and hand over two cookie values, csrftoken and LEETCODE_SESSION, and the server verifies them before saving. From there it can pull a problem by slug, search by difficulty or tag, and fetch the daily challenge.

Practice happens through sessions. start_problem opens or resumes a problem, request_hint walks you up the hint ladder one step at a time, and community editorials stay locked until you reach the last level. run_local_tests executes your code against the sample cases in a local subprocess; installed runtimes are required, and runner_doctor lists which ones it finds.

Submitting goes through submit_solution, which returns the verdict along with runtime and memory figures. The project is under active development, so expect rough edges. You need Node.js v20 or newer, a LeetCode account, and a browser for the login step.

What it helps with

  • work a LeetCode problem with hints that unlock in stages
  • try a solution on sample cases before submitting
  • find problems by difficulty and topic
  • submit code and read the verdict with runtime stats
  • open an editorial after giving the problem a real try

Example prompts for the agent

  • Authorize with LeetCode and walk me through it
  • Start the two-sum problem in Python
  • Give me a hint on the current problem

How to install interactive-leetcode-mcp

Platform CLI

claude mcp add interactive-leetcode-mcp -- npx -y @sperekrestova/interactive-leetcode-mcp

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about interactive-leetcode-mcp

How do I install interactive-leetcode-mcp in Claude Code?

Run claude mcp add interactive-leetcode-mcp -- npx -y @sperekrestova/interactive-leetcode-mcp. The server then starts over stdio through npx.

What does interactive-leetcode-mcp do?

It exposes LeetCode tools to the agent: problem lookup, graded hints, a local test run, and solution submission with results.

What does the server need to run?

Node.js v20 or newer, a LeetCode account, and a browser for the login. Credentials are entered once during authorization.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor