by doggybee
Provides fast GraphQL access to LeetCode problems, user profiles, and contest information, enabling AI assistants and applications to query and retrieve data programmatically.
Mcp Server Leetcode exposes LeetCode data—problems, daily challenges, user profiles, submissions, and contest rankings—through a GraphQL interface, allowing AI agents and developers to fetch information on demand.
npm install -g @mcpfun/mcp-server-leetcode
npm install @mcpfun/mcp-server-leetcode
npx -y @smithery/cli install @doggybee/mcp-server-leetcode --client claude
mcp-server-leetcode
{
"mcpServers": {
"leetcode": {
"command": "mcp-server-leetcode"
}
}
}
import { LeetCodeService } from '@mcpfun/mcp-server-leetcode';
const svc = new LeetCodeService();
const daily = await svc.getDailyChallenge();
const problems = await svc.searchProblems({ difficulty: 'MEDIUM', tags: 'array+dynamic-programming' });
npx @mcpfun/mcp-server-leetcode
.npm run dev
for hot‑reload development, and submit a pull request.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
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "leetcode": { "command": "npx", "args": [ "-y", "@mcpfun/mcp-server-leetcode" ] } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.