Skip to main content
Glama
LeetCode MCP Server

LeetCode MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LEETCODE_SITENoLeetCode API endpoint ('global' or 'cn', default: 'global')global
LEETCODE_SESSIONNoLeetCode session cookie for authenticated API access (default: empty)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_daily_challengeA

Retrieves 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_problemA

Retrieves 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_problemsA

Searches 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_profileA

Retrieves 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_submissionsA

Retrieves 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_submissionsA

Retrieves 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.

get_user_contest_rankingA

Retrieves a user's contest ranking and participation history (read-only, no auth). Returns overall rating, ranking, and per-contest performance as JSON. Use get_user_profile for general stats and ranking; use this specifically for contest performance data.

list_problem_solutionsA

Lists community solution articles for a problem (read-only, no auth). Returns metadata only (topicId)—not full content. Use get_problem_solution with the returned topicId to read the full article. Do not call this when you already have a topicId and need the solution text.

get_problem_solutionA

Retrieves full content of a community solution article (read-only, no auth). Requires topicId from list_problem_solutions. Returns article text, author, and metadata as JSON. Use list_problem_solutions first to discover solutions and obtain topicId.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
problem-categoriesA list of all problem classification categories in LeetCode platform, including difficulty levels (Easy, Medium, Hard) and algorithmic domains. These categories help organize and filter coding problems for users based on their complexity and topic area. Returns an array of all available problem categories.
problem-tagsA detailed collection of algorithmic and data structure tags used by LeetCode to categorize problems. These tags represent specific algorithms (like 'dynamic-programming', 'binary-search') or data structures (such as 'array', 'queue', 'tree') that are relevant to solving each problem. Returns an array of all available problem tags for filtering and searching problems.
problem-langsA complete list of all programming languages officially supported by LeetCode for code submission and problem solving. Returns an array of all available programming languages on the platform.

TDQS

A4.4/5.0

Scored across 9 tools

Disambiguation4/5

Most tools target clearly distinct resources, and descriptions actively cross-reference alternatives (e.g. search_problems vs get_problem, get_problem vs get_daily_challenge). The only real overlap is get_recent_submissions vs get_recent_ac_submissions, which differ narrowly (failed attempts, Global-only), though the descriptions do disambiguate them.

Naming Consistency5/5

Every tool follows a consistent snake_case verb_noun pattern (get_, search_, list_). No mixing of conventions, and names map cleanly to their actions and resources.

Tool Count5/5

Nine tools is well-scoped for a read-only LeetCode data client, with each tool covering a distinct resource. No filler or redundant tools bloat the surface.

Completeness3/5

The read-only domain is mostly covered (problems, solutions, users, submissions, contest ranking), but descriptions reference tools that do not exist in the set—get_user_status and get_all_submissions—creating dead ends. There is also no submission/write capability, so any workflow requiring those referenced operations will fail.

Maintenance

ActivityNo data
ResponsivenessOutdated data