ima-claude 2.9.0 → 2.13.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/README.md +20 -15
- package/dist/cli.js +385 -17
- package/package.json +1 -1
- package/platforms/gemini/adapter.ts +443 -0
- package/platforms/gemini/gemini-extension.json +17 -0
- package/platforms/gemini/hooks-translator.py +66 -0
- package/platforms/shared/detector.ts +5 -1
- package/plugins/ima-claude/.claude-plugin/plugin.json +2 -2
- package/plugins/ima-claude/skills/gh-cli/SKILL.md +286 -0
- package/plugins/ima-claude/skills/ima-doc2pdf/SKILL.md +242 -0
- package/plugins/ima-claude/skills/ima-doc2pdf/references/formatting-spec.md +88 -0
- package/plugins/ima-claude/skills/ima-doc2pdf/scripts/docx_utils.py +21 -0
- package/plugins/ima-claude/skills/ima-doc2pdf/scripts/extract_docx.py +384 -0
- package/plugins/ima-claude/skills/ima-doc2pdf/scripts/generate_pdf.py +663 -0
- package/plugins/ima-claude/skills/mcp-gitea/SKILL.md +358 -0
- package/plugins/ima-claude/skills/mcp-github/SKILL.md +200 -0
- package/plugins/ima-claude/skills/mcp-qdrant/SKILL.md +21 -10
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mcp-gitea
|
|
3
|
+
description: >-
|
|
4
|
+
Gitea MCP for internal Git repository management — pull requests, issues, releases,
|
|
5
|
+
branches, tags, wikis, and CI/CD actions. Use when: creating/reviewing PRs, managing
|
|
6
|
+
issues, creating releases/tags, browsing repo contents, managing branches, wiki
|
|
7
|
+
operations, or any Gitea-hosted repository operation. Triggers on: Gitea, internal
|
|
8
|
+
repo, pull request, PR review, merge request, release, tag, branch, issue, milestone,
|
|
9
|
+
wiki, actions, CI/CD, timetracking. NOT for GitHub repos — use mcp-github for those.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Gitea MCP - Internal Git Repository Management
|
|
13
|
+
|
|
14
|
+
The team's internal Git platform. All tools prefixed `mcp__gitea__`.
|
|
15
|
+
|
|
16
|
+
Gitea is the **primary** tool for daily development work (PRs, issues, releases).
|
|
17
|
+
GitHub is FOSS publishing only — use `mcp-github` for GitHub operations.
|
|
18
|
+
The `gh` CLI is GitHub-only; it does not work with Gitea.
|
|
19
|
+
|
|
20
|
+
**Method-dispatch pattern:** Several tools (`pull_request_read`, `pull_request_write`, `pull_request_review_write`, `issue_read`, `issue_write`) use a required `method` parameter to select the operation. Always include `method` — omitting it causes a missing parameter error.
|
|
21
|
+
|
|
22
|
+
## Tool Catalog
|
|
23
|
+
|
|
24
|
+
### Identity & Discovery
|
|
25
|
+
|
|
26
|
+
| Tool | Purpose | Key Params |
|
|
27
|
+
|------|---------|------------|
|
|
28
|
+
| `get_me` | Current authenticated user | *(none)* |
|
|
29
|
+
| `get_user_orgs` | User's organizations | *(none)* |
|
|
30
|
+
| `search_users` | Search users by name/email | `query` |
|
|
31
|
+
| `search_repos` | Search repositories across Gitea | `query`, `owner` |
|
|
32
|
+
| `search_org_teams` | Find teams within an org | `org`, `query` |
|
|
33
|
+
| `list_my_repos` | List authenticated user's repos | `page`, `perPage` |
|
|
34
|
+
| `get_gitea_mcp_server_version` | Server version info | *(none)* |
|
|
35
|
+
|
|
36
|
+
### Repository Operations
|
|
37
|
+
|
|
38
|
+
| Tool | Purpose | Key Params |
|
|
39
|
+
|------|---------|------------|
|
|
40
|
+
| `create_repo` | Create a new repository | `owner`, `name`, `description`, `private` |
|
|
41
|
+
| `fork_repo` | Fork an existing repository | `owner`, `repo`, `organization` |
|
|
42
|
+
| `get_file_contents` | Get file contents at a path | `owner`, `repo`, `filepath`, `ref` |
|
|
43
|
+
| `get_dir_contents` | List directory contents | `owner`, `repo`, `filepath`, `ref` |
|
|
44
|
+
| `create_or_update_file` | Create or update a file | `owner`, `repo`, `filepath`, `content`, `message`, `sha` (required for updates) |
|
|
45
|
+
| `delete_file` | Delete a file | `owner`, `repo`, `filepath`, `message`, `sha` |
|
|
46
|
+
|
|
47
|
+
### Branches
|
|
48
|
+
|
|
49
|
+
| Tool | Purpose | Key Params |
|
|
50
|
+
|------|---------|------------|
|
|
51
|
+
| `list_branches` | List all branches | `owner`, `repo`, `page`, `perPage` |
|
|
52
|
+
| `create_branch` | Create a new branch | `owner`, `repo`, `new_branch_name`, `old_branch_name` |
|
|
53
|
+
| `delete_branch` | Delete a branch | `owner`, `repo`, `branch` |
|
|
54
|
+
|
|
55
|
+
### Pull Requests
|
|
56
|
+
|
|
57
|
+
| Tool | Purpose | Key Params |
|
|
58
|
+
|------|---------|------------|
|
|
59
|
+
| `list_pull_requests` | List PRs with filtering | `owner`, `repo`, `state` (open/closed/all), `sort`, `milestone`, `page`, `perPage` |
|
|
60
|
+
| `pull_request_read` | Read PR data and reviews | `method` (get/get_diff/get_reviews/get_review/get_review_comments), `owner`, `repo`, `index`; `review_id` for get_review/get_review_comments |
|
|
61
|
+
| `pull_request_write` | Create, update, merge PR; manage reviewers | `method` (create/update/merge/add_reviewers/remove_reviewers), `owner`, `repo`; `index` required except for create |
|
|
62
|
+
| `pull_request_review_write` | Submit, delete, or dismiss a PR review | `method` (create/submit/delete/dismiss), `owner`, `repo`, `index`; `review_id` required for submit/delete/dismiss |
|
|
63
|
+
|
|
64
|
+
**`pull_request_write` method details:**
|
|
65
|
+
- `create`: `title` (req), `head` (req), `base` (req), `body`
|
|
66
|
+
- `update`: `index` (req), `title`, `body`, `state`, `assignee`, `assignees`, `milestone`, `base`, `allow_maintainer_edit`
|
|
67
|
+
- `merge`: `index` (req), `merge_style` (merge/rebase/rebase-merge/squash/fast-forward-only), `message`, `delete_branch`, `title`
|
|
68
|
+
- `add_reviewers` / `remove_reviewers`: `index` (req), `reviewers` (string[]), `team_reviewers` (string[])
|
|
69
|
+
|
|
70
|
+
**`pull_request_review_write` method details:**
|
|
71
|
+
- `create`: `body`, `commit_id`, `comments` (inline array with `path`, `body`, `old_line_num`, `new_line_num`), `state`
|
|
72
|
+
- `submit`: `review_id` (req), `body`, `state` (APPROVED/REQUEST_CHANGES/COMMENT/PENDING)
|
|
73
|
+
- `delete`: `review_id` (req)
|
|
74
|
+
- `dismiss`: `review_id` (req), `message`
|
|
75
|
+
|
|
76
|
+
### Issues
|
|
77
|
+
|
|
78
|
+
| Tool | Purpose | Key Params |
|
|
79
|
+
|------|---------|------------|
|
|
80
|
+
| `list_issues` | List issues with filtering | `owner`, `repo`, `state` (default "all"), `page`, `perPage` |
|
|
81
|
+
| `issue_read` | Get issue details, comments, or labels | `method` (get/get_comments/get_labels), `owner`, `repo`, `index` |
|
|
82
|
+
| `issue_write` | Create, update, comment, or manage labels | `method` (create/update/add_comment/edit_comment/add_labels/remove_label/replace_labels/clear_labels), `owner`, `repo`; `index` required except for create |
|
|
83
|
+
|
|
84
|
+
**`issue_write` method details:**
|
|
85
|
+
- `create`: `title` (req), `body`, `assignees`, `labels` (number[]), `milestone`
|
|
86
|
+
- `update`: `index` (req), `title`, `body`, `state`, `assignees`, `milestone`
|
|
87
|
+
- `add_comment`: `index` (req), `body` (req)
|
|
88
|
+
- `edit_comment`: `index` (req), `commentID` (req), `body` (req)
|
|
89
|
+
- `add_labels` / `replace_labels`: `index` (req), `labels` (number[])
|
|
90
|
+
- `remove_label`: `index` (req), `label_id` (number)
|
|
91
|
+
- `clear_labels`: `index` (req)
|
|
92
|
+
|
|
93
|
+
### Labels
|
|
94
|
+
|
|
95
|
+
| Tool | Purpose | Key Params |
|
|
96
|
+
|------|---------|------------|
|
|
97
|
+
| `label_read` | Get label details | `owner`, `repo`, `id` |
|
|
98
|
+
| `label_write` | Create or update a label | `owner`, `repo`, `name`, `color` |
|
|
99
|
+
|
|
100
|
+
### Milestones
|
|
101
|
+
|
|
102
|
+
| Tool | Purpose | Key Params |
|
|
103
|
+
|------|---------|------------|
|
|
104
|
+
| `milestone_read` | Get milestone details | `owner`, `repo`, `id` |
|
|
105
|
+
| `milestone_write` | Create or update a milestone | `owner`, `repo`, `title`, `due_on`, `description` |
|
|
106
|
+
|
|
107
|
+
### Releases & Tags
|
|
108
|
+
|
|
109
|
+
| Tool | Purpose | Key Params |
|
|
110
|
+
|------|---------|------------|
|
|
111
|
+
| `list_releases` | List all releases | `owner`, `repo`, `page`, `perPage` |
|
|
112
|
+
| `get_release` | Get release by ID | `owner`, `repo`, `id` |
|
|
113
|
+
| `get_latest_release` | Get the latest published release | `owner`, `repo` |
|
|
114
|
+
| `create_release` | Create a new release | `owner`, `repo`, `tag_name`, `name`, `body`, `draft`, `prerelease` |
|
|
115
|
+
| `delete_release` | Delete a release | `owner`, `repo`, `id` |
|
|
116
|
+
| `list_tags` | List all tags | `owner`, `repo`, `page`, `perPage` |
|
|
117
|
+
| `get_tag` | Get tag by name | `owner`, `repo`, `tag` |
|
|
118
|
+
| `create_tag` | Create a new tag | `owner`, `repo`, `tag_name`, `message`, `target` |
|
|
119
|
+
| `delete_tag` | Delete a tag | `owner`, `repo`, `tag` |
|
|
120
|
+
|
|
121
|
+
### Commits
|
|
122
|
+
|
|
123
|
+
| Tool | Purpose | Key Params |
|
|
124
|
+
|------|---------|------------|
|
|
125
|
+
| `list_commits` | List commits on a branch | `owner`, `repo`, `sha`, `path`, `page`, `perPage` |
|
|
126
|
+
|
|
127
|
+
### Wiki
|
|
128
|
+
|
|
129
|
+
| Tool | Purpose | Key Params |
|
|
130
|
+
|------|---------|------------|
|
|
131
|
+
| `wiki_read` | Read a wiki page | `owner`, `repo`, `pageName` |
|
|
132
|
+
| `wiki_write` | Create or update a wiki page | `owner`, `repo`, `pageName`, `content`, `message` |
|
|
133
|
+
|
|
134
|
+
### CI/CD Actions
|
|
135
|
+
|
|
136
|
+
| Tool | Purpose | Key Params |
|
|
137
|
+
|------|---------|------------|
|
|
138
|
+
| `actions_config_read` | Read workflow/actions config | `owner`, `repo` |
|
|
139
|
+
| `actions_config_write` | Write workflow/actions config | `owner`, `repo`, `config` |
|
|
140
|
+
| `actions_run_read` | Read action run details/logs | `owner`, `repo`, `run_id` |
|
|
141
|
+
| `actions_run_write` | Trigger or manage action runs | `owner`, `repo`, `workflow_id`, `ref` |
|
|
142
|
+
|
|
143
|
+
### Time Tracking
|
|
144
|
+
|
|
145
|
+
| Tool | Purpose | Key Params |
|
|
146
|
+
|------|---------|------------|
|
|
147
|
+
| `timetracking_read` | Read time entries on an issue | `owner`, `repo`, `index` |
|
|
148
|
+
| `timetracking_write` | Log time on an issue | `owner`, `repo`, `index`, `time` (seconds) |
|
|
149
|
+
|
|
150
|
+
## Common Workflows
|
|
151
|
+
|
|
152
|
+
### Create a Pull Request
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
1. Ensure your feature branch is pushed:
|
|
156
|
+
git push origin feature/my-branch
|
|
157
|
+
|
|
158
|
+
2. pull_request_write(
|
|
159
|
+
method: "create",
|
|
160
|
+
owner: "FLCCC",
|
|
161
|
+
repo: "my-repo",
|
|
162
|
+
title: "feat: add new feature",
|
|
163
|
+
body: "## Summary\n- What changed\n- Why it changed\n\n## Test plan\n- [ ] Tested locally",
|
|
164
|
+
head: "feature/my-branch",
|
|
165
|
+
base: "main"
|
|
166
|
+
)
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Review a Pull Request
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
1. pull_request_read(method: "get", owner: "FLCCC", repo: "my-repo", index: 42)
|
|
173
|
+
→ Review title, description, and diff summary
|
|
174
|
+
|
|
175
|
+
2. pull_request_read(method: "get_reviews", owner: "FLCCC", repo: "my-repo", index: 42)
|
|
176
|
+
→ Check existing reviews
|
|
177
|
+
|
|
178
|
+
3. pull_request_review_write(
|
|
179
|
+
method: "create",
|
|
180
|
+
owner: "FLCCC",
|
|
181
|
+
repo: "my-repo",
|
|
182
|
+
index: 42,
|
|
183
|
+
state: "APPROVED",
|
|
184
|
+
body: "LGTM — clean implementation, tests look solid"
|
|
185
|
+
)
|
|
186
|
+
→ Then submit it:
|
|
187
|
+
pull_request_review_write(
|
|
188
|
+
method: "submit",
|
|
189
|
+
owner: "FLCCC",
|
|
190
|
+
repo: "my-repo",
|
|
191
|
+
index: 42,
|
|
192
|
+
review_id: <id from create response>,
|
|
193
|
+
state: "APPROVED"
|
|
194
|
+
)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Merge a Pull Request
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
pull_request_write(
|
|
201
|
+
method: "merge",
|
|
202
|
+
owner: "FLCCC",
|
|
203
|
+
repo: "my-repo",
|
|
204
|
+
index: 42,
|
|
205
|
+
merge_style: "squash",
|
|
206
|
+
delete_branch: true
|
|
207
|
+
)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Create a Release
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
1. get_latest_release(owner: "FLCCC", repo: "my-repo")
|
|
214
|
+
→ Note current version for bump reference
|
|
215
|
+
|
|
216
|
+
2. create_tag(
|
|
217
|
+
owner: "FLCCC",
|
|
218
|
+
repo: "my-repo",
|
|
219
|
+
tag_name: "v2.1.0",
|
|
220
|
+
message: "Release v2.1.0",
|
|
221
|
+
target: "main"
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
3. create_release(
|
|
225
|
+
owner: "FLCCC",
|
|
226
|
+
repo: "my-repo",
|
|
227
|
+
tag_name: "v2.1.0",
|
|
228
|
+
name: "v2.1.0 — Feature Name",
|
|
229
|
+
body: "## Changes\n- ...\n\n## Breaking Changes\n- none",
|
|
230
|
+
draft: false,
|
|
231
|
+
prerelease: false
|
|
232
|
+
)
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Manage Issues
|
|
236
|
+
|
|
237
|
+
```
|
|
238
|
+
# Create an issue
|
|
239
|
+
issue_write(
|
|
240
|
+
method: "create",
|
|
241
|
+
owner: "FLCCC",
|
|
242
|
+
repo: "my-repo",
|
|
243
|
+
title: "Bug: description of problem",
|
|
244
|
+
body: "## Steps to reproduce\n1. ...\n\n## Expected\n...\n\n## Actual\n..."
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
# Update an existing issue
|
|
248
|
+
issue_write(
|
|
249
|
+
method: "update",
|
|
250
|
+
owner: "FLCCC",
|
|
251
|
+
repo: "my-repo",
|
|
252
|
+
index: 15,
|
|
253
|
+
body: "<updated body>"
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
# Add a comment
|
|
257
|
+
issue_write(
|
|
258
|
+
method: "add_comment",
|
|
259
|
+
owner: "FLCCC",
|
|
260
|
+
repo: "my-repo",
|
|
261
|
+
index: 15,
|
|
262
|
+
body: "Confirmed — reproduced on v2.9.1."
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
# Filter open issues
|
|
266
|
+
list_issues(
|
|
267
|
+
owner: "FLCCC",
|
|
268
|
+
repo: "my-repo",
|
|
269
|
+
state: "open",
|
|
270
|
+
perPage: 20
|
|
271
|
+
)
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Browse Repo Contents
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
# List files in a directory
|
|
278
|
+
get_dir_contents(owner: "FLCCC", repo: "my-repo", filepath: "src/", ref: "main")
|
|
279
|
+
|
|
280
|
+
# Read a specific file
|
|
281
|
+
get_file_contents(owner: "FLCCC", repo: "my-repo", filepath: "package.json", ref: "main")
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## Decision Logic
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
Is this a Gitea-hosted repo?
|
|
288
|
+
(check: git remote -v shows gitea.* or internal hostname)
|
|
289
|
+
→ Yes: Use mcp__gitea__* tools ← PRIMARY for daily work
|
|
290
|
+
|
|
291
|
+
→ No: Is it GitHub-hosted? (github.com in remote URL)
|
|
292
|
+
→ Yes: Use mcp__github__* tools (see mcp-github skill)
|
|
293
|
+
or gh CLI for GitHub-specific operations
|
|
294
|
+
|
|
295
|
+
For local-only git operations (commit, diff, log, stash, rebase):
|
|
296
|
+
→ Always use git CLI directly — no MCP needed for local ops
|
|
297
|
+
|
|
298
|
+
Operation decision tree:
|
|
299
|
+
Creating a PR → pull_request_write(method: "create")
|
|
300
|
+
Reading PR details/diff → pull_request_read(method: "get" | "get_diff")
|
|
301
|
+
Reviewing a PR → pull_request_review_write(method: "create" then "submit")
|
|
302
|
+
Merging a PR → pull_request_write(method: "merge")
|
|
303
|
+
Issue triage/tracking → issue_write(method: "create" | "update") / list_issues
|
|
304
|
+
Adding a comment → issue_write(method: "add_comment")
|
|
305
|
+
Cutting a release → create_tag → create_release
|
|
306
|
+
Browsing file contents → get_file_contents / get_dir_contents
|
|
307
|
+
Editing a file via MCP → create_or_update_file (need sha for updates)
|
|
308
|
+
Branch management → create_branch / delete_branch
|
|
309
|
+
CI/CD pipeline status → actions_run_read
|
|
310
|
+
Team documentation → wiki_write / wiki_read
|
|
311
|
+
Time logging → timetracking_write
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
## Token-Saving Strategies
|
|
315
|
+
|
|
316
|
+
### 1. Paginate Large Lists
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
list_issues(owner: "FLCCC", repo: "my-repo", perPage: 15, page: 1)
|
|
320
|
+
# Default can return 30+ items. Set perPage to what you actually need.
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### 2. Filter by State
|
|
324
|
+
|
|
325
|
+
```
|
|
326
|
+
list_pull_requests(owner: "FLCCC", repo: "my-repo", state: "open") # "open" | "closed" | "all"
|
|
327
|
+
list_issues(owner: "FLCCC", repo: "my-repo", state: "open") # Skip closed unless historical review
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### 3. Target Specific Refs
|
|
331
|
+
|
|
332
|
+
```
|
|
333
|
+
get_file_contents(ref: "main") # Avoid default branch ambiguity
|
|
334
|
+
list_commits(sha: "feature-branch", perPage: 10, page: 1) # Last 10 commits only
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### 4. Avoid Redundant Discovery
|
|
338
|
+
|
|
339
|
+
Cache within a session (these don't change):
|
|
340
|
+
- Owner/org names from `get_me` or `get_user_orgs`
|
|
341
|
+
- Repo names once confirmed via `search_repos`
|
|
342
|
+
- Label IDs once fetched via `label_read`
|
|
343
|
+
- Milestone IDs once fetched via `milestone_read`
|
|
344
|
+
|
|
345
|
+
### 5. Read Before Write (Files)
|
|
346
|
+
|
|
347
|
+
`create_or_update_file` requires the current file `sha` for updates. Always call
|
|
348
|
+
`get_file_contents` first to extract the `sha` — skipping this causes a 409 conflict error.
|
|
349
|
+
|
|
350
|
+
## When NOT to Use Gitea MCP
|
|
351
|
+
|
|
352
|
+
| Situation | Use Instead |
|
|
353
|
+
|-----------|-------------|
|
|
354
|
+
| GitHub-hosted repo (github.com) | `mcp__github__*` tools or `gh` CLI |
|
|
355
|
+
| Local git operations (commit, diff, stash, rebase, cherry-pick) | `git` CLI directly |
|
|
356
|
+
| Pushing/pulling code | `git push` / `git pull` (git CLI) |
|
|
357
|
+
| GitHub Actions (github.com CI) | `gh` CLI |
|
|
358
|
+
| Cloning a repo | `git clone` (git CLI) |
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mcp-github
|
|
3
|
+
description: >-
|
|
4
|
+
GitHub MCP for FOSS and public repository management — pull requests, issues, code
|
|
5
|
+
review, repository search, and GitHub API operations. Use when: working with GitHub-hosted
|
|
6
|
+
repos, creating PRs for open source, managing GitHub issues, searching public repos, or
|
|
7
|
+
any github.com operation. Triggers on: GitHub, github.com, open source, FOSS, public repo,
|
|
8
|
+
gh pr, gh issue, upstream PR. NOT for internal repos — use mcp-gitea for Gitea-hosted repos.
|
|
9
|
+
Falls back to gh CLI when MCP tools unavailable.
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# GitHub MCP - FOSS & Public Repository Management
|
|
13
|
+
|
|
14
|
+
Use GitHub MCP tools for GitHub-hosted repositories. Falls back to the `gh` CLI when MCP tools aren't available.
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
Requires `GITHUB_PERSONAL_ACCESS_TOKEN` in your environment:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_yourtoken
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The GitHub MCP server is HTTP-based at `api.githubcopilot.com`. Tools are prefixed `mcp__github__*` and are **dynamically served** — exact tool names may vary. If a tool call fails with "tool not found", fall back to the `gh` CLI table below.
|
|
25
|
+
|
|
26
|
+
## Tool Catalog
|
|
27
|
+
|
|
28
|
+
GitHub MCP tools map to GitHub REST API operations. Expected tools by category:
|
|
29
|
+
|
|
30
|
+
**Repository**
|
|
31
|
+
|
|
32
|
+
| Tool (expected) | Purpose |
|
|
33
|
+
|-----------------|---------|
|
|
34
|
+
| `mcp__github__search_repositories` | Find public repos by query |
|
|
35
|
+
| `mcp__github__get_repository` | Get repo metadata (stars, forks, topics) |
|
|
36
|
+
| `mcp__github__list_repository_contents` | List files/dirs in a repo |
|
|
37
|
+
| `mcp__github__get_file_contents` | Read a file from any branch/commit |
|
|
38
|
+
| `mcp__github__create_repository` | Create a new GitHub repo |
|
|
39
|
+
| `mcp__github__fork_repository` | Fork a repo to your account |
|
|
40
|
+
|
|
41
|
+
**Pull Requests**
|
|
42
|
+
|
|
43
|
+
| Tool (expected) | Purpose |
|
|
44
|
+
|-----------------|---------|
|
|
45
|
+
| `mcp__github__list_pull_requests` | List PRs with filters (state, label, author) |
|
|
46
|
+
| `mcp__github__get_pull_request` | Get PR details including diff metadata |
|
|
47
|
+
| `mcp__github__create_pull_request` | Open a new PR |
|
|
48
|
+
| `mcp__github__update_pull_request` | Edit title, body, labels, assignees |
|
|
49
|
+
| `mcp__github__merge_pull_request` | Merge a PR (merge, squash, or rebase) |
|
|
50
|
+
| `mcp__github__list_pull_request_reviews` | Get review status |
|
|
51
|
+
| `mcp__github__create_pull_request_review` | Submit a review (approve, request changes, comment) |
|
|
52
|
+
| `mcp__github__list_pull_request_comments` | List inline code comments |
|
|
53
|
+
|
|
54
|
+
**Issues**
|
|
55
|
+
|
|
56
|
+
| Tool (expected) | Purpose |
|
|
57
|
+
|-----------------|---------|
|
|
58
|
+
| `mcp__github__list_issues` | List issues with filters |
|
|
59
|
+
| `mcp__github__get_issue` | Get issue details and comments |
|
|
60
|
+
| `mcp__github__create_issue` | Open a new issue |
|
|
61
|
+
| `mcp__github__update_issue` | Edit title, body, state, assignees, labels |
|
|
62
|
+
| `mcp__github__list_issue_comments` | Get all comments on an issue |
|
|
63
|
+
| `mcp__github__add_issue_comment` | Post a comment on an issue |
|
|
64
|
+
|
|
65
|
+
**Code & Files**
|
|
66
|
+
|
|
67
|
+
| Tool (expected) | Purpose |
|
|
68
|
+
|-----------------|---------|
|
|
69
|
+
| `mcp__github__search_code` | Search code across GitHub repos |
|
|
70
|
+
| `mcp__github__create_or_update_file` | Commit a file change via API |
|
|
71
|
+
|
|
72
|
+
**Users & Orgs**
|
|
73
|
+
|
|
74
|
+
| Tool (expected) | Purpose |
|
|
75
|
+
|-----------------|---------|
|
|
76
|
+
| `mcp__github__get_user` | Get GitHub user profile |
|
|
77
|
+
| `mcp__github__search_users` | Find GitHub users |
|
|
78
|
+
|
|
79
|
+
## `gh` CLI Fallback
|
|
80
|
+
|
|
81
|
+
When MCP tools aren't available or sufficient, use the `gh` CLI:
|
|
82
|
+
|
|
83
|
+
| Operation | `gh` Command |
|
|
84
|
+
|-----------|-------------|
|
|
85
|
+
| Create PR | `gh pr create --title "..." --body "..."` |
|
|
86
|
+
| List PRs | `gh pr list` |
|
|
87
|
+
| View PR | `gh pr view 123` |
|
|
88
|
+
| Merge PR | `gh pr merge 123 --squash` |
|
|
89
|
+
| Create issue | `gh issue create --title "..." --body "..."` |
|
|
90
|
+
| List issues | `gh issue list` |
|
|
91
|
+
| Close issue | `gh issue close 123` |
|
|
92
|
+
| View repo | `gh repo view owner/name` |
|
|
93
|
+
| Fork repo | `gh repo fork owner/name` |
|
|
94
|
+
| Clone fork | `gh repo clone owner/name` |
|
|
95
|
+
| Search repos | `gh search repos "query"` |
|
|
96
|
+
| Search code | `gh search code "query" --repo owner/name` |
|
|
97
|
+
| View file | `gh api repos/owner/name/contents/path` |
|
|
98
|
+
|
|
99
|
+
## Decision Logic
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Check git remote: git remote -v
|
|
103
|
+
|
|
104
|
+
No remote configured?
|
|
105
|
+
→ Local-only repo. Use git CLI directly.
|
|
106
|
+
|
|
107
|
+
Does the remote point to github.com?
|
|
108
|
+
→ Yes: Use mcp__github__* tools
|
|
109
|
+
→ MCP tools not available or responding?
|
|
110
|
+
→ Use gh CLI as fallback
|
|
111
|
+
→ No: Does it point to gitea.* / internal hostname?
|
|
112
|
+
→ Yes: Use mcp__gitea__* tools (see mcp-gitea skill)
|
|
113
|
+
→ Unknown: Check with the user
|
|
114
|
+
|
|
115
|
+
For local-only git operations (commit, diff, log, stash, branch):
|
|
116
|
+
→ Always use git CLI directly — no MCP needed
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Common Workflows
|
|
120
|
+
|
|
121
|
+
### Create a PR for a FOSS Project
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
1. Confirm the remote is github.com:
|
|
125
|
+
git remote -v
|
|
126
|
+
|
|
127
|
+
2. Create the PR:
|
|
128
|
+
mcp__github__create_pull_request
|
|
129
|
+
owner: "FLCCC"
|
|
130
|
+
repo: "ima-claude"
|
|
131
|
+
title: "feat: add mcp-github skill"
|
|
132
|
+
body: "## Summary\n..."
|
|
133
|
+
head: "feat/mcp-github-skill"
|
|
134
|
+
base: "main"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Manage Issues
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
# Open a bug report
|
|
141
|
+
mcp__github__create_issue
|
|
142
|
+
owner: "FLCCC"
|
|
143
|
+
repo: "ima-claude"
|
|
144
|
+
title: "Bug: skill not loading"
|
|
145
|
+
body: "Steps to reproduce..."
|
|
146
|
+
labels: ["bug"]
|
|
147
|
+
|
|
148
|
+
# Close with a comment
|
|
149
|
+
mcp__github__add_issue_comment
|
|
150
|
+
owner: "FLCCC"
|
|
151
|
+
repo: "ima-claude"
|
|
152
|
+
issue_number: 42
|
|
153
|
+
body: "Fixed in v2.11.0"
|
|
154
|
+
|
|
155
|
+
mcp__github__update_issue
|
|
156
|
+
owner: "FLCCC"
|
|
157
|
+
repo: "ima-claude"
|
|
158
|
+
issue_number: 42
|
|
159
|
+
state: "closed"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Search Public Repos
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
mcp__github__search_repositories
|
|
166
|
+
query: "claude code skills mcp"
|
|
167
|
+
sort: "stars"
|
|
168
|
+
|
|
169
|
+
# Or via gh CLI:
|
|
170
|
+
gh search repos "claude mcp skills" --sort stars --limit 10
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Review a PR
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
mcp__github__get_pull_request
|
|
177
|
+
owner: "FLCCC"
|
|
178
|
+
repo: "ima-claude"
|
|
179
|
+
pull_number: 15
|
|
180
|
+
|
|
181
|
+
mcp__github__create_pull_request_review
|
|
182
|
+
owner: "FLCCC"
|
|
183
|
+
repo: "ima-claude"
|
|
184
|
+
pull_number: 15
|
|
185
|
+
event: "APPROVE"
|
|
186
|
+
body: "LGTM"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## When NOT to Use
|
|
190
|
+
|
|
191
|
+
- Internal Gitea repos — use `mcp-gitea` skill instead
|
|
192
|
+
- Local git operations (commit, diff, stash) — use `git` CLI directly
|
|
193
|
+
- Reading local files — use the Read tool, not the GitHub API
|
|
194
|
+
- GitHub Actions configuration — edit files locally and push
|
|
195
|
+
|
|
196
|
+
## Notes
|
|
197
|
+
|
|
198
|
+
- GitHub MCP tools are **dynamically served** — exact names may differ. If a tool call fails with "tool not found", fall back to `gh` CLI.
|
|
199
|
+
- The `gh` CLI is reliable and covers the majority of GitHub operations. MCP adds value for structured responses (search, bulk operations, code review workflows).
|
|
200
|
+
- Always confirm the target remote (`git remote -v`) before deciding which tool to use.
|
|
@@ -19,14 +19,18 @@ Our permanent reference library. Unlike Vestige (neural memory that fades if unu
|
|
|
19
19
|
|
|
20
20
|
## Embedding Stack
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
|
25
|
-
|
|
26
|
-
|
|
|
27
|
-
|
|
|
28
|
-
| Vector
|
|
29
|
-
|
|
|
22
|
+
Two embedding providers are supported. Ollama is the default; fastembed is a CPU-only alternative for machines where Ollama has performance issues.
|
|
23
|
+
|
|
24
|
+
| Component | Ollama (default) | fastembed |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| MCP server | `qdrant-mcp` (custom, at `~/dev/qdrant-mcp-server`) | same |
|
|
27
|
+
| Embedding model | `nomic-embed-text` | `BAAI/bge-small-en-v1.5` |
|
|
28
|
+
| Vector dimensions | 768 | 384 |
|
|
29
|
+
| Distance metric | Cosine | Cosine |
|
|
30
|
+
| Dependency | Ollama running locally | `pip install qdrant-mcp[fastembed]` |
|
|
31
|
+
| Default collection | `ima-knowledge` | `ima-knowledge` |
|
|
32
|
+
|
|
33
|
+
**Warning**: Collections can't be shared across providers (different vector dimensions). Switching providers requires a collection rebuild.
|
|
30
34
|
|
|
31
35
|
## Per-Project Collection
|
|
32
36
|
|
|
@@ -176,6 +180,8 @@ IF starting any new work:
|
|
|
176
180
|
| Irrelevant results | Use more specific key terms |
|
|
177
181
|
| Qdrant not responding | `docker ps \| grep qdrant` — restart if needed |
|
|
178
182
|
| Ollama not responding | `ollama list` — ensure it's running with `nomic-embed-text` |
|
|
183
|
+
| fastembed not installed | `pip install qdrant-mcp[fastembed]` |
|
|
184
|
+
| Switched providers, bad results | Different vector dimensions — rebuild the collection |
|
|
179
185
|
| Duplicate content | Search before storing to verify novelty |
|
|
180
186
|
|
|
181
187
|
## When NOT to Use
|
|
@@ -195,9 +201,12 @@ docker run -d --name qdrant \
|
|
|
195
201
|
-v qdrant_storage:/qdrant/storage \
|
|
196
202
|
qdrant/qdrant:latest
|
|
197
203
|
|
|
198
|
-
#
|
|
204
|
+
# 2a. Option A: Ollama (default)
|
|
199
205
|
ollama pull nomic-embed-text
|
|
200
206
|
|
|
207
|
+
# 2b. Option B: fastembed (CPU-only, no Ollama needed)
|
|
208
|
+
# pip install qdrant-mcp[fastembed]
|
|
209
|
+
|
|
201
210
|
# 3. Install custom MCP server
|
|
202
211
|
cd ~/dev/qdrant-mcp-server && pip install -e .
|
|
203
212
|
|
|
@@ -209,17 +218,19 @@ cd ~/dev/qdrant-mcp-server && pip install -e .
|
|
|
209
218
|
# "env": {
|
|
210
219
|
# "QDRANT_URL": "http://localhost:6333",
|
|
211
220
|
# "COLLECTION_NAME": "ima-knowledge",
|
|
221
|
+
# "EMBEDDING_PROVIDER": "ollama",
|
|
212
222
|
# "OLLAMA_URL": "http://localhost:11434",
|
|
213
223
|
# "EMBEDDING_MODEL": "nomic-embed-text"
|
|
214
224
|
# }
|
|
215
225
|
# }
|
|
226
|
+
# For fastembed, set EMBEDDING_PROVIDER=fastembed (OLLAMA_URL not needed)
|
|
216
227
|
|
|
217
228
|
# 5. Verify
|
|
218
229
|
curl http://localhost:6333/health
|
|
219
230
|
```
|
|
220
231
|
|
|
221
232
|
**Persistence**: `-v qdrant_storage:/qdrant/storage` preserves data across restarts.
|
|
222
|
-
**Embeddings**: Ollama with `nomic-embed-text` (768d). All data stays on your machine.
|
|
233
|
+
**Embeddings**: Ollama with `nomic-embed-text` (768d) or fastembed with `bge-small-en-v1.5` (384d). All data stays on your machine.
|
|
223
234
|
|
|
224
235
|
### Per-Project Setup
|
|
225
236
|
|