L

LeetCode

Connects to LeetCode's programming platform for accessing problem descriptions, searching by tags an...

113 views
0 installs
Updated Sep 9, 2025
Not audited
Connects to LeetCode's programming platform for accessing problem descriptions, searching by tags and difficulty, retrieving user profiles, and viewing community solutions to enhance algorithm learning and contest preparation.
  1. Log in to LeetCode

  2. Extract Your LeetCode Session Cookie

    • While logged in, right-click the page and select Inspect (or press F12) to open Developer Tools.
    • Go to the Application (or Storage) tab.
    • Under Cookies, select the relevant domain (leetcode.com or leetcode.cn).
    • Look for the cookie key named LEETCODE_SESSION.
    • Copy the entire value of the LEETCODE_SESSION cookie.
  3. Choose the Site Setting

    • Decide which site you want to connect to in the FastMCP connection interface:
      • For LeetCode Global: enter global
      • For LeetCode China: enter cn
  4. Add Environment Variables in the FastMCP Connection Interface

    • Click the "Install Now" button for the LeetCode MCP server.
    • In the FastMCP connection interface, enter the following values:
      • LEETCODE_SITE — set this to global or cn (depending on which site you logged into).
      • LEETCODE_SESSION — paste the cookie value you copied in Step 2.
  5. Save and Connect

    • Save the configuration.
    • The LeetCode MCP Server will now be able to access your user-specific data and advanced features.

Note: Your session cookie grants access to your personal LeetCode account data. Keep it secure and do not share it with others.

Quick Start

View on GitHub

More for Developer Tools

View All →

Report Issue

Thank you! Your issue report has been submitted successfully.