user_profile

Pack: leetcode · Endpoint: https://gateway.pipeworx.io/leetcode/mcp

Fetch a LeetCode user’s public profile by username via GraphQL; returns real name, bio, avatar, global ranking, country, company, school, and star rating.

Parameters

NameTypeRequiredDescription
usernamestringyes

Example call

Arguments

{
  "username": "john_doe"
}

curl

curl -X POST https://gateway.pipeworx.io/leetcode/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"user_profile","arguments":{"username":"john_doe"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('user_profile', {
  "username": "john_doe"
});

More examples

{
  "username": "algorithm_master"
}

Response shape

FieldTypeDescription
matchedUserobject
Full JSON Schema
{
  "type": "object",
  "properties": {
    "matchedUser": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "LeetCode username"
        },
        "profile": {
          "type": "object",
          "properties": {
            "realName": {
              "type": [
                "string",
                "null"
              ],
              "description": "User's real name"
            },
            "aboutMe": {
              "type": [
                "string",
                "null"
              ],
              "description": "User bio or about section"
            },
            "userAvatar": {
              "type": [
                "string",
                "null"
              ],
              "description": "Avatar URL"
            },
            "ranking": {
              "type": [
                "number",
                "null"
              ],
              "description": "User's global ranking"
            },
            "countryName": {
              "type": [
                "string",
                "null"
              ],
              "description": "User's country"
            },
            "company": {
              "type": [
                "string",
                "null"
              ],
              "description": "User's company"
            },
            "school": {
              "type": [
                "string",
                "null"
              ],
              "description": "User's school"
            },
            "websites": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "type": "string"
              },
              "description": "User's websites"
            },
            "starRating": {
              "type": [
                "number",
                "null"
              ],
              "description": "User's star rating"
            }
          }
        }
      }
    }
  }
}

Connect

Add this to your MCP client config, or use one-click install buttons:

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

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026