Archestra Apps HackathonJoin now
Back to Catalog

mcp-server-leetcode

doggybee/mcp-server-leetcode
๐Ÿ”— Latest commit:eedc0c8
๐Ÿ•’ Updated:Sep 9, 2025, 01:05 PM
TypeScript
AI Tools

A Model Context Protocol (MCP) server for LeetCode that provides access to problems, user data, and contest information through GraphQL

MCP Trust Score
Based on our comprehensive evaluation criteria
๐Ÿค– Evaluated by gemini-2.5-flashFix
Trust Score50/100
GitHub Metrics
Repository statistics and activity
โญ GitHub Stars:25
๐Ÿ‘ฅ Contributors:2
๐Ÿ“‹ Total Issues:0
๐Ÿ“ฆ Has Releases:No
๐Ÿ”ง Has CI/CD Pipeline:No
Configuration
Configuration example extracted from README.md for Claude Desktop and other clients.
๐Ÿค– Evaluated by gemini-2.5-flashFix
{
  "mcpfun-mcp-server-leetcode": {
    "command": "mcp-server-leetcode",
    "args": [],
    "env": {}
  },
  "mcpfun-mcp-server-leetcode-cli-config": {
    "command": "mcp-server-leetcode",
    "args": [],
    "env": {}
  },
  "mcpfun-mcp-server-leetcode-node-config": {
    "command": "node",
    "args": [
      "/path/to/dist/index.js"
    ],
    "env": {}
  },
  "mcpfun-mcp-server-leetcode-dev": {
    "command": "npm",
    "args": [
      "run",
      "dev"
    ],
    "env": {}
  }
}
MCP Protocol Support
Implemented MCP protocol features
๐Ÿค– Evaluated by gemini-2.5-flashFix
Tools:โœ“
Prompts:โœ—
Resources:โœ“
Sampling:โœ—
Roots:โœ—
Logging:โœ—
STDIO Transport:โœ“
HTTP Transport:โœ—
OAuth2 Auth:โœ—
Dependencies
6 dependencies
Libraries and frameworks used by this MCP server
๐Ÿค– Evaluated by gemini-2.5-flashFix
Add Quality Badge
Show your MCP trust score in your README
Trust Score Badge
[![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/doggybee/mcp-server-leetcode)](https://archestra.ai/mcp-catalog/doggybee__mcp-server-leetcode)
README.md

MCP Server LeetCode

npm version
GitHub license
Version
smithery badge

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

Problem-related 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)

User-related Tools

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)

Contest-related Tools

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

Related Projects

Acknowledgements