Purpose
This MCP server is used to let AI assistants access LeetCode problems, user information, and contest data through the Model Context Protocol, making it convenient to search, retrieve, and solve LeetCode problems in AI conversations, and to perform metadata filtering as well as access user profiles, submission records, and contest data.
Main Capabilities
- Quick access to the LeetCode API
- Search problems, get the daily challenge, view user profiles
- Query contest data and rankings
- Full support for MCP tools and resources
- Provides both a CLI and a programmable API
Available Tools and Resources
The project provides the following categories of tools:
- Problem-related tools
- User-related tools
- Contest-related tools
The project provides the following resources:
leetcode://daily-challenge: Daily challengeleetcode://problem/{titleSlug}: Problem detailsleetcode://problems{?tags,difficulty,limit,skip}: Problem listleetcode://user/{username}/profile: User profileleetcode://user/{username}/submissions{?limit}: User submission recordsleetcode://user/{username}/contest-ranking: User contest ranking
Usage
Install via Smithery
Smithery can be used to automatically install mcp-server-leetcode for Claude Desktop.
Global Installation
After installation, it can be run directly from the command line. The original text does not provide the specific global installation command.
Local Installation
The original text does not provide the specific local installation command.
Integration with Claude for Desktop
Add the relevant configuration to Claude for Desktop's claude_desktop_config.json file. The original text does not provide the complete configuration content.
Local Development
Clone the repository and install dependencies, then run in development mode, and finally build the project. The original text does not provide the specific commands.
Use as a Library
The project can be used as a library for programmatic calls.
Applicable Scenarios
- AI assistants answering LeetCode problems in conversations
- Searching and retrieving LeetCode problems and the daily challenge
- Viewing LeetCode user profiles, submission records, and contest rankings
- Querying LeetCode contest data and rankings
Limitations
The original text does not provide information such as fees, pricing, platform, effects, or specific usage steps. Some installation and configuration commands are not fully given in the original text.