LeetCode
๐ โ๏ธ - An MCP server that enables AI models to search, retrieve, and solve LeetCode problems. Supports metadata filtering, user profiles, submissions, and contest data access.
What is LeetCode?
LeetCode is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ๐ โ๏ธ - an mcp server that enables ai models to search, retrieve, and solve leetcode problems. supports metadata filtering, user profiles, submissions, and contest data access.
๐ โ๏ธ - An MCP server that enables AI models to search, retrieve, and solve LeetCode problems. Supports metadata filtering, user profiles, submissions, and contest data access.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- ๐ โ๏ธ - An MCP server that enables AI models to search, retri
Use Cases
Maintainer
Works with
Installation
NPM
npx -y @jinzcdev/leetcode-mcp-serverManual Installation
npx -y @jinzcdev/leetcode-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use LeetCode
mcp-server-leetcode is an MCP server that gives AI assistants direct access to LeetCode's problem set, user profiles, submission history, and contest data through a clean set of tools. It uses the LeetCode public GraphQL API to let Claude search problems by difficulty or tag, fetch daily challenges, retrieve problem details with examples and constraints, and look up a user's contest rankings and accepted submissions. Competitive programmers and interview preppers use it to have Claude explain problems, generate solutions, review their submission history, and track progress โ all from within their AI client.
Prerequisites
- Node.js 18 or later (or npm for global install)
- An MCP client such as Claude Desktop or Claude Code
- No API keys required โ the server uses the public LeetCode GraphQL API
- Optional: a LeetCode account username if you want to access submission history or contest rankings
Install the package globally
Install the LeetCode MCP server globally via npm so it is available as a command on your PATH.
npm install -g @jinzcdev/leetcode-mcp-serverRun the server to verify it starts
Start the server directly to confirm it launches correctly before adding it to your MCP client.
npx -y @jinzcdev/leetcode-mcp-serverConfigure Claude Desktop
Add the server to your claude_desktop_config.json. No environment variables are required.
{
"mcpServers": {
"leetcode": {
"command": "npx",
"args": ["-y", "@jinzcdev/leetcode-mcp-server"]
}
}
}Install via Smithery (alternative)
You can also install and register the server in one step using the Smithery CLI.
npx -y @smithery/cli install @doggybee/mcp-server-leetcode --client claudeVerify tools are available
Ask your AI client to fetch today's LeetCode daily challenge as a quick smoke test to confirm the server is connected and working.
LeetCode Examples
Client configuration
Claude Desktop config for the LeetCode MCP server โ no environment variables needed.
{
"mcpServers": {
"leetcode": {
"command": "npx",
"args": ["-y", "@jinzcdev/leetcode-mcp-server"]
}
}
}Prompts to try
Sample prompts for problem search, daily challenges, user stats, and contest data.
- "Fetch today's LeetCode daily challenge and explain the problem"
- "Search for medium difficulty dynamic programming problems and suggest one for me to practice"
- "Show me the LeetCode profile and contest ranking for user 'leetcode'"
- "Retrieve problem #1 Two Sum with full examples and constraints, then write a Python solution"
- "Find all hard-difficulty graph problems tagged 'shortest path'"Troubleshooting LeetCode
Server returns empty results when searching problems
LeetCode's GraphQL API may rate-limit unauthenticated requests. Try again after a short wait. If the issue persists, the API schema may have changed โ check the GitHub repo for updates.
User submission history returns empty or not found
Submission history requires a valid LeetCode username. Make sure you are providing the exact username (case-sensitive) as it appears on the LeetCode profile page.
npx command takes a long time to start the server
Install the package globally with npm install -g @jinzcdev/leetcode-mcp-server so subsequent runs skip the download step and start immediately.
Frequently Asked Questions about LeetCode
What is LeetCode?
LeetCode is a Model Context Protocol (MCP) server that ๐ โ๏ธ - an mcp server that enables ai models to search, retrieve, and solve leetcode problems. supports metadata filtering, user profiles, submissions, and contest data access. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install LeetCode?
Install via npm with the command: npx -y @jinzcdev/leetcode-mcp-server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with LeetCode?
LeetCode works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is LeetCode free to use?
Yes, LeetCode is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
LeetCode Alternatives โ Similar Developer Tools Servers
Looking for alternatives to LeetCode? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
โ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
โ 155.8kJava ้ข่ฏ & ๅ็ซฏ้็จ้ข่ฏๆๅ๏ผ่ฆ็่ฎก็ฎๆบๅบ็กใๆฐๆฎๅบใๅๅธๅผใ้ซๅนถๅใ็ณป็ป่ฎพ่ฎกไธ AI ๅบ็จๅผๅ
Gemini CLI
โ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
โ 87.3kโญ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
โ 86.0kModel Context Protocol Servers
CC Switch
โ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up LeetCode in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use LeetCode?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.