Skip to content

Commit e62c22a

Browse files
committed
fix: update package names and commands in README, package.json, and package-lock.json
1 parent bb7a60b commit e62c22a

File tree

4 files changed

+33
-17
lines changed

4 files changed

+33
-17
lines changed

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# LeetCode MCP Server
22

3-
![stars](https://img.shields.io/github/stars/jinzcdev/leetcode-mcp-server)
4-
![GitHub license](https://img.shields.io/github/license/jinzcdev/leetcode-mcp-server.svg)
3+
[![NPM Version](https://img.shields.io/npm/v/@jinzcdev/leetcode-mcp-server.svg)](https://www.npmjs.com/package/@jinzcdev/leetcode-mcp-server)
4+
[![GitHub License](https://img.shields.io/github/license/jinzcdev/leetcode-mcp-server.svg)](https://img.shields.io/github/license/jinzcdev/leetcode-mcp-server.svg)
5+
[![Stars](https://img.shields.io/github/stars/jinzcdev/leetcode-mcp-server)](https://github.com/jinzcdev/leetcode-mcp-server)
56

67
The LeetCode MCP Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that provides seamless integration with LeetCode APIs, enabling advanced automation and intelligent interaction with LeetCode's programming problems, contests, solutions, and user data.
78

@@ -22,29 +23,44 @@ The LeetCode MCP Server is a [Model Context Protocol (MCP)](https://modelcontext
2223

2324
```bash
2425
# Install from npm
25-
npm install @jinzcdev/mcp-server-leetcode -g
26+
npm install @jinzcdev/leetcode-mcp-server -g
2627

27-
# Run with China site configuration
28-
@jinzcdev/mcp-server-leetcode --site cn
28+
# Or run with Global site configuration
29+
npx -y @jinzcdev/leetcode-mcp-server --site global
2930

3031
# Run with authentication (for accessing private data)
31-
@jinzcdev/mcp-server-leetcode --site global --session <YOUR_LEETCODE_SESSION_COOKIE>
32+
npx -y @jinzcdev/leetcode-mcp-server --site global --session <YOUR_LEETCODE_SESSION_COOKIE>
33+
```
34+
35+
Alternatively, you can clone the repository and run it locally:
36+
37+
```bash
38+
# Clone the repository
39+
git clone https://github.com/jinzcdev/leetcode-mcp-server.git
40+
41+
# Navigate to the project directory
42+
cd leetcode-mcp-server
43+
44+
# Build and run the server
45+
npm run build && node build/index.js --site global
3246
```
3347

3448
## Usage
3549

3650
### Visual Studio Code Integration
3751

38-
Add the following JSON configuration to your User Settings (JSON) file Code. Access this by pressing `Ctrl + Shift + P` and searching for `Preferences: Open User Settings (JSON)`.
52+
Add the following JSON configuration to your User Settings (JSON) file Code. Access this by pressing `Ctrl/Cmd + Shift + P` and searching for `Preferences: Open User Settings (JSON)`.
3953

4054
```json
4155
{
4256
"mcp": {
4357
"servers": {
4458
"leetcode": {
4559
"type": "stdio",
46-
"command": "mcp-server-leetcode",
60+
"command": "npx",
4761
"args": [
62+
"-y",
63+
"@jinzcdev/leetcode-mcp-server",
4864
"--site",
4965
"global",
5066
"--session",
@@ -68,7 +84,7 @@ The server supports the following environment variables:
6884
**Priority Note**:
6985
Command-line arguments take precedence over environment variables when both are specified. For example:
7086

71-
- If `LEETCODE_SITE=cn` is set but you run `mcp-server-leetcode --site global`, the server will use `global`.
87+
- If `LEETCODE_SITE=cn` is set but you run `leetcode-mcp-server --site global`, the server will use `global`.
7288
- If `LEETCODE_SESSION` exists but you provide `--session "new_cookie"`, the command-line session value will be used.
7389

7490
## Tools

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@jinzcdev/mcp-server-leetcode",
2+
"name": "@jinzcdev/leetcode-mcp-server",
33
"description": "MCP Server for LeetCode API (supports leetcode.com and leetcode.cn)",
44
"version": "1.0.0",
55
"author": "jinzcdev",
@@ -21,7 +21,7 @@
2121
"prepare": "husky"
2222
},
2323
"bin": {
24-
"mcp-server-leetcode": "./build/index.js"
24+
"leetcode-mcp-server": "build/index.js"
2525
},
2626
"type": "module",
2727
"files": [
@@ -30,7 +30,7 @@
3030
"license": "MIT",
3131
"repository": {
3232
"type": "git",
33-
"url": "https://github.com/jinzcdev/mcp-server-leetcode.git"
33+
"url": "git+https://github.com/jinzcdev/leetcode-mcp-server.git"
3434
},
3535
"lint-staged": {
3636
"*.{js,ts}": [
@@ -62,4 +62,4 @@
6262
"typescript-eslint": "^8.29.1",
6363
"vitest": "^1.6.1"
6464
}
65-
}
65+
}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function parseArgs() {
3333
if (args.help) {
3434
console.log(`LeetCode MCP Server - Model Context Protocol server for LeetCode
3535
36-
Usage: mcp-server-leetcode [options]
36+
Usage: leetcode-mcp-server [options]
3737
3838
Options:
3939
--site, -s <site> LeetCode API site: 'global' (leetcode.com) or 'cn' (leetcode.cn), default is 'global'

0 commit comments

Comments
 (0)