Cover image
Try Now
2025-04-02

Un serveur de protocole de contexte de modèle (MCP) pour Leetcode qui donne accès aux problèmes, aux données des utilisateurs et aux informations de concours via GraphQL

3 years

Works with Finder

1

Github Watches

0

Github Forks

1

Github Stars

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:

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

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

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • tomoyoshi hirata
  • Sony α7IIIマニュアルアシスタント

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • jae-jae
  • MCP Server pour récupérer le contenu de la page Web à l'aide du navigateur sans tête du dramwright.

  • HiveNexus
  • Un bot de chat IA pour les petites et moyennes équipes, soutenant des modèles tels que Deepseek, Open AI, Claude et Gemini. 专为中小团队设计的 Ai 聊天应用 , 支持 Deepseek 、 Open Ai 、 Claude 、 Gemini 等模型。

  • ravitemer
  • Un puissant plugin Neovim pour gérer les serveurs MCP (Protocole de contexte modèle)

  • patruff
  • Pont entre les serveurs Olllama et MCP, permettant aux LLM locaux d'utiliser des outils de protocole de contexte de modèle

  • Sysc4lls
  • Lecteur de documentation IDA (Sort-of) MCP Server

    Reviews

    3 (1)
    Avatar
    user_ezTlxoav
    2025-04-16

    I have been using mcp-server-leetcode and it has significantly improved my coding practice routine. The tool, developed by doggybee, effortlessly integrates with my workflow, providing seamless access to LeetCode problems. Highly recommend for anyone looking to streamline their coding practice! Check it out: https://github.com/doggybee/mcp-server-leetcode