MCP Server Leetcode

Community Search and web

Search, retrieve and solve LeetCode problems, with metadata filtering and access to user profiles, submissions and contest data.

What can you do with MCP Server Leetcode?

  • 🚀 Fast access to LeetCode API
  • 🔍 Search problems, retrieve daily challenges, and check user profiles
  • 🏆 Query contest data and rankings
  • 🧩 Full support for MCP tools and resources
  • 📦 Provides both CLI and programmable API

Install

The installation steps are in the documentation below. Documentation

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. MCP Server LeetCode
  2. Features
  3. Installation
  4. Usage
  5. Available Tools
  6. Available Resources
  7. Local Development
  8. License
  9. Related Projects
  10. Acknowledgements

MCP Server LeetCode

A Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and contest data.

Features

  • 🚀 Fast access to LeetCode API
  • 🔍 Search problems, retrieve daily challenges, and check user profiles
  • 🏆 Query contest data and rankings
  • 🧩 Full support for MCP tools and resources
  • 📦 Provides both CLI and programmable API

Installation

Installing via Smithery

To install mcp-server-leetcode for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @doggybee/mcp-server-leetcode --client claude
Global Installation
npm install -g @mcpfun/mcp-server-leetcode

Once installed, you can run it directly from the command line:

mcp-server-leetcode
Local Installation
npm install @mcpfun/mcp-server-leetcode

Usage

Integration with Claude for Desktop

Add the following to your Claude for Desktop claude_desktop_config.json file:

{
  "mcpServers": {
    "leetcode": {
      "command": "mcp-server-leetcode"
    }
  }
}

For local development:

{
  "mcpServers": {
    "leetcode": {
      "command": "node",
      "args": ["/path/to/dist/index.js"]
    }
  }
}
Use as a Library
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'
});

Available Tools

Tool NameDescriptionParameters
get-daily-challengeGet the daily challengeNone
get-problemGet details for a specific problemtitleSlug (string)
search-problemsSearch for problems based on criteriatags (optional), difficulty (optional), limit (default 20), skip (default 0)
Tool NameDescriptionParameters
get-user-profileGet user informationusername (string)
get-user-submissionsGet user submission historyusername (string), limit (optional, default 20)
get-user-contest-rankingGet user contest rankingsusername (string)
Tool NameDescriptionParameters
get-contest-detailsGet contest detailscontestSlug (string)

Available Resources

Problem Resources
  • leetcode://daily-challenge: Daily challenge
  • leetcode://problem/{titleSlug}: Problem details
  • leetcode://problems{?tags,difficulty,limit,skip}: Problem list
User Resources
  • leetcode://user/{username}/profile: User profile
  • leetcode://user/{username}/submissions{?limit}: User submissions
  • leetcode://user/{username}/contest-ranking: User contest ranking

Local Development

Clone the repository and install dependencies:

git clone https://github.com/doggybee/mcp-server-leetcode.git
cd mcp-server-leetcode
npm install

Run in development mode:

npm run dev

Build the project:

npm run build

License

MIT

Acknowledgements

Frequently asked questions

What is MCP Server Leetcode?

Search, retrieve and solve LeetCode problems, with metadata filtering and access to user profiles, submissions and contest data.

How do I install MCP Server Leetcode?

Follow the installation steps in its documentation, shown on this page and in its repository.

Is MCP Server Leetcode open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains MCP Server Leetcode?

It is published by doggybee. AI.tn lists it but does not maintain or endorse it.

From the community awesome-mcp-servers lists and the project's GitHub repository. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.