Skip to main content
Glama

mcp-server-leetcode

MCP サーバー LeetCode

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

ライセンス

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

関連プロジェクト

謝辞

You must be authenticated.

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

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
              Last updated -
              1
              1,930
              1,674
              TypeScript
              MIT License
              • Apple
            • -
              security
              F
              license
              -
              quality
              Implements the Model Context Protocol (MCP) to provide AI models with a standardized interface for connecting to external data sources and tools like file systems, databases, or APIs.
              Last updated -
              90
              Python
              • Apple
              • Linux
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol (MCP) server that enables AI assistants to control and interact with Android devices, allowing for device management, app debugging, system analysis, and UI automation through natural language commands.
              Last updated -
              29
              143
              Python
              Apache 2.0
              • Linux
              • Apple
            • 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 -
              13
              186
              22
              TypeScript
              MIT License

            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