Server data from the Official MCP Registry
Interactive LeetCode MCP server with authorization and solution submission capabilities
Interactive LeetCode MCP server with authorization and solution submission capabilities
The Interactive LeetCode MCP server is a well-structured tool for practicing coding problems with Claude. Authentication is properly implemented through credential validation and storage. However, there are moderate security concerns around credential handling in HTTP requests, lack of input validation on some parameters, and potential information disclosure through error messages. Permissions align reasonably with the server's purpose (network access for LeetCode API, file I/O for credentials), but some improvements to defensive practices are needed. Supply chain analysis found 6 known vulnerabilities in dependencies (0 critical, 5 high severity). Package verification found 1 issue.
4 files analyzed ยท 13 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-sperekrestova-interactive-leetcode-mcp": {
"args": [
"-y",
"@sperekrestova/interactive-leetcode-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
Current project is under active development and may not work perfectly
npm install -g @sperekrestova/interactive-leetcode-mcp
interactive-leetcode-mcp --version
interactive-leetcode-mcp --help
You can also run the package without installing it globally:
npx -y @sperekrestova/interactive-leetcode-mcp@latest --version
git clone https://github.com/SPerekrestova/interactive-leetcode-mcp.git
cd interactive-leetcode-mcp
npm install && npm run build
npm link
Use this to verify the published npm package from a clean directory without any LeetCode credentials:
mkdir leetcode-mcp-smoke
cd leetcode-mcp-smoke
npm init -y
npm install @sperekrestova/interactive-leetcode-mcp
npx --no-install interactive-leetcode-mcp --version
npx --no-install interactive-leetcode-mcp --help
Those commands confirm that Node can install the package and expose the CLI binary. For actual MCP server validation, use an integration test that connects over stdio and completes the MCP handshake.
You can execute this command in CLI
claude mcp add --transport stdio leetcode -- npx -y @sperekrestova/interactive-leetcode-mcp@latest
Or add to your MCP configuration file (~/.config/claude-code/mcp.json) or (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"leetcode": {
"command": "npx",
"args": ["-y", "@sperekrestova/interactive-leetcode-mcp@latest"]
}
}
}
{
"mcpServers": {
"leetcode": {
"command": "node",
"args": ["/path/to/this/project/interactive-leetcode-mcp/build/index.js"]
}
}
}
You: "Authorize with LeetCode"
Claude: [Opens LeetCode in your browser and guides you through the process]
Claude: "Please log in to your account. Once logged in, I'll walk you through
getting two cookie values we need. First, press F12 to open DevTools..."
You: [Follows Claude's step-by-step guidance]
You: "Here are my cookies: csrftoken is abc123... and LEETCODE_SESSION is xyz789..."
Claude: "โ Perfect! Your credentials are validated and saved. Welcome back, johndoe!"
You: "I want to practice two-sum"
Claude: [Fetches problem and creates working file]
You: "Give me a hint"
Claude: [Provides contextual guidance based on your code]
You: "Submit my solution"
Claude: "๐ Accepted! Runtime: 2ms (beats 95.3%)"
get_started
start_leetcode_auth
save_leetcode_credentials
csrftoken, session (cookie values you provide)check_auth_status
get_daily_challenge
get_problem
titleSlug (e.g., "two-sum")search_problems
start_problem
titleSlug, optional languagerequest_hint
titleSlugget_session_state
titleSlugreset_session
titleSlugrunner_doctor
run_local_tests
titleSlug, language, code, optional timeoutMslist_problem_solutions
questionSlug, optional limit, skip, orderBy, userInput,
tagSlugsget_problem_solution
topicId, titleSlugsubmit_solution
problemSlug, code, languageget_user_profile
get_recent_submissions
get_recent_ac_submissions
get_user_status
get_problem_submission_report
get_problem_progress
get_all_submissions
get_user_contest_ranking
The Interactive LeetCode MCP includes AI agent guidance through MCP Prompts to create a better learning experience.
Workspace Setup: When learning mode is active, Claude will:
{problem-slug}.{extension}Learning-Guided Mode: When active, Claude follows these guidelines:
Problem Workflow: Guides you through the complete cycle:
To activate learning mode, tell Claude you want to practice with guidance โ for example, "Let's practice in learning mode" or "I want to learn two-sum with hints." Once active:
get_started to load the server's usage guideget_daily_challenge, search_problems, or
get_problemstart_problemrequest_hint rather than jumping straight to solutionsTo test the MCP server as a black-box MCP client without live LeetCode traffic:
npm run dogfood:local
This builds the server, spawns build/index.js over stdio, connects with the
MCP SDK client, uses an isolated HOME, serves LeetCode responses from fixtures,
and drives a user-like flow through runner_doctor, start_problem,
request_hint, run_local_tests, and get_session_state.
See DOGFOOD_TESTING.md for the full workflow and a copy-paste prompt for local Claude/agent dogfood testing.
"Not authorized" or "Invalid credentials" error
"Credentials have expired"
Can't find DevTools or cookies
Copied wrong values
Browser doesn't open during authorization
"Unsupported language" error
Submission timeout
This repo also ships an agent skill that teaches Claude (and other AI agents) how to use the MCP server correctly โ including session flow, prompt invocations, learning mode, and authentication.
Install the skill directly as a Claude Code plugin:
/plugin marketplace add SPerekrestova/interactive-leetcode-mcp
/plugin install interactive-leetcode-mcp@interactive-leetcode-mcp
Then start a practice session with:
/interactive-leetcode-mcp:interactive-leetcode-mcp
The skill is also published on ClawHub for use with OpenClaw-compatible agents.
Forked from Leetcode mcp)
MIT ยฉ SPerekrestova
Be the first to review this server!
by Modelcontextprotocol ยท Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno ยท Developer Tools
Toleno Network MCP Server โ Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace ยท Developer Tools
Create, build, and publish Python MCP servers to PyPI โ conversationally.