LeetCode CN MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LEETCODE_COOKIE | No | Complete cookie string containing csrftoken and LEETCODE_SESSION, used as a fallback when no system keychain is available. | |
| LEETCODE_SESSION | No | LeetCode session token, alternative to LEETCODE_COOKIE. | |
| LEETCODE_CSRFTOKEN | No | CSRF token, alternative to LEETCODE_COOKIE. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| auth_statusA | 检查 LeetCode 中国站登录状态,不返回或显示任何 Cookie。 |
| loginB | 通过本机安全页面登录 LeetCode 中国站并将 Cookie 保存到系统钥匙串。Cookie 不作为工具参数,也不会进入模型上下文。 |
| logoutA | 删除系统钥匙串中保存的 LeetCode 中国站凭证。 |
| get_problemA | 根据中国站题号、中文/英文标题、titleSlug 或题目 URL 获取题目信息。题目查询不需要登录。language 可指定 python3、cpp、java、typescript 等代码模板。 |
| get_submissions_by_dateA | 获取当前登录用户某个自然日的全部 LeetCode 中国站提交。date 默认为 Asia/Shanghai 时区的今天,格式 YYYY-MM-DD;包含 AC 和失败提交。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lkastar/leetcode-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server