by jinzcdev
Access LeetCode problems, user profiles, and community solutions for improved algorithm practice and LeetCode 75 contest
Connects to LeetCode's platform to access programming problem details, search by difficulty/tags, view user profiles, and retrieve community solutions for coding practice.
LeetCode is a community-built MCP server published by jinzcdev that provides AI assistants with tools and capabilities via the Model Context Protocol. Access LeetCode problems, user profiles, and community solutions for improved algorithm practice and LeetCode 75 contest It is categorized under developer tools.
You can install LeetCode in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
MIT
LeetCode is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Share your MCP server with the developer community
LeetCode reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
We evaluated LeetCode against two servers with overlapping tools; this profile had the clearer scope statement.
We wired LeetCode into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
According to our notes, LeetCode benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
We evaluated LeetCode against two servers with overlapping tools; this profile had the clearer scope statement.
I recommend LeetCode for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
Strong directory entry: LeetCode surfaces stars and publisher context so we could sanity-check maintenance before adopting.
LeetCode has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
LeetCode is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
I recommend LeetCode for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
showing 1-10 of 49
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.
<a href="https://glama.ai/mcp/servers/@jinzcdev/leetcode-mcp-server"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@jinzcdev/leetcode-mcp-server/badge" alt="LeetCode Server MCP server" /> </a>To install leetcode-mcp-server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @jinzcdev/leetcode-mcp-server --client claude
# Install from npm
npm install @jinzcdev/leetcode-mcp-server -g
# Or run with Global site configuration
npx -y @jinzcdev/leetcode-mcp-server --site global
# Run with authentication (for accessing private data)
npx -y @jinzcdev/leetcode-mcp-server --site global --session <YOUR_LEETCODE_SESSION_COOKIE>
Alternatively, you can clone the repository and run it locally:
# Clone the repository
git clone https://github.com/jinzcdev/leetcode-mcp-server.git
# Navigate to the project directory
cd leetcode-mcp-server
# Build the project
npm install && npm run build
# Run the server
node build/index.js --site global
Add the following JSON configuration to your User Settings (JSON) file. Access this by pressing Ctrl/Cmd + Shift + P and searching for Preferences: Open User Settings (JSON).
{
"mcp": {
"servers": {
"leetcode": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@jinzcdev/leetcode-mcp-server"],
"env": {
"LEETCODE_SITE": "global",
"LEETCODE_SESSION": "<YOUR_LEETCODE_SESSION_COOKIE>"
}
}
}
}
}
{
"mcp": {
"servers": {
"leetcode": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@jinzcdev/leetcode-mcp-server",
"--site",
"global",
"--session",
"<YOUR_LEETCODE_SESSION_COOKIE>"
]
}
}
}
}
For LeetCode China site, modify the --site parameter to cn.
[!TIP]
The server supports the following optional environment variables:
LEETCODE_SITE: LeetCode API endpoint ('global' or 'cn', default: 'global')LEETCODE_SESSION: LeetCode session cookie for authenticated API access (default: empty)Priority Note: Command-line arguments take precedence over environment variables when both are specified. For example:
- If
LEETCODE_SITE=cnis set but you runleetcode-mcp-server --site global, the server will useglobal.- If
LEETCODE_SESSIONexists but you provide--session "new_cookie", the command-line session value will be used.
| Tool | Global | CN | Auth Required | Description |
|---|---|---|---|---|
| get_daily_challenge | ✅ | ✅ | ❌ | Retrieves today's LeetCode Daily Challenge problem |
| get_problem | ✅ | ✅ | ❌ | Retrieves details for a specific LeetCode problem |
| search_problems | ✅ | ✅ | ❌ | Searches for LeetCode problems with multiple filter criteria |
| Tool | Global | CN | Auth Required | Description |
|---|---|---|---|---|
| get_user_profile | ✅ | ✅ | ❌ | Retrieves profile information for a LeetCode user |
| get_user_contest_ranking | ✅ | ✅ | ❌ | Obtains contest ranking statistics for a user |
| get_recent_ac_submissions | ✅ | ✅ | ❌ | Retrieves a user's recent accepted submissions |
| get_recent_submissions | ✅ | ❌ | ❌ | Retrieves a user's recent submissions history |
| get_user_status | ✅ | ✅ | ✅ | Retrieves current user's current status |
| get_problem_submission_report | ✅ | ✅ | ✅ | Provides detailed submission analysis for a specific problem |
| get_problem_progress | ✅ | ✅ | ✅ | Retrieves current user's problem-solving progress |
| get_all_submissions | ✅ | ✅ | ✅ | Retrieves current user's submission history |
| Tool | Global | CN | Auth Required | Description |
|---|---|---|---|---|
| search_notes | ❌ | ✅ | ✅ | Searches for user notes with filtering options |
| get_note | ❌ | ✅ | ✅ | Retrieves notes for a specific problem by question ID |
| create_note | ❌ | ✅ | ✅ | Creates a new note for a specific problem |
| update_note | ❌ | ✅ | ✅ | Updates an existing note with new content |
| Tool | Global | CN | Auth Required | Description |
|---|---|---|---|---|
| list_problem_solutions | ✅ | ✅ | ❌ | Retrieves a list of community solutions for a specific problem |
| get_problem_solution | ✅ | ✅ | ❌ | Retrieves the complete content of a specific solution |
get_daily_challenge - Retrieves today's LeetCode Daily Challenge problem with complete details
get_problem - Retrieves details about a specific LeetCode problem
titleSlug: The URL slug/identifier of the problem (string, required)search_problems - Searches for LeetCode problems based on multiple filter criteria
category: Problem category filter (string, optional, default: "all-code-essentials")tags: List of topic tags to filter problems by (string[], optional)difficulty: Problem difficulty level filter (enum: "EASY", "MEDIUM", "HARD", optional)searchKeywords: Keywords to search in problem titles and descriptions (string, optional)limit: Maximum number of problems to return (number, optional, default: 10)offset: Number of problems to skip (number, optional)get_user_profile - Retrieves profile information about a LeetCode user
username: LeetCode username (string, required)get_user_contest_ranking - Retrieves a user's contest ranking information
username: LeetCode username (string, required)attended: Whether to include only the contests the user has participated in (boolean, optional, default: true)get_recent_submissions - Retrieves a user's recent submissions on LeetCode Global
username: LeetCode username (string, required)limit: Maximum number of submissions to return (number, optional, default: 10)get_recent_ac_submissions - Retrieves a user's recent accepted submissions
username: LeetCode username (string, required)limit: Maximum number of submissions to return (number, optional, default: 10)get_user_status - Retrieves the current user's status
get_problem_submission_report - Retrieves detailed information about a specific submission
id: The numerical submission ID (number, required)get_problem_progress - Retrieves the current user's problem-solving progress
offset: Number of questions to skip (number, optional, default: 0)limit: Maximum number of questions to return (number, optional, default: 100)questionStatus: Filter by question status (enum: "ATTEMPTED", "SOLVED", optional)Prerequisites
Time Estimate
15-60 minutes depending on server complexity
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
Compatibility
✓ Use when
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid when
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.