LeetCodeBLOCK
An MCP server enabling automated access to LeetCode's problems, solutions, and public data with optional authentication for user-specific features, supporting leetcode.com & leetcode.cn sites.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/@jinzcdev/leetcode-mcp-server) [](README_zh-CN.md) [](https://www.npmjs.com/package/@jinzcdev/leetcode-mcp-server) [](./LICENSE) [](https://glama.ai/mcp/servers/jinzcdev/leetcode-mcp-server) [](https://github.com/jinzcdev/leetcode-mcp-server)
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
- Node.js (v20.x or above)
- (Optional) LeetCode
844afb8654caOBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add leetcode-mcp-server -- npx -y @jinzcdev/[email protected]
{
"mcpServers": {
"leetcode-mcp-server": {
"command": "npx",
"args": [
"-y",
"@jinzcdev/[email protected]"
]
}
}
}Exposed tools (19)
15 read · 4 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
create_note | write | Creates a new personal note for a problem (write operation, requires auth, CN only). Supports markdown content. Returns { success, note } as JSON. Use update_note to modify an existing note by noteId. |
get_all_submissions | read | Retrieves paginated submission history for the authenticated user on LeetCode Global (read-only, requires auth). Optionally filter by problem slug. Use get_recent_submissions/get_recent_ac_submissions to view any user |
get_daily_challenge | read | Retrieves today |
get_note | read | Retrieves personal notes for a specific problem by questionId (read-only, requires auth, CN only). Use search_notes to find notes across problems by keyword when you don |
get_problem | read | 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 |
get_problem_progress | read | Retrieves the authenticated user |
get_problem_solution | read | 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. |
get_problem_submission_report | read | |
get_recent_ac_submissions | read | Retrieves a user |
get_recent_submissions | read | Retrieves a user |
get_user_contest_ranking | read | Retrieves a user |
get_user_profile | read | Retrieves any user |
get_user_status | read | Checks the authenticated user |
list_problem_solutions | read | 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. |
run_code | write | |
search_notes | read | Searches the authenticated user |
search_problems | read | 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. |
submit_solution | write | |
update_note | write | Updates an existing personal note by noteId (write operation, requires auth, CN only). Use create_note for new notes; use get_note or search_notes first to find the noteId. |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | FAIL |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (5 observation(s))
- Network
- declared (3 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (12)
- 🌐 **Multi-site Support**: Support both leetcode.com (Global) and leetcode.cn (China) platforms
- 📊 **Problem Data Retrieval**: Obtain detailed problem descriptions, constraints, examples, official editorials, and user-submitted solutions
- 🔒 **Private Data Access**: Create and query user notes, track problem-solving progress, and analyze submission details (AC/WA analysis)
- 📊 **题目数据获取**:获取详细的题目描述、约束条件、示例、官方题解和用户提交的解答
} from "../../common/constants.js";
import { LeetCodeBaseService } from "../../leetcode/leetcode-base-service.js";import { RegistryBase } from "../../common/registry-base.js";import { LeetCodeBaseService } from "../../leetcode/leetcode-base-service.js";import { LeetCodeBaseService } from "../../leetcode/leetcode-base-service.js";"url": "http://127.0.0.1:3000/mcp"
"url": "http://127.0.0.1:3000/mcp"
@modelcontextprotocol/sdk, leetcode-query, minimist, pino, ts-node, zod, @eslint/js, @types/minimist
Gates applied: no_behavioural_pass.
844afb8654cafull audit observations/trust-audit/mcp-server/jinzcdev__leetcode-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 844afb8654ca | BLOCK | D | 69 | first audit |
Questions
What is the LeetCode MCP server?
An MCP server enabling automated access to LeetCode's problems, solutions, and public data with optional authentication for user-specific features, supporting leetcode.com & leetcode.cn sites.
What tools does LeetCode expose?
19 in total: 15 read-only, 4 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is LeetCode safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 4 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does LeetCode need?
No credential environment variables were found in its source, so it appears to need none.
How does LeetCode run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as @jinzcdev/leetcode-mcp-server at 1.4.0.
How current is this page?
The grade is for one exact copy of the source (844afb8654ca), read on 2026-10-07. The repository is watched and re-audited when it changes.