Skip to main content
Glama

mcp-server-leetcode

MCP サーバー LeetCode

npmバージョン GitHubライセンス バージョン

AI アシスタントが LeetCode の問題、ユーザー情報、コンテスト データにアクセスできるようにする、LeetCode 用のモデル コンテキスト プロトコル (MCP) サーバー。

特徴

  • 🚀 LeetCode APIへの高速アクセス

  • 🔍 問題を検索し、毎日の課題を取得し、ユーザープロフィールを確認します

  • 🏆 クエリコンテストデータとランキング

  • 🧩 MCPツールとリソースの完全サポート

  • 📦 CLIとプログラム可能なAPIの両方を提供

インストール

グローバルインストール

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

インストールしたら、コマンドラインから直接実行できます。

mcp-server-leetcode

ローカルインストール

npm install @mcpfun/mcp-server-leetcode

使用法

Claude for Desktopとの統合

Claude for Desktop のclaude_desktop_config.jsonファイルに以下を追加します。

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

地域開発の場合:

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

図書館として利用

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' });

利用可能なツール

問題関連ツール

ツール名

説明

パラメータ

get-daily-challenge

毎日のチャレンジに挑戦

なし

get-problem

特定の問題の詳細を取得する

titleSlug

(文字列)

search-problems

基準に基づいて問題を検索する

tags

(オプション)、

difficulty

(オプション)、

limit

(デフォルト20)、

skip

(デフォルト0)

ユーザー関連ツール

ツール名

説明

パラメータ

get-user-profile

ユーザー情報を取得する

username

(文字列)

get-user-submissions

ユーザーの投稿履歴を取得する

username

(文字列)、

limit

(オプション、デフォルトは20)

get-user-contest-ranking

ユーザーコンテストランキングを取得する

username

(文字列)

コンテスト関連ツール

ツール名

説明

パラメータ

get-contest-details

コンテストの詳細を見る

contestSlug

(文字列)

利用可能なリソース

問題リソース

  • leetcode://daily-challenge : デイリーチャレンジ

  • leetcode://problem/{titleSlug} : 問題の詳細

  • leetcode://problems{?tags,difficulty,limit,skip} : 問題リスト

ユーザーリソース

  • leetcode://user/{username}/profile : ユーザープロフィール

  • leetcode://user/{username}/submissions{?limit} : ユーザーの投稿

  • leetcode://user/{username}/contest-ranking : ユーザーコンテストランキング

地域開発

リポジトリをクローンし、依存関係をインストールします。

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

開発モードで実行:

npm run dev

プロジェクトをビルドします。

npm run build

ライセンス

マサチューセッツ工科大学

関連プロジェクト

謝辞

Deploy Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

AI アシスタントが LeetCode の問題、ユーザー情報、コンテスト データにアクセスできるようにする、LeetCode 用のモデル コンテキスト プロトコル (MCP) サーバー。

  1. 特徴
    1. インストール
      1. グローバルインストール
      2. ローカルインストール
    2. 使用法
      1. Claude for Desktopとの統合
      2. 図書館として利用
    3. 利用可能なツール
      1. 問題関連ツール
      2. ユーザー関連ツール
      3. コンテスト関連ツール
    4. 利用可能なリソース
      1. 問題リソース
      2. ユーザーリソース
    5. 地域開発
      1. ライセンス
        1. 関連プロジェクト
          1. 謝辞

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol (MCP) server that allows AI assistants like Claude to interact with Go's Language Server Protocol (LSP) and benefit from advanced Go code analysis features.
              Last updated -
              43
              Apache 2.0
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that provides integration with LeetCode APIs, enabling automated interaction with programming problems, contests, solutions, and user data across both leetcode.com and leetcode.cn platforms.
              Last updated -
              9
              196
              52
              MIT License
            • -
              security
              A
              license
              -
              quality
              Model Context Protocol (MCP) server that provides AI assistants with advanced web research capabilities, including Google search integration, intelligent content extraction, and multi-source synthesis.
              Last updated -
              11
              4
              MIT License
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol (MCP) server for advanced code analysis and editing with semantic search capabilities, enabling AI assistants to perform complex code operations through a standardized interface.
              Last updated -
              15
              1

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/doggybee/mcp-server-leetcode'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server