Skip to content

Commit 92ad02f

Browse files
committed
feat: update npm-publish workflow and add pull request creation step; enhance README and package.json metadata
1 parent 7a10b03 commit 92ad02f

File tree

4 files changed

+46
-36
lines changed

4 files changed

+46
-36
lines changed

.github/workflows/npm-publish.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
name: Node.js Package
55

66
on:
7-
release:
8-
types: [created]
7+
push:
8+
tags: ["v*"]
99

1010
jobs:
1111
build:
@@ -30,4 +30,10 @@ jobs:
3030
- run: npm ci
3131
- run: npm publish
3232
env:
33-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
33+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
34+
35+
- name: Create Pull Request
36+
uses: peter-evans/create-pull-request@v7
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
commit-message: "chore(release): update CHANGELOG.md and version"

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ The server supports the following environment variables:
6969
- `LEETCODE_SESSION`: LeetCode session cookie for authenticated API access
7070

7171
**Priority Note**:
72-
Command-line arguments take precedence over environment variables when both are specified. For example:
72+
Command-line arguments take precedence over environment variables when both are specified. For example:
7373

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

7777
## Tools
@@ -82,74 +82,74 @@ The server provides a comprehensive suite of tools categorized by functionality
8282

8383
Available on both Global and China sites, with optional authentication.
8484

85-
| Tool Name | Description | Parameters |
86-
|-----------|-------------|------------|
87-
| **leetcode_daily_challenge** | Retrieves today's LeetCode Daily Challenge with complete metadata | None |
88-
| **leetcode_problem** | Retrieves comprehensive details for a specified LeetCode problem | `titleSlug` (string, required): Problem URL identifier (e.g., 'two-sum') |
89-
| **leetcode_search_problems** | Executes filtered searches across LeetCode problems | `category` (string, optional): Problem classification<br>`tags` (string[], optional): Topic tags filter<br>`difficulty` (string, optional): Problem complexity level ('EASY', 'MEDIUM', 'HARD')<br>`limit` (number, optional): Maximum results count<br>`offset` (number, optional): Pagination offset |
85+
| Tool Name | Description | Parameters |
86+
| ---------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
87+
| **leetcode_daily_challenge** | Retrieves today's LeetCode Daily Challenge with complete metadata | None |
88+
| **leetcode_problem** | Retrieves comprehensive details for a specified LeetCode problem | `titleSlug` (string, required): Problem URL identifier (e.g., 'two-sum') |
89+
| **leetcode_search_problems** | Executes filtered searches across LeetCode problems | `category` (string, optional): Problem classification<br>`tags` (string[], optional): Topic tags filter<br>`difficulty` (string, optional): Problem complexity level ('EASY', 'MEDIUM', 'HARD')<br>`limit` (number, optional): Maximum results count<br>`offset` (number, optional): Pagination offset |
9090

9191
### User Tools
9292

9393
Provides user-specific data across both platforms.
9494

95-
| Tool Name | Description | Parameters |
96-
|-----------|-------------|------------|
97-
| **leetcode_user_profile** | Retrieves complete profile information for a LeetCode user | `username` (string, required): LeetCode username |
98-
| **leetcode_user_contest_ranking** | Obtains contest ranking statistics for a user | `username` (string, required): LeetCode username<br>`attended` (boolean, optional): Filter for attended contests only |
95+
| Tool Name | Description | Parameters |
96+
| --------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
97+
| **leetcode_user_profile** | Retrieves complete profile information for a LeetCode user | `username` (string, required): LeetCode username |
98+
| **leetcode_user_contest_ranking** | Obtains contest ranking statistics for a user | `username` (string, required): LeetCode username<br>`attended` (boolean, optional): Filter for attended contests only |
9999

100100
### Global Site-Specific User Tools
101101

102102
Exclusive to leetcode.com platform.
103103

104-
| Tool Name | Description | Parameters |
105-
|-----------|-------------|------------|
106-
| **leetcode_recent_submissions** | Retrieves a user's recent submission history (Global) | `username` (string, required): LeetCode username<br>`limit` (number, optional): Results limit |
104+
| Tool Name | Description | Parameters |
105+
| ---------------------------------- | ------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
106+
| **leetcode_recent_submissions** | Retrieves a user's recent submission history (Global) | `username` (string, required): LeetCode username<br>`limit` (number, optional): Results limit |
107107
| **leetcode_recent_ac_submissions** | Retrieves a user's recent accepted submissions (Global) | `username` (string, required): LeetCode username<br>`limit` (number, optional): Results limit |
108108

109109
### China Site-Specific User Tools
110110

111111
Exclusive to leetcode.cn platform.
112112

113-
| Tool Name | Description | Parameters |
114-
|-----------|-------------|------------|
113+
| Tool Name | Description | Parameters |
114+
| --------------------------------------- | --------------------------------------------- | --------------------------------------------------------------------------------------------------- |
115115
| **leetcode_user_recent_ac_submissions** | Retrieves recent accepted submissions (China) | `username` (string, required): LeetCode China username<br>`limit` (number, optional): Results limit |
116116

117117
### Authenticated Common Tools
118118

119119
Requires session authentication, available on both platforms.
120120

121-
| Tool Name | Description | Parameters |
122-
|-----------|-------------|------------|
123-
| **leetcode_user_status** | Retrieves authenticated user's current status | None |
124-
| **leetcode_problem_submission_detail** | Provides detailed submission analysis | `id` (number, required): Submission ID |
125-
| **leetcode_user_progress_questions** | Tracks user's problem-solving progress | `offset` (number, required): Pagination offset<br>`limit` (number, required): Results limit<br>`questionStatus` (enum, optional): 'ATTEMPTED' or 'SOLVED' filter<br>`difficulty` (string[], optional): Complexity level filter |
121+
| Tool Name | Description | Parameters |
122+
| -------------------------------------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
123+
| **leetcode_user_status** | Retrieves authenticated user's current status | None |
124+
| **leetcode_problem_submission_detail** | Provides detailed submission analysis | `id` (number, required): Submission ID |
125+
| **leetcode_user_progress_questions** | Tracks user's problem-solving progress | `offset` (number, required): Pagination offset<br>`limit` (number, required): Results limit<br>`questionStatus` (enum, optional): 'ATTEMPTED' or 'SOLVED' filter<br>`difficulty` (string[], optional): Complexity level filter |
126126

127127
### Global Site-Specific Authenticated Tools
128128

129129
Authenticated tools exclusive to leetcode.com.
130130

131-
Name | Description | Parameters |
132-
|-----------|-------------|------------|
131+
| Name | Description | Parameters |
132+
| --------------------------------- | ----------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
133133
| **leetcode_user_all_submissions** | Retrieves paginated submission history (Global) | `limit` (number, required): Results limit<br>`offset` (number, required): Pagination offset<br>`questionSlug` (string, optional): Problem identifier filter |
134134

135135
### China Site-Specific Authenticated Tools
136136

137137
Authenticated tools exclusive to leetcode.cn.
138138

139-
| Tool Name | Description | Parameters |
140-
|-----------|-------------|------------|
139+
| Tool Name | Description | Parameters |
140+
| --------------------------------- | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
141141
| **leetcode_user_all_submissions** | Retrieves comprehensive submission history (China) | `limit` (number, required): Results limit<br>`offset` (number, required): Pagination offset<br>`questionSlug` (string, optional): Problem identifier<br>`lang` (string, optional): Programming language filter<br>`status` (string, optional): Submission status filter<br>`lastKey` (string, optional): Pagination token |
142142

143143
## Resources
144144

145145
The server provides reference resources for platform metadata access via URI endpoints.
146146

147-
| Resource Name | Description | URI |
148-
|---------------|-------------|-----|
149-
| **problem-categories** | Complete problem classification categories | `leetcode://problems/categories/all` |
150-
| **problem-tags** | Algorithmic and data structure tags collection | `leetcode://problems/tags/all` |
151-
| **problem-langs** | Supported programming languages list | `leetcode://problems/langs/all` |
152-
| **solution-article** | A LeetCode solution article | global: `leetcode://solutions/{topicId}`<br>cn: `leetcode://solutions/{slug}` |
147+
| Resource Name | Description | URI |
148+
| ---------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------- |
149+
| **problem-categories** | Complete problem classification categories | `leetcode://problems/categories/all` |
150+
| **problem-tags** | Algorithmic and data structure tags collection | `leetcode://problems/tags/all` |
151+
| **problem-langs** | Supported programming languages list | `leetcode://problems/langs/all` |
152+
| **solution-article** | A LeetCode solution article | global: `leetcode://solutions/{topicId}`<br>cn: `leetcode://solutions/{slug}` |
153153

154154
## Authentication
155155

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "mcp-server-leetcode",
2+
"name": "@jinzcdev/mcp-server-leetcode",
33
"description": "MCP Server for LeetCode API (supports leetcode.com and leetcode.cn)",
44
"version": "0.1.0",
55
"author": "jinzcdev",
@@ -28,6 +28,10 @@
2828
"build"
2929
],
3030
"license": "MIT",
31+
"repository": {
32+
"type": "git",
33+
"url": "https://github.com/jinzcdev/mcp-server-leetcode.git"
34+
},
3135
"lint-staged": {
3236
"*.{js,ts}": [
3337
"prettier --write",

prettier.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
singleQuote: false,
88
overrides: [
99
{
10-
files: "**/*.md",
10+
files: ["**/*.md", "**/*.yml"],
1111
options: {
1212
tabWidth: 2
1313
}

0 commit comments

Comments
 (0)