issue-scribe-mcp 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +354 -42
- package/README_EN.md +411 -0
- package/dist/index.js +1293 -0
- package/package.json +1 -1
- package/src/index.ts +1428 -0
- package/test-local.sh +63 -0
package/README_EN.md
ADDED
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
# issue-scribe-mcp
|
|
2
|
+
|
|
3
|
+
[](README.md)
|
|
4
|
+
[](README_EN.md)
|
|
5
|
+
|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
> An MCP (Model Context Protocol) server for collecting and managing GitHub Issue and Pull Request contexts. Easily query and create Issues and PRs from AI assistants like Claude Desktop.
|
|
11
|
+
|
|
12
|
+
## ✨ Features
|
|
13
|
+
|
|
14
|
+
- 🔍 **Context Retrieval**: Collect complete context including issue/PR details, comments, and commit history
|
|
15
|
+
- 📝 **Issue Management**: Create new issues and update existing ones
|
|
16
|
+
- 🔀 **PR Creation**: Automatically create Pull Requests with Draft PR support
|
|
17
|
+
- 🤖 **AI Integration**: Seamless integration with MCP-compatible AI tools like Claude Desktop
|
|
18
|
+
- 🔐 **Simple Authentication**: Secure API access via GitHub Personal Access Token
|
|
19
|
+
|
|
20
|
+
## 📋 Prerequisites
|
|
21
|
+
|
|
22
|
+
### GitHub Personal Access Token Setup
|
|
23
|
+
|
|
24
|
+
1. Navigate to [GitHub Personal Access Token creation page](https://github.com/settings/tokens/new)
|
|
25
|
+
2. Configure token settings:
|
|
26
|
+
- **Note**: `issue-scribe-mcp` (or your preferred name)
|
|
27
|
+
- **Expiration**: Select desired expiration period
|
|
28
|
+
- **Select scopes**: Check the following permissions
|
|
29
|
+
- ✅ `repo` (Full repository access)
|
|
30
|
+
- ✅ `read:org` (Read organization info, optional)
|
|
31
|
+
3. Click `Generate token`
|
|
32
|
+
4. **Safely copy the generated token** (you won't be able to see it again!)
|
|
33
|
+
|
|
34
|
+
### Environment Variable Setup
|
|
35
|
+
|
|
36
|
+
Create a `.env` file in the project root:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
GITHUB_TOKEN=your_github_personal_access_token_here
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 🚀 Installation
|
|
43
|
+
|
|
44
|
+
### Global Installation via NPM
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npm install -g issue-scribe-mcp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 🔄 Update
|
|
51
|
+
|
|
52
|
+
To update to the latest version:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm update -g issue-scribe-mcp
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Or reinstall with a specific version:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm install -g issue-scribe-mcp@latest
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Check currently installed version:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm list -g issue-scribe-mcp
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Local Development
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Clone repository
|
|
74
|
+
git clone https://github.com/gay00ung/issue-scribe-mcp.git
|
|
75
|
+
cd issue-scribe-mcp
|
|
76
|
+
|
|
77
|
+
# Install dependencies
|
|
78
|
+
npm install
|
|
79
|
+
|
|
80
|
+
# Build
|
|
81
|
+
npm run build
|
|
82
|
+
|
|
83
|
+
# Set up environment variables
|
|
84
|
+
cp .env.example .env
|
|
85
|
+
# Add your GitHub Token to .env file
|
|
86
|
+
|
|
87
|
+
# Run directly
|
|
88
|
+
node dist/index.js
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Test with MCP Inspector
|
|
92
|
+
|
|
93
|
+
We provide a convenient script to test the MCP server locally:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
./test-local.sh
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
This script automatically:
|
|
100
|
+
- ✅ Loads `.env` file
|
|
101
|
+
- ✅ Verifies `GITHUB_TOKEN`
|
|
102
|
+
- ✅ Checks build status
|
|
103
|
+
- ✅ **Launches MCP Inspector** (opens browser automatically)
|
|
104
|
+
|
|
105
|
+
You can test all Tools with a GUI and inspect API responses in MCP Inspector!
|
|
106
|
+
|
|
107
|
+
## ⚙️ MCP Client Configuration
|
|
108
|
+
|
|
109
|
+
### Claude Desktop Setup
|
|
110
|
+
|
|
111
|
+
Add the following to Claude Desktop's configuration file (`claude_desktop_config.json`):
|
|
112
|
+
|
|
113
|
+
**Mac**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
114
|
+
**Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"mcpServers": {
|
|
119
|
+
"issue-scribe": {
|
|
120
|
+
"command": "node",
|
|
121
|
+
"args": ["/path/to/issue-scribe-mcp/dist/index.js"],
|
|
122
|
+
"env": {
|
|
123
|
+
"GITHUB_TOKEN": "your_github_token_here"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Restart Claude Desktop after configuration.
|
|
131
|
+
|
|
132
|
+
## 🛠️ Available Tools
|
|
133
|
+
|
|
134
|
+
### github_get_issue_context
|
|
135
|
+
Retrieve full context of a GitHub Issue.
|
|
136
|
+
|
|
137
|
+
**Parameters:**
|
|
138
|
+
- `owner` (string, required): Repository owner
|
|
139
|
+
- `repo` (string, required): Repository name
|
|
140
|
+
- `issue_number` (number, required): Issue number
|
|
141
|
+
|
|
142
|
+
**Returns:**
|
|
143
|
+
- Issue title, body, state
|
|
144
|
+
- Author and assignee information
|
|
145
|
+
- Labels, milestones
|
|
146
|
+
- All comments and reactions
|
|
147
|
+
|
|
148
|
+
### github_get_pr_context
|
|
149
|
+
Retrieve full context of a GitHub Pull Request (including commits).
|
|
150
|
+
|
|
151
|
+
**Parameters:**
|
|
152
|
+
- `owner` (string, required): Repository owner
|
|
153
|
+
- `repo` (string, required): Repository name
|
|
154
|
+
- `pull_number` (number, required): PR number
|
|
155
|
+
|
|
156
|
+
**Returns:**
|
|
157
|
+
- PR title, body, state
|
|
158
|
+
- Source/target branches
|
|
159
|
+
- Commit list and changed files
|
|
160
|
+
- Review comments and approval status
|
|
161
|
+
|
|
162
|
+
### github_create_issue
|
|
163
|
+
Create a new GitHub Issue.
|
|
164
|
+
|
|
165
|
+
**Parameters:**
|
|
166
|
+
- `owner` (string, required): Repository owner
|
|
167
|
+
- `repo` (string, required): Repository name
|
|
168
|
+
- `title` (string, required): Issue title
|
|
169
|
+
- `body` (string, optional): Issue body
|
|
170
|
+
- `labels` (string[], optional): Array of labels
|
|
171
|
+
- `assignees` (string[], optional): Array of assignees
|
|
172
|
+
|
|
173
|
+
### github_update_issue
|
|
174
|
+
Update an existing GitHub Issue.
|
|
175
|
+
|
|
176
|
+
**Parameters:**
|
|
177
|
+
- `owner` (string, required): Repository owner
|
|
178
|
+
- `repo` (string, required): Repository name
|
|
179
|
+
- `issue_number` (number, required): Issue number
|
|
180
|
+
- `title` (string, optional): New title
|
|
181
|
+
- `body` (string, optional): New body
|
|
182
|
+
- `state` (string, optional): `"open"` or `"closed"`
|
|
183
|
+
- `labels` (string[], optional): New labels array
|
|
184
|
+
- `assignees` (string[], optional): New assignees array
|
|
185
|
+
|
|
186
|
+
### github_create_pr
|
|
187
|
+
Create a new GitHub Pull Request.
|
|
188
|
+
|
|
189
|
+
**Parameters:**
|
|
190
|
+
- `owner` (string, required): Repository owner
|
|
191
|
+
- `repo` (string, required): Repository name
|
|
192
|
+
- `title` (string, required): PR title
|
|
193
|
+
- `body` (string, optional): PR description
|
|
194
|
+
- `head` (string, required): Branch to merge from (e.g., `"feature-branch"`)
|
|
195
|
+
- `base` (string, required): Branch to merge into (e.g., `"main"`)
|
|
196
|
+
- `draft` (boolean, optional): Create as draft PR
|
|
197
|
+
- `maintainer_can_modify` (boolean, optional): Allow maintainer modifications
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
### github_add_comment
|
|
202
|
+
Add a comment to a GitHub Issue or Pull Request.
|
|
203
|
+
|
|
204
|
+
**Parameters:**
|
|
205
|
+
- `owner` (string, required): Repository owner
|
|
206
|
+
- `repo` (string, required): Repository name
|
|
207
|
+
- `issue_number` (number, required): Issue or PR number
|
|
208
|
+
- `body` (string, required): Comment body text
|
|
209
|
+
|
|
210
|
+
**Returns:**
|
|
211
|
+
- Comment ID, body, author
|
|
212
|
+
- Comment URL and creation time
|
|
213
|
+
|
|
214
|
+
### github_update_comment
|
|
215
|
+
Update an existing comment.
|
|
216
|
+
|
|
217
|
+
**Parameters:**
|
|
218
|
+
- `owner` (string, required): Repository owner
|
|
219
|
+
- `repo` (string, required): Repository name
|
|
220
|
+
- `comment_id` (number, required): Comment ID to update
|
|
221
|
+
- `body` (string, required): New comment body text
|
|
222
|
+
|
|
223
|
+
### github_delete_comment
|
|
224
|
+
Delete a comment.
|
|
225
|
+
|
|
226
|
+
**Parameters:**
|
|
227
|
+
- `owner` (string, required): Repository owner
|
|
228
|
+
- `repo` (string, required): Repository name
|
|
229
|
+
- `comment_id` (number, required): Comment ID to delete
|
|
230
|
+
|
|
231
|
+
### github_add_reaction
|
|
232
|
+
Add an emoji reaction to a comment or directly to an issue/PR.
|
|
233
|
+
|
|
234
|
+
**Parameters:**
|
|
235
|
+
- `owner` (string, required): Repository owner
|
|
236
|
+
- `repo` (string, required): Repository name
|
|
237
|
+
- `comment_id` (number, optional): Comment ID to react to
|
|
238
|
+
- `issue_number` (number, optional): Issue/PR number to react to
|
|
239
|
+
- `reaction` (string, required): Reaction type
|
|
240
|
+
- `thumbs_up` 👍, `thumbs_down` 👎, `laugh` 😄, `confused` 😕, `heart` ❤️, `hooray` 🎉, `rocket` 🚀, `eyes` 👀
|
|
241
|
+
|
|
242
|
+
**Note**: Either `comment_id` OR `issue_number` must be provided.
|
|
243
|
+
|
|
244
|
+
### github_create_label
|
|
245
|
+
Create a new label in the repository.
|
|
246
|
+
|
|
247
|
+
**Parameters:**
|
|
248
|
+
- `owner` (string, required): Repository owner
|
|
249
|
+
- `repo` (string, required): Repository name
|
|
250
|
+
- `name` (string, required): Label name
|
|
251
|
+
- `color` (string, required): Hex color code without '#' (e.g., 'FF0000')
|
|
252
|
+
- `description` (string, optional): Label description
|
|
253
|
+
|
|
254
|
+
**Returns:**
|
|
255
|
+
- Label name, color, description
|
|
256
|
+
- Label URL
|
|
257
|
+
|
|
258
|
+
### github_update_label
|
|
259
|
+
Update an existing label's name, color, or description.
|
|
260
|
+
|
|
261
|
+
**Parameters:**
|
|
262
|
+
- `owner` (string, required): Repository owner
|
|
263
|
+
- `repo` (string, required): Repository name
|
|
264
|
+
- `name` (string, required): Current label name to update
|
|
265
|
+
- `new_name` (string, optional): New label name
|
|
266
|
+
- `color` (string, optional): New hex color code without '#'
|
|
267
|
+
- `description` (string, optional): New description
|
|
268
|
+
|
|
269
|
+
### github_delete_label
|
|
270
|
+
Delete a label from the repository.
|
|
271
|
+
|
|
272
|
+
**Parameters:**
|
|
273
|
+
- `owner` (string, required): Repository owner
|
|
274
|
+
- `repo` (string, required): Repository name
|
|
275
|
+
- `name` (string, required): Label name to delete
|
|
276
|
+
|
|
277
|
+
### github_list_labels
|
|
278
|
+
List all labels in the repository.
|
|
279
|
+
|
|
280
|
+
**Parameters:**
|
|
281
|
+
- `owner` (string, required): Repository owner
|
|
282
|
+
- `repo` (string, required): Repository name
|
|
283
|
+
- `per_page` (number, optional): Results per page, max 100 (default: 30)
|
|
284
|
+
|
|
285
|
+
**Returns:**
|
|
286
|
+
- Label count
|
|
287
|
+
- Each label's name, color, description, and URL
|
|
288
|
+
|
|
289
|
+
### github_list_branches
|
|
290
|
+
List all branches in the repository.
|
|
291
|
+
|
|
292
|
+
**Parameters:**
|
|
293
|
+
- `owner` (string, required): Repository owner
|
|
294
|
+
- `repo` (string, required): Repository name
|
|
295
|
+
- `protected` (boolean, optional): Filter by protected status
|
|
296
|
+
- `per_page` (number, optional): Results per page, max 100 (default: 30)
|
|
297
|
+
|
|
298
|
+
**Returns:**
|
|
299
|
+
- Branch count
|
|
300
|
+
- Each branch's name, commit SHA, and protected status
|
|
301
|
+
|
|
302
|
+
### github_create_branch
|
|
303
|
+
Create a new branch from an existing branch or commit.
|
|
304
|
+
|
|
305
|
+
**Parameters:**
|
|
306
|
+
- `owner` (string, required): Repository owner
|
|
307
|
+
- `repo` (string, required): Repository name
|
|
308
|
+
- `branch` (string, required): New branch name
|
|
309
|
+
- `ref` (string, required): Source branch name or commit SHA (e.g., 'main' or 'abc123')
|
|
310
|
+
|
|
311
|
+
**Returns:**
|
|
312
|
+
- Branch name, ref, SHA
|
|
313
|
+
- Branch URL
|
|
314
|
+
|
|
315
|
+
### github_delete_branch
|
|
316
|
+
Delete a branch from the repository.
|
|
317
|
+
|
|
318
|
+
**Parameters:**
|
|
319
|
+
- `owner` (string, required): Repository owner
|
|
320
|
+
- `repo` (string, required): Repository name
|
|
321
|
+
- `branch` (string, required): Branch name to delete
|
|
322
|
+
|
|
323
|
+
### github_compare_branches
|
|
324
|
+
Compare two branches and show the differences.
|
|
325
|
+
|
|
326
|
+
**Parameters:**
|
|
327
|
+
- `owner` (string, required): Repository owner
|
|
328
|
+
- `repo` (string, required): Repository name
|
|
329
|
+
- `base` (string, required): Base branch name
|
|
330
|
+
- `head` (string, required): Head branch name to compare
|
|
331
|
+
|
|
332
|
+
**Returns:**
|
|
333
|
+
- Comparison status (ahead/behind)
|
|
334
|
+
- Commit difference count
|
|
335
|
+
- Changed files list (additions/deletions/changes)
|
|
336
|
+
- Commit list
|
|
337
|
+
|
|
338
|
+
## 💡 Usage Examples
|
|
339
|
+
|
|
340
|
+
### Using with Claude Desktop
|
|
341
|
+
|
|
342
|
+
Once configured, you can use it in Claude Desktop like this:
|
|
343
|
+
|
|
344
|
+
```
|
|
345
|
+
"Check issue #5 in the gay00ung/issue-scribe-mcp repository"
|
|
346
|
+
|
|
347
|
+
"Create a new issue in issue-scribe-mcp.
|
|
348
|
+
Title is 'Improve README' and body is 'Need to add Features section'"
|
|
349
|
+
|
|
350
|
+
"Show me the commit history of PR #3"
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
Claude will automatically call the appropriate MCP tools to fetch the information!
|
|
354
|
+
|
|
355
|
+
## 🔧 Troubleshooting
|
|
356
|
+
|
|
357
|
+
### "GITHUB_TOKEN is not set" Error
|
|
358
|
+
|
|
359
|
+
**Cause**: GitHub Personal Access Token is not set as an environment variable.
|
|
360
|
+
|
|
361
|
+
**Solution**:
|
|
362
|
+
1. Check if `.env` file exists in project root
|
|
363
|
+
2. Verify `.env` file is formatted as `GITHUB_TOKEN=your_token`
|
|
364
|
+
3. Confirm token is valid in [GitHub Settings](https://github.com/settings/tokens)
|
|
365
|
+
|
|
366
|
+
### "Bad credentials" Error
|
|
367
|
+
|
|
368
|
+
**Cause**: GitHub Token is expired or invalid.
|
|
369
|
+
|
|
370
|
+
**Solution**:
|
|
371
|
+
1. Generate a new Personal Access Token from GitHub
|
|
372
|
+
2. Update the token in `.env` file
|
|
373
|
+
3. Verify required permissions (`repo` scope) are granted
|
|
374
|
+
|
|
375
|
+
### MCP Server Not Recognized in Claude Desktop
|
|
376
|
+
|
|
377
|
+
**Cause**: Configuration file path is incorrect or JSON format error.
|
|
378
|
+
|
|
379
|
+
**Solution**:
|
|
380
|
+
1. Verify `claude_desktop_config.json` file location
|
|
381
|
+
2. Validate JSON format using [JSONLint](https://jsonlint.com/)
|
|
382
|
+
3. Ensure file paths are absolute and correct
|
|
383
|
+
4. Restart Claude Desktop
|
|
384
|
+
|
|
385
|
+
### "Cannot find module" Error
|
|
386
|
+
|
|
387
|
+
**Cause**: Dependencies are not installed or build has not been run.
|
|
388
|
+
|
|
389
|
+
**Solution**:
|
|
390
|
+
```bash
|
|
391
|
+
npm install
|
|
392
|
+
npm run build
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
## 📝 License
|
|
396
|
+
|
|
397
|
+
MIT License
|
|
398
|
+
|
|
399
|
+
## 🤝 Contributing
|
|
400
|
+
|
|
401
|
+
Issue reports and Pull Requests are welcome!
|
|
402
|
+
|
|
403
|
+
1. Fork the Project
|
|
404
|
+
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
|
|
405
|
+
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
|
|
406
|
+
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
|
407
|
+
5. Open a Pull Request
|
|
408
|
+
|
|
409
|
+
## 📮 Contact
|
|
410
|
+
|
|
411
|
+
Project Link: [https://github.com/gay00ung/issue-scribe-mcp](https://github.com/gay00ung/issue-scribe-mcp)
|