Skip to content

Commit 422baff

Browse files
committed
docs: update README for project build and server run instructions
1 parent 5c5ee6f commit 422baff

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ git clone https://github.com/jinzcdev/leetcode-mcp-server.git
5858
# Navigate to the project directory
5959
cd leetcode-mcp-server
6060

61-
# Build and run the server
62-
npm run build && node build/index.js --site global
61+
# Build the project
62+
npm install && npm run build
63+
64+
# Run the server
65+
node build/index.js --site global
6366
```
6467

6568
## Usage

README_zh-CN.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ npx -y @smithery/cli install @jinzcdev/leetcode-mcp-server --client claude
4242
# 从 npm 安装
4343
npm install @jinzcdev/leetcode-mcp-server -g
4444

45-
# 使用全球站点配置运行
46-
npx -y @jinzcdev/leetcode-mcp-server --site global
45+
# 使用中国站点配置运行
46+
npx -y @jinzcdev/leetcode-mcp-server --site cn
4747

4848
# 使用认证运行(访问私有数据)
49-
npx -y @jinzcdev/leetcode-mcp-server --site global --session <您的 LEETCODE 会话 COOKIE>
49+
npx -y @jinzcdev/leetcode-mcp-server --site cn --session <您的 LEETCODE 会话 COOKIE>
5050
```
5151

5252
或者,您可以克隆仓库并在本地运行:
@@ -58,8 +58,11 @@ git clone https://github.com/jinzcdev/leetcode-mcp-server.git
5858
# 导航到项目目录
5959
cd leetcode-mcp-server
6060

61-
# 构建并运行服务器
62-
npm run build && node build/index.js --site global
61+
# 构建项目
62+
npm install && npm run build
63+
64+
# 运行服务器
65+
node build/index.js --site cn
6366
```
6467

6568
## 使用方法
@@ -79,7 +82,7 @@ npm run build && node build/index.js --site global
7982
"command": "npx",
8083
"args": ["-y", "@jinzcdev/leetcode-mcp-server"],
8184
"env": {
82-
"LEETCODE_SITE": "global",
85+
"LEETCODE_SITE": "cn",
8386
"LEETCODE_SESSION": "<您的 LEETCODE 会话 COOKIE>"
8487
}
8588
}
@@ -101,7 +104,7 @@ npm run build && node build/index.js --site global
101104
"-y",
102105
"@jinzcdev/leetcode-mcp-server",
103106
"--site",
104-
"global",
107+
"cn",
105108
"--session",
106109
"<您的 LEETCODE 会话 COOKIE>"
107110
]
@@ -111,7 +114,7 @@ npm run build && node build/index.js --site global
111114
}
112115
```
113116

114-
对于 LeetCode 中国站点,请将 `--site` 参数修改为 `cn`
117+
对于 LeetCode 全球站点,请将 `--site` 参数修改为 `global`
115118

116119
> [!TIP]
117120
>

0 commit comments

Comments
 (0)