LeetCodeSAFE
A Model Context Protocol (MCP) server for LeetCode that provides access to problems, user data, and contest information through GraphQL
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/@mcpfun/mcp-server-leetcode) [](https://github.com/doggybee/mcp-server-leetcode/blob/main/LICENSE) [](https://github.com/doggybee/mcp-server-leetcode/releases) [](https://smithery.ai/server/@doggybee/mcp-server-leetcode)
A Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and contest data.
Features
- 🚀 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
Installation
Installing via Smithery
To install mcp-server-leetcode for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @doggybee/mcp-server-leetcode --client claude
Global Installation
npm install -g @mcpfun/mcp-server-leetcode
Once installed, you can run it directly from the command line:
mcp-server-leetcode
Local Installation
npm install @mcpfun/mcp-server-leetcode
Usage
Integration with Claude for Desktop
Add the following to your Claude for Desktop claude_desktop_config.json file:
{
"mcpServers": {
"leetcode": {
"command": "mcp-server-leetcode"
}
}
}For local development:
{
"mcpServers": {
"leetcode": {
"command": "node",
"args": ["/path/to/dist/index.js"]
}
}
}Use as a Library
import { LeetCodeService } from '@mcpfun/mcp-server-leetcode';
// Initialize the s04c44cdac424OBSERVED · 2026-10-08Connect
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 mcp-server-leetcode -- npx -y @mcpfun/[email protected]
{
"mcpServers": {
"mcp-server-leetcode": {
"command": "npx",
"args": [
"-y",
"@mcpfun/[email protected]"
]
}
}
}Exposed tools (7)
7 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
get-contest-details | read | |
get-daily-challenge | read | |
get-problem | read | |
get-user-contest-ranking | read | |
get-user-profile | read | |
get-user-submissions | read | |
search-problems | read |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (1)
@modelcontextprotocol/sdk, axios, apicache, zod, glob, rimraf, @types/apicache, @types/node
Gates applied: no_behavioural_pass.
04c44cdac424full audit observations/trust-audit/mcp-server/doggybee__leetcode.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-08 | 04c44cdac424 | SAFE | B | 89 | first audit |
Questions
What is the LeetCode MCP server?
A Model Context Protocol (MCP) server for LeetCode that provides access to problems, user data, and contest information through GraphQL
What tools does LeetCode expose?
7 in total: 7 read-only, 0 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?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
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, so it runs as a local process your client starts. It is published on npm as @mcpfun/mcp-server-leetcode at 1.0.1.
How current is this page?
The grade is for one exact copy of the source (04c44cdac424), read on 2026-10-08. The repository is watched and re-audited when it changes.