by doggybee
Provides fast GraphQL‑based access to LeetCode problems, user profiles, and contest information for AI assistants.
Enables AI assistants to query LeetCode data such as daily challenges, problem details, user statistics, and contest rankings through a Model Context Protocol (MCP) server.
Installation
npx -y @smithery/cli install @doggybee/mcp-server-leetcode --client claude
npm install -g @mcpfun/mcp-server-leetcode
npm install @mcpfun/mcp-server-leetcode
Running
mcp-server-leetcode
(or via npx -y @doggybee/mcp-server-leetcode
).Configuration
Add the server to claude_desktop_config.json
:
{
"mcpServers": {
"leetcode": {
"command": "mcp-server-leetcode"
}
}
}
For local development, point to the built script:
{
"mcpServers": {
"leetcode": {
"command": "node",
"args": ["/path/to/dist/index.js"]
}
}
}
Library usage
import { LeetCodeService } from '@mcpfun/mcp-server-leetcode';
const leetcode = new LeetCodeService();
const daily = await leetcode.getDailyChallenge();
const problems = await leetcode.searchProblems({ difficulty: 'MEDIUM', tags: 'array+dynamic-programming' });
Q: Do I need an API key? A: No API key is required; the server communicates with the public LeetCode endpoints.
Q: Which platforms are supported? A: It runs on any system with Node.js (v14+).
Q: Can I run the server locally without installing globally?
A: Yes, install the package locally and start it with npx -y @doggybee/mcp-server-leetcode
.
Q: How do I limit the number of returned problems?
A: Use the limit
parameter in the search-problems
tool or the corresponding library method.
Q: Is the project open source? A: Yes, it is licensed under the MIT License and hosted on GitHub.
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", "@doggybee/mcp-server-leetcode" ], "env": {} } } }
Discover more MCP servers with similar functionality and use cases
by danny-avila
Provides a customizable ChatGPT‑like web UI that integrates dozens of AI models, agents, code execution, image generation, web search, speech capabilities, and secure multi‑user authentication, all open‑source and ready for self‑hosting.
by ahujasid
BlenderMCP integrates Blender with Claude AI via the Model Context Protocol (MCP), enabling AI-driven 3D scene creation, modeling, and manipulation. This project allows users to control Blender directly through natural language prompts, streamlining the 3D design workflow.
by pydantic
Enables building production‑grade generative AI applications using Pydantic validation, offering a FastAPI‑like developer experience.
by GLips
Figma-Context-MCP is a Model Context Protocol (MCP) server that provides Figma layout information to AI coding agents. It bridges design and development by enabling AI tools to directly access and interpret Figma design data for more accurate and efficient code generation.
by mcp-use
Easily create and interact with MCP servers using custom agents, supporting any LLM with tool calling and offering multi‑server, sandboxed, and streaming capabilities.
by sonnylazuardi
This project implements a Model Context Protocol (MCP) integration between Cursor AI and Figma, allowing Cursor to communicate with Figma for reading designs and modifying them programmatically.
by lharries
WhatsApp MCP Server is a Model Context Protocol (MCP) server for WhatsApp that allows users to search, read, and send WhatsApp messages (including media) through AI models like Claude. It connects directly to your personal WhatsApp account via the WhatsApp web multi-device API and stores messages locally in a SQLite database.
by idosal
GitMCP is a free, open-source remote Model Context Protocol (MCP) server that transforms any GitHub project into a documentation hub, enabling AI tools to access up-to-date documentation and code directly from the source to eliminate "code hallucinations."
by Klavis-AI
Klavis AI provides open-source Multi-platform Control Protocol (MCP) integrations and a hosted API for AI applications. It simplifies connecting AI to various third-party services by managing secure MCP servers and authentication.