PersonalLeetcodeMCP
LeetCode MCP Connector for Claude.ai
Claude.ai があなたの LeetCode 提出履歴や弱点分析にアクセスできるようにするリモート MCP サーバー。
提供されるツール
ツール | 説明 |
| ステータス、言語、複数回試行検出を含む最近の提出 |
| トピック別の弱点・強みの内訳と推奨事項 |
| 全体の承認数・提出数、連続記録、ランキングパーセンタイル |
| 今日のデイリーチャレンジ問題 |
Related MCP server: LeetCode MCP Server
セットアップ
1. インストールしてローカルで実行
npm install
npm start
# → Listening on http://localhost:30002. デプロイ(Claude.ai に必要)
Claude.ai では 公開アクセス可能な HTTPS URL が必要です。以下から選択してください。
オプション A — Railway(最も簡単、無料枠あり)
このフォルダを GitHub リポジトリにプッシュします。
railway.app にアクセス → New Project → Deploy from GitHub
Railway が Node.js を自動検出し、
https://leetcode-mcp-xxx.railway.appのような公開 URL が発行されます。
オプション B — Render
GitHub にプッシュします。
render.com → New Web Service → リポジトリを接続
Build:
npm install、Start:node server.jshttps://leetcode-mcp.onrender.comのような URL が取得できます。
オプション C — Docker(任意の VPS/クラウド)
docker build -t leetcode-mcp .
docker run -p 3000:3000 leetcode-mcp
# Then point a domain + SSL at port 3000オプション D — Cloudflare Workers(アドバンスド)
Cloudflare には組み込みの MCP サポートがあります。詳細: https://developers.cloudflare.com/mcp/
3. Claude.ai に追加
デプロイが完了したら:
Claude.ai → Settings → Connectors に移動します。
「Add custom connector」 をクリックします。
サーバー URL を入力します:
https://your-deployment-url.com/mcpAdd をクリックします。
これで完了です — Claude が LeetCode ツールにアクセスできるようになります。
プロンプト例
接続後、Claude に次のように試してみてください:
「LeetCode の弱点を分析して。私のユーザー名は @john_doe です」
「最近の 20 件の提出を見せて。どの問題で苦戦したか教えて」
「私の LeetCode 統計は?次に何に集中すべき?」
「今日のデイリーチャレンジは?」
LeetCode の API に関する注意事項
公開データ:
get_submission_history、get_user_stats、analyze_weak_areas、get_daily_challengeはすべて公開プロファイルデータで動作します。対象プロファイルが公開設定であれば、ログインは不要です。非公開プロファイル: ユーザーがプロファイルを非公開に設定している場合、LeetCode は空のデータを返します。ユーザーは LeetCode の設定 → プライバシーでプロファイルを公開に設定する必要があります。
LeetCode には公式の公開 API はありません。このサーバーは LeetCode のフロントエンドが使用しているものと同じ GraphQL エンドポイントを使用しています。LeetCode が API 構造を変更した場合、動作しなくなる可能性があります。
このサーバーの拡張
ツールを追加するには、server.js のパターンに従ってください:
server.tool("tool_name", "description", { param: z.string() }, async ({ param }) => {
// call lcQuery() and return results
return { content: [{ type: "text", text: "..." }] };
});追加に便利なクエリ:
タグ/難易度による問題検索(
problemsetQuestionListクエリを使用)企業タグ付き問題(LeetCode Premium セッション Cookie が必要)
コンテスト履歴(クエリはファイル内に
CONTEST_HISTORY_QUERYとして既にあります)
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Pace is a remote MCP server that exposes wearable and fitness data to Claude via the Model Context Protocol. It connects to Garmin, Oura, Whoop, Polar, Fitbit and 20+ devices and provides 15 tools for querying sleep, activity, recovery, and training data. Hosted on Google Cloud Run, OAuth 2.1 authentication, Streamable HTTP transport. Instructions: First you need to create an account at: https://pacetraining.co and connect your wearables. After that you can connect the remote Server via Custom Connector in Claude and OAuth 2.1 Flow startet.
A hosted LinkedIn MCP server for your own account. Paste one address into Claude, ChatGPT, Cursor or n8n to read your inbox, send messages and invitations, and search people. Free to start. Not made by LinkedIn.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude to search and retrieve LeetCode problems, user profiles, and statistics through natural language.-
- AlicenseAqualityCmaintenanceEnables integration with LeetCode APIs to retrieve problems, contests, solutions, and user data, support daily challenges and advanced searches, and perform authenticated actions such as running or submitting code and managing notes.9MIT
- FlicenseNot gradedqualityAmaintenanceEnables automated access to LeetCode problems, solutions, contests, and public or authenticated user data across leetcode.com and leetcode.cn, including problem search, profile and submission retrieval, code execution, and note management.-
- FlicenseNot gradedqualityAmaintenanceEnables automated access to LeetCode problems, solutions, contests, and public or authenticated user data across leetcode.com and leetcode.cn, with search, daily challenges, submissions, notes, and code execution/submission workflows.-