Back to catalog
mcp-server-leetcode MCP Server
Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and competition data.
Get this MCP server
Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and competition data.
Installation
Smithery
npx -y @smithery/cli install @doggybee/mcp-server-leetcode --client claude
Global Installation
npm install -g @mcpfun/mcp-server-leetcode
mcp-server-leetcode
Local Installation
npm install @mcpfun/mcp-server-leetcode
From Source
git clone https://github.com/doggybee/mcp-server-leetcode.git
cd mcp-server-leetcode
npm install
npm run build
Configuration
Claude Desktop
{
"mcpServers": {
"leetcode": {
"command": "mcp-server-leetcode"
}
}
}
Local Development
{
"mcpServers": {
"leetcode": {
"command": "node",
"args": ["/path/to/dist/index.js"]
}
}
}
Available Tools
| Tool | Description |
|---|---|
get-daily-challenge |
Get the daily challenge problem |
get-problem |
Get details of a specific problem |
search-problems |
Search problems by criteria |
get-user-profile |
Get user profile information |
get-user-submissions |
Get user submission history |
get-user-contest-ranking |
Get user's competition ratings |
get-contest-details |
Get competition details |
Features
- Fast access to LeetCode API
- Search problems, fetch daily challenges, and check user profiles
- Query competition data and rankings
- Full support for MCP tools and resources
- Provides both CLI and programmatic API
Notes
The server provides both tools for accessing LeetCode data and resources using URI patterns like leetcode://daily-challenge and leetcode://problem/{titleSlug}. It can also be used as a JavaScript library with the LeetCodeService class.
