About
LeetCode MCP Server connects AI assistants to LeetCode's extensive library of coding problems, user profiles, and competitive programming data. It provides fast, programmatic access to algorithmic challenges and contest statistics to support coding interview preparation and technical assessment workflows. Key capabilities include: - Search problems with filters for difficulty level (Easy, Medium, Hard) and topic tags like arrays, dynamic programming, and trees - Retrieve daily coding challenges for consistent practice routines - Access detailed user profiles including submission history and solved problem counts - Query contest rankings and competition performance data - Flexible integration via both command-line interface and programmable JavaScript/TypeScript API
README
MCP Server LeetCode
[](https://www.npmjs.com/package/@mcpfun/mcp-server-leetcode) [](https://github.com/doggybee/mcp-server-leetcode/blob/main/LICENSE) [](https://github.com/doggybee/mcp-server-leetcode/releases) [](https://smithery.ai/server/@doggybee/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
Installation
Installing via Smithery
To install mcp-server-leetcode for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @doggybee/mcp-server-leetcode --client claude
Global Installation
npm install -g @mcpfun/mcp-server-leetcode
Once installed, you can run it directly from the command line:
mcp-server-leetcode
Local Installation
npm install @mcpfun/mcp-server-leetcode
Usage
Integration with Claude for Desktop
Add the following to your Claude for Desktop claude_desktop_config.json file:
{
"mcpServers": {
"leetcode": {
"command": "mcp-server-leetcode"
}
}
}
For local development:
{
"mcpServers": {
"leetcode": {
"command": "node",
"args": ["/path/to/dist/index.js"]
}
}
}
Use as a Library
import { LeetCodeService } from '@mcpfun/mcp-server-leetcode';// Initialize the service
const leetcodeService = new LeetCodeService();
// Get daily challenge
const dailyChallenge = await leetcodeService.getDailyChallenge();
// Search problems
const problems = await leetcodeService.searchProblems({
difficulty: 'MEDIUM',
tags: 'array+dynamic-programming'
});
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 challengeleetcode://problem/{titleSlug}: Problem detailsleetcode://problems{?tags,difficulty,limit,skip}: Problem listUser Resources
leetcode://user/{username}/profile: User profileleetcode://user/{username}/submissions{?limit}: User submissionsleetcode://user/{username}/contest-ranking: User contest rankingLocal Development
Clone the repository and install dependencies:
git clone https://github.com/doggybee/mcp-server-leetcode.git
cd mcp-server-leetcode
npm install
Run in development mode:
npm run dev
Build the project:
npm run build
License
MIT
Related Projects
Acknowledgements
Related MCP Servers
AI Research Assistant
hamid-vakilzadeh
AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar
Linkup
LinkupPlatform
Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages
Math-MCP
EthanHenrickson
Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support