LeetCode MCP Server
Allows searching and retrieving LeetCode problem details, user profiles, and solved problem statistics.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
LeetCode MCP Server
A Model Context Protocol (MCP) server built with Python that enables Claude Desktop to access LeetCode through natural language. The server exposes LeetCode functionality as MCP tools, allowing Claude to retrieve problem information, user statistics, and other resources directly from a conversation.
Features
Search LeetCode problems
Retrieve problem details
Fetch user profile information
View user statistics
Native integration with Claude Desktop using MCP
Related MCP server: LeetCode MCP Server
Tech Stack
Python 3.11+
Model Context Protocol (MCP)
Claude Desktop
LeetCode API
Project Structure
.
├── server.py
├── tools/
├── utils/
├── requirements.txt
├── pyproject.toml
└── README.mdAdjust the structure above to match your repository.
Installation
Clone the repository.
git clone https://github.com/<username>/leetcode-mcp-server.git
cd leetcode-mcp-serverCreate a virtual environment.
python -m venv .venvActivate it.
Windows
.venv\Scripts\activateLinux/macOS
source .venv/bin/activateInstall dependencies.
pip install -r requirements.txtRunning the Server
python server.pyClaude Desktop Configuration
Add the server to your Claude Desktop MCP configuration.
{
"mcpServers": {
"leetcode": {
"command": "python",
"args": [
"/absolute/path/to/server.py"
]
}
}
}Restart Claude Desktop after updating the configuration.
Example Prompts
Search for Medium Binary Search problems.Show me the problem statement for Two Sum.Display my LeetCode profile.How many Hard problems have I solved?Available Tools
Tool | Description |
Search Problems | Search problems using filters or keywords |
Problem Details | Retrieve complete problem information |
User Profile | Fetch LeetCode profile information |
User Statistics | Retrieve solved problem statistics |
Architecture
Claude Desktop
│
│ MCP
▼
LeetCode MCP Server
│
▼
LeetCode APIFuture Improvements
Daily Challenge support
Contest information
Company-specific problems
Topic-based recommendations
Submission history
AI-assisted problem recommendations
License
MIT License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search Luogu problems, fetch statements, explore problem sets and get practice recommendations.
Search Codeforces problems and inspect public problem metadata through the official Codeforces API.
Live SEO workflow tools for Claude Code, Codex, and AI agents.
Search and read the Claude Platform documentation and API reference.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables Claude to fetch and analyze your public LeetCode submission history, weak areas, and daily challenge via a remote MCP server.6 npmMIT
- AlicenseAqualityCmaintenanceEnables integration with LeetCode APIs to retrieve problems, contests, solutions, and user data, support daily challenges and advanced searches, and perform authenticated actions such as running or submitting code and managing notes.9727 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables automated access to LeetCode problems, solutions, contests, and public or authenticated user data across leetcode.com and leetcode.cn, including problem search, profile and submission retrieval, code execution, and note management.-
- FlicenseNot gradedqualityAmaintenanceEnables automated access to LeetCode problems, solutions, contests, and public or authenticated user data across leetcode.com and leetcode.cn, with search, daily challenges, submissions, notes, and code execution/submission workflows.-