PersonalLeetcodeMCP
LeetCode MCP Connector for Claude.ai
Claude.ai があなたの LeetCode 提出履歴や弱点分析にアクセスできるようにするリモート MCP サーバー。
提供されるツール
ツール | 説明 |
| ステータス、言語、複数回試行検出を含む最近の提出 |
| トピック別の弱点・強みの内訳と推奨事項 |
| 全体の承認数・提出数、連続記録、ランキングパーセンタイル |
| 今日のデイリーチャレンジ問題 |
Related MCP server: Interactive LeetCode MCP
セットアップ
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として既にあります)
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
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.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseAqualityAmaintenanceA 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.9196 npm151MIT
- AlicenseAqualityAmaintenanceEnables interactive LeetCode practice with AI-guided authentication, problem solving, solution submission, and learning mode.24147 npm12MIT
- FlicenseNot gradedqualityDmaintenanceLets Claude read your Trello boards, lists, and cards via a remote MCP server.-
- FlicenseNot gradedqualityDmaintenanceA tutorial and working MCP server that connects to your LeetCode profile, enabling AI assistants to check solved problems and recommend new ones by topic and difficulty.1-