MCP Server LeetCode

MCP Server LeetCode

An MCP server enabling AI assistants to access and interact with LeetCode data.

33
Stars
9
Forks
33
Watchers
3
Issues
MCP Server LeetCode provides a Model Context Protocol server interface to the LeetCode platform, allowing AI assistants to efficiently access LeetCode problems, user profiles, and contest information. The tool offers both a command-line interface and a programmable API for integration, supporting advanced queries and direct interaction with LeetCode resources. Comprehensive toolsets allow for searching problems, fetching daily challenges, and retrieving user and contest data. The server is designed for seamless integration with platforms such as Claude Desktop.

Key Features

Fast access to LeetCode APIs
Search for LeetCode problems with filters
Retrieve daily challenges
Fetch user profile and submission data
Query contest information and rankings
Compatible with Claude for Desktop and Smithery
Command-line interface and library API
Support for MCP tools and resources
Customizable resource and tool parameters
Local development and easy installation

Use Cases

Integrate with AI assistants to solve or analyze LeetCode problems in real-time
Automated retrieval of daily challenge problems
Monitoring user performance and submission histories
Generating problem recommendations based on tags and difficulty
Providing contest results and participant rankings to users
Educational platforms analyzing coding trends and user data
CLI or script-based LeetCode data extraction
Supporting AI-driven code evaluation and tutoring
Seamless plugin for productivity or learning tools
Custom dashboards for tracking LeetCode progress

README

MCP Server LeetCode

npm version GitHub license Version smithery badge

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:

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

Global Installation

bash
npm install -g @mcpfun/mcp-server-leetcode

Once installed, you can run it directly from the command line:

bash
mcp-server-leetcode

Local Installation

bash
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:

json
{
  "mcpServers": {
    "leetcode": {
      "command": "mcp-server-leetcode"
    }
  }
}

For local development:

json
{
  "mcpServers": {
    "leetcode": {
      "command": "node",
      "args": ["/path/to/dist/index.js"]
    }
  }
}

Use as a Library

javascript
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 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:

bash
git clone https://github.com/doggybee/mcp-server-leetcode.git
cd mcp-server-leetcode
npm install

Run in development mode:

bash
npm run dev

Build the project:

bash
npm run build

License

MIT

Related Projects

Acknowledgements

Star History

Star History Chart

Repository Owner

doggybee
doggybee

User

Repository Details

Language TypeScript
Default Branch main
Size 34 KB
Contributors 2
License MIT License
MCP Verified Nov 11, 2025

Programming Languages

TypeScript
90.72%
JavaScript
7.04%
Dockerfile
2.24%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • LeetCode MCP Server

    LeetCode MCP Server

    Seamless Model Context Protocol integration with LeetCode APIs for advanced automation and intelligent tooling.

    LeetCode MCP Server is a Model Context Protocol (MCP) compliant server that enables advanced integration with LeetCode’s APIs. It provides robust access to problem data, user profiles, contest analytics, and private user notes across both global and China LeetCode platforms. The server streamlines retrieval, analysis, and interaction with programming challenges, facilitating intelligent automation and enhanced workflow for developers and AI-powered tools. It can be installed via npm or Smithery and easily configured in popular environments like VSCode.

    • ⭐ 70
    • MCP
    • jinzcdev/leetcode-mcp-server
  • Linked API MCP

    Linked API MCP

    Connect LinkedIn to AI assistants for automated engagement and research.

    Linked API MCP enables AI assistants like Claude, Cursor, and VS Code to interact with LinkedIn through a secure cloud browser. It allows automated searching for leads, profile analysis, messaging, and market research on LinkedIn. The solution is designed for sales, recruitment, and market research professionals who want to automate LinkedIn workflows. Integration is streamlined, offering a set of tools accessible to popular AI-powered platforms.

    • ⭐ 23
    • MCP
    • Linked-API/linkedapi-mcp
  • Qlik MCP Server

    Qlik MCP Server

    Connect Claude AI to Qlik Cloud applications and extract insights via the Model Context Protocol.

    Qlik MCP Server enables integration between Claude AI and Qlik Cloud applications through the Model Context Protocol (MCP). It exposes API tools for listing Qlik apps, retrieving sheets and charts, and extracting chart data programmatically. The server supports deployment via Docker, Deno, or Node.js, and can be configured for use with tools like Claude Desktop and Cursor. The setup emphasizes secure handling of Qlik Cloud credentials and flexible environment configuration.

    • ⭐ 7
    • MCP
    • jwaxman19/qlik-mcp
  • WebSearch-MCP

    WebSearch-MCP

    Real-time web search for AI assistants via Model Context Protocol.

    WebSearch-MCP is a Model Context Protocol (MCP) server that enables real-time web search capabilities for AI assistants through the stdio transport. It connects with a web crawler API to retrieve up-to-date search results and serves these results to AI models like Claude. The solution offers straightforward configuration and seamless integration with various MCP clients, enhancing AI model access to current and relevant external information.

    • ⭐ 19
    • MCP
    • mnhlt/WebSearch-MCP
  • MCP Server for Iaptic

    MCP Server for Iaptic

    A Model Context Protocol server for accessing and managing Iaptic data with AI agents.

    MCP Server for Iaptic implements the Model Context Protocol to enable AI models, such as Claude, to securely and efficiently interact with Iaptic's customer, purchase, transaction, and statistics data. The server provides a standardized interface and command set for querying and managing information related to customers, purchases, transactions, events, and application management. Designed for integration with Claude Desktop and similar AI clients, it offers both automated and manual installation options.

    • ⭐ 5
    • MCP
    • iaptic/mcp-server-iaptic
  • Slite MCP Server

    Slite MCP Server

    Bridge Slite notes with AI model context using the MCP standard.

    Slite MCP Server implements the Model Context Protocol to interface with Slite's API, enabling seamless search, retrieval, and hierarchical browsing of workspace notes. It exposes standardized tools for searching notes, retrieving content by ID, and navigating note structures, making Slite content programmatically accessible to contextual AI pipelines. Built in Node.js and TypeScript, it is configurable and supports authentication via API key.

    • ⭐ 0
    • MCP
    • fajarmf/slite-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results