lc-mcp-server

lascam-UFU/lc-mcp-server

3.2

If you are the rightful owner of lc-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

lc-mcp-server is a Go-based Model Context Protocol server designed for LeetCode, facilitating interaction with LeetCode tools and sessions.

lc-mcp-server

lc-mcp-server is a Go Model Context Protocol (MCP) server for LeetCode.

It provides:

  • An MCP server written in Go (main.go).
  • A browser‑based LeetCode cookie extraction helper (auth.go) using chromedp.

What it does

  • Lets an MCP host call LeetCode‑related tools (problems, contests, etc.).
  • Uses a real Chrome session to obtain LEETCODE_SESSION and CSRF cookies.

Basic usage

1. Install dependencies

go mod tidy

You also need Chrome/Chromium installed for the auth helper.

2. Get LeetCode cookies

go run auth.go

This will:

  1. Open Chrome.
  2. Let you log into LeetCode.
  3. Print shell export commands for LEETCODE_SESSION and CSRF.

You can optionally do:

eval "$(go run auth.go)"

to export directly in your current shell.

3. Run the MCP server

go run main.go

Configure your MCP host to connect to this server.
See the code in main.go and comments there for tool names and parameters.

Notes

  • Keep your session and CSRF tokens private.
  • See LICENSE for licensing details.