MCP Catalogs
首页

leetcode-mcp-server

by jinzcdev·113·综合分 47

MCP服务器提供对LeetCode题目、解答和用户数据的自动访问,支持可选认证功能。

developer-toolsai-llmeducation
17
Forks
5
活跃 Issue
2 个月前
最近提交
2 天前
收录于

概述

LeetCode MCP服务器是一个综合性工具,将AI助手与LeetCode庞大的编程问题数据库连接起来。它既允许对公共问题数据的只读访问,也支持对用户特定功能(如提交记录和个人笔记)的认证访问。该服务器同时支持LeetCode全球版(leetcode.com)和中国版(leetcode.cn),使其对国际用户都很实用。

试试问 AI

装完之后,这里有 6 个你可以让 AI 做的事:

:AI辅助编程问题解决,即时获取题目详情和解法
:自动跟踪个人编程进度和提交分析
:与AI导师集成,基于LeetCode内容提供个性化编程教育
:使用此服务器需要LeetCode账户吗?
:我可以在leetcode.com和leetcode.cn上使用此服务器吗?
:源代码是否可用?

什么时候选它

如果你是准备编码面试或练习算法的开发者,需要自动化访问 LeetCode 的题目数据库和解答分析,请选择这个 server。

什么时候不要选它

如果你需要访问 LeetCode 的高级内容或其 API 未暴露的功能,或者担心分享你的 LeetCode 凭据,请不要选择它。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • get_daily_challenge

    Retrieves today's LeetCode Daily Challenge problem

  • get_problem

    Retrieves details for a specific LeetCode problem

  • search_problems

    Searches for LeetCode problems with multiple filter criteria

  • get_user_profile

    Retrieves profile information for a LeetCode user

  • get_recent_ac_submissions

    Retrieves a user's recent accepted submissions

  • run_code

    Runs code for a problem and waits until finished

  • submit_solution

    Submits code for a problem and waits until finished

  • list_problem_solutions

    Retrieves a list of community solutions for a specific problem

  • get_note

    Retrieves notes for a specific LeetCode problem

  • create_note

    Creates a new note for a specific LeetCode problem

  • get_problem_submission_report

    Provides detailed submission analysis for a specific problem

  • get_problem_progress

    Retrieves current user's problem-solving progress

可对比工具

leetcode-apileetcode-clileetcode-solutions-browser

安装

安装

通过Smithery安装(推荐用于Claude Desktop)

npx -y @smithery/cli install @jinzcdev/leetcode-mcp-server --client claude

手动安装

npm install @jinzcdev/leetcode-mcp-server -g

Claude Desktop配置

添加到您的settings.json文件:

{
  "mcp": {
    "servers": {
      "leetcode": {
        "type": "stdio",
        "command": "npx",
        "args": ["-y", "@jinzcdev/leetcode-mcp-server"],
        "env": {
          "LEETCODE_SITE": "global",
          "LEETCODE_SESSION": "<您的LEETCODE_SESSION_COOKIE>"
        }
      }
    }
  }
}

FAQ

使用此服务器需要LeetCode账户吗?
不需要,无需认证即可访问基本题目数据。但是,提交记录、个人笔记和运行代码等功能需要使用LeetCode会话cookie进行身份验证。
我可以在leetcode.com和leetcode.cn上使用此服务器吗?
可以,该服务器支持LeetCode全球版(leetcode.com)和中国版(leetcode.cn)。您可以使用--site参数或LEETCODE_SITE环境变量指定站点。
源代码是否可用?
是的,这是一个开源项目。您可以克隆仓库并在使用npm install && npm run build构建项目后本地运行。

leetcode-mcp-server 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。