Cover image
Try Now
2025-04-02

Un servidor de protocolo de contexto modelo (MCP) para LEETCODE que proporciona acceso a problemas, datos de usuario e información del concurso a través de 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.

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

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

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

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

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

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • HiveNexus
  • Un bot de chat de IA para equipos pequeños y medianos, que apoyan modelos como Deepseek, Open AI, Claude y Gemini. 专为中小团队设计的 ai 聊天应用 , 支持 Deepseek 、 Open ai 、 Claude 、 Géminis 等模型。

  • ravitemer
  • Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)

  • patruff
  • Puente entre los servidores Ollama y MCP, lo que permite a LLM locales utilizar herramientas de protocolo de contexto del modelo

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

    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