1. Conduid
  2. Developer Tools
  3. Alfa Leetcode API
MCP server · Developer Tools

Alfa Leetcode API

It's a custom leetcode api. This API provides endpoints to retrieve details about a user's profile, badges, solved questions, contest details, contest history, submissions, calendar and and also daily questions, selected problem, list of problems.

81Excellent

Scored 3 days ago · breakdown

About Alfa Leetcode API

Alfa Leetcode API is an MCP server published by alfaarghya in the Developer Tools category: it's a custom leetcode api. This API provides endpoints to retrieve details about a user's profile, badges, solved questions, contest details, contest history, submissions, calendar and and also daily questions, selected problem, list of problems.

The repository has 835 stars and 333 forks, with the last commit 2 months ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/alfaarghya/alfa-leetcode-api

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Alfa Leetcode API

Powered by Claude · Grounded in docs

I know everything about Alfa Leetcode API. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v2.0.4v2.0.4 · 16 Apr 2026What's Changed Added Swagger/OpenAPI documentation for all API routes by @Morgan-Ngetich in https://github.com/alfaarghya/alfa-leetcode-api/pull/93 Changed Replace swagger-jsdoc with static swagger.yaml for maintainability Multi-stage…
v2.0.3v2.0.3 · 16 Apr 2026What's Changed Added Zod schema validation for contest routes by @nickbar01234 in https://github.com/alfaarghya/alfa-leetcode-api/pull/81 Error handling for contest routes by @nickbar01234 in…
v2.0.2v2.0.2 · 16 Apr 2026What's Changed Added MCP (Model Context Protocol) server with modular architecture for AI assistant integration by @devroopsaha744 in https://github.com/alfaarghya/alfa-leetcode-api/pull/71 Endpoints for `/all-contests` and…
v2.0.1v2.0.1 · 16 Apr 2026What's Changed Added New `/selectQuestion` API endpoint to get raw version of a selected question by title slug by @Ar0manKhan in https://github.com/alfaarghya/alfa-leetcode-api/pull/60 Contributors @Ar0manKhan Full Changelog:…
v2.0.0v2.0.0 · 16 Apr 2026What's Changed Added Docker image and Docker Compose support `skip` parameter for `/problems` API pagination by @ajchili in https://github.com/alfaarghya/alfa-leetcode-api/pull/27 Difficulty-based filtering for problems endpoint by…

README

About ✨

At First, I struggled to find proper documentation for the leetcode.com/graphql. After scouring various articles about the LeetCode public API, I still couldn't find the comprehensive documentation I was looking for. Fueled by the desire to fill this gap I created alfa-leetcode-api.

alfa-leetcode-api is a custom solution born out of the need for a well-documented and detailed LeetCode API. This project is designed to provide developers with endpoints that offer insights into a user's profile, badges, solved questions, contest details, contest history, submissions, and also daily questions, selected problem, list of problems.

API URL 🌐

https://alfa-leetcode-api.onrender.com/

Run with docker 🐳

docker run -p 3000:3000 alfaarghya/alfa-leetcode-api:2.0.4

Endpoints 🚀

👤User Details

Details Endpoint Description Demo
Profile /:username Get details about a user's profile. click here
Full Profile /:username/profile Get full profile details in one call click here
Badges /:username/badges Get the badges earned by the user. click here
Solved /:username/solved Get the total number of questions solved by the user. click here
Contest /:username/contest Get details about the user's contest participation. click here
Contest History /:username/contest/history Get all contest history. click here
Submission /:username/submission Get the last 20 submissions of the user. click here
Limited Submission /:username/submission?limit=number Get a specified number of the user's last submissions. click here
Accepted Submission /:username/acSubmission Get the last 20 accepted submission of the user. click here
Limited Accepted Submission /:username/acSubmission?limit=7 Get a specified number of the user's last accepted submission. click here
Calendar /:username/calendar Get the user's submission calendar. click here
Calendar with year /:username/calendar?year=2025 Get the user's submission calendar with year query click here
Skill Stats /:username/skill Get the user's skill stats. click here
Lang Stats /:username/language Get the language stats of a user click here
Question Progress /:username/progress Get your question progress click here

❓Questions Details

Details Endpoint Description Demo
Daily Problem /daily Get the daily question. click here
Daily Problem Raw /daily/raw Get the daily question in raw. click here
Selected Problem /select?titleSlug=selected-question Get details about a selected-question. click here
Raw Selected Problem /select/raw?titleSlug=selected-question Get raw selected question click here
Tags /tags Get a list of all problem topic tags.
Problems /problems Get a list of 20 problems. click here
Limited Problems /problems?limit=number Get a list of a specified number of problems. click here
Filter Problems /problems?tags=tag1+tag2 Get a list of problems based on selected tags. click here
Skip Problems /problems?skip=number Get a list of 20 problems, skipping a specified number of problems. click here
Difficulty /problems?difficulty=EASY Get a list of difficulty based problems, use MEDIUM to get medium level, HARD to get Hard level . click here
Filter & Limited Problems /problems?tags=tag1+tag2+tag3&limit=number Get a list of a specified number of problems based on selected tags. click here
Skip & Limited Problems /problems?limit=number&skip=number Get a list of a specified number of problems skipping a specified number of problems. click here
Skip & Filter & Limited Problems /problems?tags=tag1+tag2+tag3&limit=number&skip=number Get a list of a specified number of problems based on selected tags skipping a specified number of problems. click here
Official Solution /officialSolution?titleSlug=selected-question Get the official solution(leetcode) for a question click here

🏆 Contests

Details Endpoint Description Demo
All Contests /contests Get all the contests click here
Upcoming Contests /contests/upcoming Get the upcoming contests. click here

🗪 Discussion

Details Endpoint Description Demo
Trending Discussion /trendingDiscuss?first=20 Get top 20 trending discussions click here
Discussion Topic /discussTopic/:topicId Get discussion topic click here
Discussion Comment /discussComments/:topicId Get discussion comments click here

💡 Rate Limit

I've implemented a rate limit to prevent any potential server overload issues.

‼️ Note

During development, it's recommended to utilize the API locally. To do so, you can use docker image of our api.

MCP server integration 🤖

Follow this documentation MCP.md

Wanna Contribute 🤔??

Follow this documentation CONTRIBUTING.md

Author ✒️

Contributor ✏️

Contributor Contribution
@aryanpingle AC submission
@jamesh48 TypeScript Refactoring
@kvqn PORT environment variable
@changchunlei New Endpoints - language stats, integrated user profile, contest and discussions
@merakesh99 Hot reload issue solved
@ajchili Skip param to fetch problems
@theinit01 Temp fix for skip
@sazsu Docs improvements (capitalization, clarity, typo fixes)
@123xylem Add Descriptions and Methods to API route documentation.
@P-M-Manmohan Added filtering based on difficulty
@Ar0manKhan Raw selected question API (/select/raw)
@Ahmed-Armaan Update DOCS example with images
@Ayushman2004 Contest API endpoints
@devroopsaha744 MCP server
@nickbar01234 Added Zod schema for contest route
@DarrylMathias Updated demo images and typo fixes
@Morgan-Ngetich Added Swagger documentation

Connect with me 📲

LinkedIn Twitter Instagram LeetCode

README fetched from the repository 4 days ago. The original is authoritative.

Questions

About Alfa Leetcode API

How do I install Alfa Leetcode API?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Alfa Leetcode API safe to use with an AI agent?

Its trust score is 81 out of 100 (excellent). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Alfa Leetcode API still maintained?

Yes — the last commit was 2 months ago. The repository has 835 stars and 333 forks and 15 open issues.