Leetcode MCP Server

Model Context Protocol server for LeetCode using GraphQL

Local serverstdio

What is the Leetcode MCP server?

Model Context Protocol server for LeetCode using GraphQL. The leetcode mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 7 defined tools rather than through you.

What it actually does

A Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and contest data.

  • 🚀 Fast access to LeetCode API
  • 🔍 Search problems, retrieve daily challenges, and check user profiles
  • 🏆 Query contest data and rankings
  • 🧩 Full support for MCP tools and resources
  • 📦 Provides both CLI and programmable API

Adding it to your client

The server ships on npm as @smithery/cli, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

Its toolset

Everything the assistant can do here goes through one of these:

  • get-daily-challenge — Get the daily challenge
  • get-problem — Get details for a specific problem
  • search-problems — Search for problems based on criteria
  • get-user-profile — Get user information
  • get-user-submissions — Get user submission history
  • get-user-contest-ranking — Get user contest rankings
  • get-contest-details — Get contest details

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the leetcode mcp server does with a few real requests.

When to reach for it

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Leetcode's toolset — get-daily-challenge, get-problem, search-problems and 4 more — is a fair guide to whether it matches your workflow. It is maintained by doggybee; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Leetcode's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
get-daily-challengeGet the daily challenge
get-problemGet details for a specific problem
search-problemsSearch for problems based on criteria
get-user-profileGet user information
get-user-submissionsGet user submission history
get-user-contest-rankingGet user contest rankings
get-contest-detailsGet contest details

How to install the Leetcode MCP server

{
  "mcpServers": {
    "leetcode": {
      "command": "mcp-server-leetcode"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Leetcode to get-daily-challenge.
  • Use Leetcode to get-problem.
  • Use Leetcode to search-problems.

Frequently asked questions

It connects Leetcode to MCP-compatible AI assistants such as Claude and Cursor, exposing 7 tools (get-daily-challenge, get-problem, search-problems, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Leetcode directly.