A Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and contest data. - ๐ 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 To install mcp-server-le
Add this skill
npx mdskills install doggybee/mcp-server-leetcodeComprehensive MCP server with well-documented LeetCode API tools covering problems, users, and contests
A Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and contest data.
To install mcp-server-leetcode for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @doggybee/mcp-server-leetcode --client claude
npm install -g @mcpfun/mcp-server-leetcode
Once installed, you can run it directly from the command line:
mcp-server-leetcode
npm install @mcpfun/mcp-server-leetcode
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"]
}
}
}
import { LeetCodeService } from '@mcpfun/mcp-server-leetcode';
// Initialize the service
const leetcodeService = new LeetCodeService();
// Get daily challenge
const dailyChallenge = await leetcodeService.getDailyChallenge();
// Search problems
const problems = await leetcodeService.searchProblems({
difficulty: 'MEDIUM',
tags: 'array+dynamic-programming'
});
| Tool Name | Description | Parameters |
|---|---|---|
get-daily-challenge | Get the daily challenge | None |
get-problem | Get details for a specific problem | titleSlug (string) |
search-problems | Search for problems based on criteria | tags (optional), difficulty (optional), limit (default 20), skip (default 0) |
| Tool Name | Description | Parameters |
|---|---|---|
get-user-profile | Get user information | username (string) |
get-user-submissions | Get user submission history | username (string), limit (optional, default 20) |
get-user-contest-ranking | Get user contest rankings | username (string) |
| Tool Name | Description | Parameters |
|---|---|---|
get-contest-details | Get contest details | contestSlug (string) |
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 submissionsleetcode://user/{username}/contest-ranking: User contest rankingClone the repository and install dependencies:
git clone https://github.com/doggybee/mcp-server-leetcode.git
cd mcp-server-leetcode
npm install
Run in development mode:
npm run dev
Build the project:
npm run build
MIT
Install via CLI
npx mdskills install doggybee/mcp-server-leetcodeMCP Server LeetCode is a free, open-source AI agent skill. A Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and contest data. - ๐ 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 To install mcp-server-le
Install MCP Server LeetCode with a single command:
npx mdskills install doggybee/mcp-server-leetcodeThis downloads the skill files into your project and your AI agent picks them up automatically.
MCP Server LeetCode works with Claude Code, Claude Desktop, Cursor, Vscode Copilot, Windsurf, Continue Dev, Gemini Cli, Amp, Roo Code, Goose. Skills use the open SKILL.md format which is compatible with any AI coding agent that reads markdown instructions.