MCP 服务器 LeetCode
LeetCode 的模型上下文协议 (MCP) 服务器,使 AI 助手能够访问 LeetCode 问题、用户信息和竞赛数据。
特征
🚀 快速访问 LeetCode API
🔍 搜索问题、检索每日挑战并查看用户资料
🏆 查询比赛数据和排名
🧩 全面支持 MCP 工具和资源
📦提供 CLI 和可编程 API
安装
全局安装
安装后,您可以直接从命令行运行它:
本地安装
用法
与 Claude for Desktop 集成
将以下内容添加到您的 Claude for Desktop claude_desktop_config.json
文件中:
对于本地开发:
用作图书馆
可用工具
问题相关工具
工具名称 | 描述 | 参数 |
| 接受每日挑战 | 没有任何 |
| 获取特定问题的详细信息 |
(字符串) |
| 根据标准搜索问题 |
(可选)、
(可选)、
(默认 20)、
(默认 0) |
用户相关工具
工具名称 | 描述 | 参数 |
| 获取用户信息 |
(字符串) |
| 获取用户提交历史记录 |
(字符串),
(可选,默认 20) |
| 获取用户竞赛排名 |
(字符串) |
比赛相关工具
工具名称 | 描述 | 参数 |
| 获取比赛详情 |
(字符串) |
可用资源
问题资源
leetcode://daily-challenge
:每日挑战leetcode://problem/{titleSlug}
:问题详情leetcode://problems{?tags,difficulty,limit,skip}
:问题列表
用户资源
leetcode://user/{username}/profile
:用户个人资料leetcode://user/{username}/submissions{?limit}
:用户提交leetcode://user/{username}/contest-ranking
:用户竞赛排名
本地开发
克隆存储库并安装依赖项:
以开发模式运行:
构建项目:
执照
麻省理工学院
相关项目
模型上下文协议- MCP 规范和文档
Claude for Desktop - 支持 MCP 的 AI 助手
致谢
该项目受到alfa-leetcode-api的启发
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
LeetCode 的模型上下文协议 (MCP) 服务器,使 AI 助手能够访问 LeetCode 问题、用户信息和竞赛数据。
Related Resources
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol (MCP) server that allows AI assistants like Claude to interact with Go's Language Server Protocol (LSP) and benefit from advanced Go code analysis features.Last updated -43Apache 2.0
- AsecurityAlicenseAqualityA Model Context Protocol server that provides integration with LeetCode APIs, enabling automated interaction with programming problems, contests, solutions, and user data across both leetcode.com and leetcode.cn platforms.Last updated -919652MIT License
- -securityAlicense-qualityModel Context Protocol (MCP) server that provides AI assistants with advanced web research capabilities, including Google search integration, intelligent content extraction, and multi-source synthesis.Last updated -114MIT License
- AsecurityFlicenseAqualityA Model Context Protocol (MCP) server for advanced code analysis and editing with semantic search capabilities, enabling AI assistants to perform complex code operations through a standardized interface.Last updated -151