mcp-server-leetcode

mcp-server-leetcode

An MCP server for LeetCode enabling AI access to problems, user info, and contests.

35
Stars
11
Forks
0
Releases

Overview

An MCP server for LeetCode that enables AI assistants and MCP-enabled clients to access LeetCode data through structured MCP interactions. It exposes fast access to the LeetCode API for retrieving problems, daily challenges, user profiles, and contest data. The server supports searching problems, obtaining daily challenges, and checking user information; it also allows querying contest details and user rankings. It fully supports MCP tools and resources to facilitate integration with AI agents and workflows, and offers both a CLI and a programmable API for easy adoption. The library style interface exposes a LeetCodeService with methods such as getDailyChallenge and searchProblems with optional difficulty and tags. Available problem-related tools include get-daily-challenge, get-problem, and search-problems; user-related tools include get-user-profile, get-user-submissions, and get-user-contest-ranking; contest-related tool includes get-contest-details. The README also maps common MCP resources to leetcode:// URIs (leetcode://daily-challenge, leetcode://problem/{titleSlug}, leetcode://problems{?tags,difficulty,limit,skip}, leetcode://user/{username}/profile, leetcode://user/{username}/submissions, and leetcode://user/{username}/contest-ranking). Local development and installation paths are provided, including Smithery, global npm, and local builds. Developers can instantiate LeetCodeService and call methods in code or run the server via CLI.

Details

Owner
doggybee
Language
TypeScript
License
MIT License
Updated
2025-12-07

Features

Fast access to LeetCode API

Provides rapid access to LeetCode data for MCP powered interactions, enabling quick retrieval of problems, daily challenges, and user profiles.

Search problems, daily challenges, and profiles

Supports searching problems, obtaining the daily challenge, and checking user profiles via MCP integration.

Query contest data and rankings

Allows querying contest details and user rankings to support competition insights.

Full MCP tool and resource support

Fully supports MCP tools and resources to facilitate seamless integration with AI agents and workflows.

CLI and programmable API

Provides both a command line interface and a programmable API for flexible usage and automation.

Tags

leetcodemcpaiproblemdaily-challengecontestuserapicli