# Leetcode

> Leetcode is a freemium MCP server for developer tools. Gateway MCP server giving AI clients read-only access to LeetCode profiles, stats. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** API, CLI, self-hosted
- **Website:** https://pipeworx.io/packs/leetcode
- **Repository:** https://github.com/pipeworx-io/mcp-leetcode
- **MCP Registry name:** io.github.pipeworx-io/leetcode
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The README describes this as a LeetCode bridge that queries LeetCode's public GraphQL endpoint without an API key. It covers public user profiles, solved-problem counts by difficulty, recent accepted submissions, the daily challenge, individual problems looked up by slug, and overall problem set totals.

The server is hosted on the Pipeworx gateway, so calls go through that service rather than directly to LeetCode. It can also be run locally with npx as a stdio bridge that forwards requests to the same endpoint. Without an API key, calls are capped per day; a free Pipeworx account raises the limit.

The server suits developers and coding-practice tracking workflows that want an assistant to look up LeetCode progress or problem details. The README notes the upstream endpoint is unofficial and may change without notice.

## Features

- **Public profile lookup:** Fetches a user's public profile by username, including real name, avatar and contest rating.
- **Solved problem stats:** Returns a user's solved-problem counts broken down by difficulty.
- **Recent accepted submissions:** Lists a user's recent accepted submissions, with an optional limit.
- **Daily challenge retrieval:** Returns the current daily coding challenge.
- **Problem detail by slug:** Looks up a single problem's details using its title slug, such as two-sum.
- **Problem set totals:** Reports the total number of problems by difficulty.

## Good for

- Checking a LeetCode user's solved counts and recent accepted submissions
- Pulling the daily challenge into a study or reminder workflow
- Retrieving details for a specific problem by slug while practicing
- Comparing difficulty breakdowns across LeetCode users

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http leetcode https://gateway.pipeworx.io/leetcode/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://gateway.pipeworx.io/leetcode/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "leetcode": {
      "url": "https://gateway.pipeworx.io/leetcode/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "leetcode": {
      "type": "http",
      "url": "https://gateway.pipeworx.io/leetcode/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "leetcode": {
      "serverUrl": "https://gateway.pipeworx.io/leetcode/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "leetcode": {
      "type": "http",
      "url": "https://gateway.pipeworx.io/leetcode/mcp"
    }
  }
}
```

## Tools

- `user_profile`: Public profile by username.
- `user_solved`: Solved-problem stats by difficulty.
- `user_recent_submissions`: Recent accepted submissions.
- `daily_question`: Today's daily coding challenge.
- `problem`: Problem detail by title slug.
- `problemset_stats`: Total problems by difficulty.

## FAQ

### Does it need an API key?

No. Without a key, calls are anonymous and capped daily. A free Pipeworx account raises the daily cap, and the README describes the key as optional.

### Which tools does it expose?

The README lists six pack tools: user_profile, user_solved, user_recent_submissions, daily_question, problem and problemset_stats. The hosted endpoint also lists shared Pipeworx meta-tools.

### Is it affiliated with LeetCode?

The README states it is an independent, unofficial integration and not affiliated with, endorsed by, or published by LeetCode.

### Is Leetcode free?

Leetcode has a free plan, with paid plans for more usage or features.

### How do I add Leetcode to Claude Code?

Run this command in your terminal: claude mcp add --transport http leetcode https://gateway.pipeworx.io/leetcode/mcp

### What are the best alternatives to Leetcode?

The closest alternatives to Leetcode are Codeforces, Codewars, Httpstatus, Git Leaderboard and Devdocs Io.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Codeforces](https://ai-powered.com/mcp/codeforces): Codeforces is a freemium MCP server for developer tools.
- [Codewars](https://ai-powered.com/mcp/codewars): Codewars is a freemium MCP server for developer tools.
- [Httpstatus](https://ai-powered.com/mcp/httpstatus): Httpstatus is a freemium MCP server for developer tools.
- [Git Leaderboard](https://ai-powered.com/mcp/git-leaderboard): Git Leaderboard is a freemium MCP server for developer tools.
- [Devdocs Io](https://ai-powered.com/mcp/devdocs-io): Devdocs Io is a freemium MCP server for developer tools.
- [MCP Morning](https://ai-powered.com/mcp/mcp-morning): MCP Morning is a free MCP server for developer tools.
- [Linq.es MCP Server](https://ai-powered.com/mcp/linq-es-mcp-server): Linq.es MCP Server is a paid MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/leetcode
