官方说明📇 ☁️ - An MCP server that enables AI models to search, retrieve, and solve LeetCode problems. Supports metadata filtering, user profiles, submissions, and contest data access.
配置模板(请按你的客户端调整)
claude mcp add mcp-server-leetcode -- npx -y mcp-server-leetcode
A Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and contest data. Features - 🚀 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 Installation Installing via Smithery To install mcp-server-leetcode for Claude Desktop automatically via Smithery: Global Installation Once installed, you can run it directly from the command line: Local Installation Usage Integration with Claude for Desktop Add the following to your Claude for Desktop claude_desktop_config.json file: For local development: Use as a Library Available Tools Problem-related Tools | 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) | User-related Tools | 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) | Contest-related Tools | Tool Name | Description | Parameters | |--------|------|------| | get-contest-details | Get contest details | contestSlug (string) | Available Resources Problem Resources - leetcode://daily-challenge: Daily challenge - leetcode://problem/{titleSlug}: Problem details - leetcode://problems{?tags,difficulty,limit,skip}: Problem list User Resources - leetcode://user/{username}/profile: User profile - leetcode://user/{username}/submissions{?limit}: User submissions - leetcode://user/{username}/contest-ranking: User contest ranking Local Development Clone the repository and install dependencies: