@rethunk/mcp-multi-root-git 2.3.4 → 2.4.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.
Files changed (41) hide show
  1. package/AGENTS.md +29 -3
  2. package/CHANGELOG.md +43 -0
  3. package/HUMANS.md +54 -5
  4. package/README.md +15 -1
  5. package/dist/server/batch-commit-tool.js +244 -19
  6. package/dist/server/git-diff-tool.js +132 -0
  7. package/dist/server/git-fetch-tool.js +131 -0
  8. package/dist/server/git-push-tool.js +8 -1
  9. package/dist/server/git-show-tool.js +148 -0
  10. package/dist/server/git-stash-tool.js +131 -0
  11. package/dist/server/git-tag-tool.js +162 -0
  12. package/dist/server/git.js +18 -2
  13. package/dist/server/roots.js +8 -4
  14. package/dist/server/test-harness.js +68 -5
  15. package/dist/server/tool-parameter-schemas.js +21 -1
  16. package/dist/server/tools.js +11 -0
  17. package/docs/install.md +19 -2
  18. package/docs/mcp-tools.md +214 -5
  19. package/package.json +7 -5
  20. package/schemas/batch_commit.json +125 -0
  21. package/schemas/git_cherry_pick.json +63 -0
  22. package/schemas/git_diff.json +62 -0
  23. package/schemas/git_diff_summary.json +75 -0
  24. package/schemas/git_fetch.json +52 -0
  25. package/schemas/git_inventory.json +74 -0
  26. package/schemas/git_log.json +75 -0
  27. package/schemas/git_merge.json +79 -0
  28. package/schemas/git_parity.json +74 -0
  29. package/schemas/git_push.json +50 -0
  30. package/schemas/git_reset_soft.json +42 -0
  31. package/schemas/git_show.json +39 -0
  32. package/schemas/git_stash_apply.json +44 -0
  33. package/schemas/git_stash_list.json +30 -0
  34. package/schemas/git_status.json +49 -0
  35. package/schemas/git_tag.json +50 -0
  36. package/schemas/git_worktree_add.json +52 -0
  37. package/schemas/git_worktree_list.json +30 -0
  38. package/schemas/git_worktree_remove.json +48 -0
  39. package/schemas/index.json +108 -0
  40. package/schemas/list_presets.json +44 -0
  41. package/tool-parameters.schema.json +317 -4
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_fetch",
4
+ "description": "Parameter schema for the 'git_fetch' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "format": {
18
+ "default": "markdown",
19
+ "type": "string",
20
+ "enum": [
21
+ "markdown",
22
+ "json"
23
+ ]
24
+ },
25
+ "remote": {
26
+ "default": "origin",
27
+ "description": "Remote to fetch from (default: origin).",
28
+ "type": "string"
29
+ },
30
+ "branch": {
31
+ "description": "If specified: fetch only this branch (e.g. 'main').",
32
+ "type": "string"
33
+ },
34
+ "prune": {
35
+ "default": false,
36
+ "description": "Pass --prune to remove deleted remote branches (default: false).",
37
+ "type": "boolean"
38
+ },
39
+ "tags": {
40
+ "default": false,
41
+ "description": "Pass --tags to also fetch all tags (default: false).",
42
+ "type": "boolean"
43
+ }
44
+ },
45
+ "required": [
46
+ "format",
47
+ "remote",
48
+ "prune",
49
+ "tags"
50
+ ],
51
+ "additionalProperties": false
52
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_inventory",
4
+ "description": "Parameter schema for the 'git_inventory' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "absoluteGitRoots": {
23
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
24
+ "maxItems": 256,
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "format": {
31
+ "default": "markdown",
32
+ "type": "string",
33
+ "enum": [
34
+ "markdown",
35
+ "json"
36
+ ]
37
+ },
38
+ "nestedRoots": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string"
42
+ }
43
+ },
44
+ "preset": {
45
+ "type": "string"
46
+ },
47
+ "presetMerge": {
48
+ "default": false,
49
+ "description": "Merge with preset instead of replacing.",
50
+ "type": "boolean"
51
+ },
52
+ "remote": {
53
+ "description": "Pair with `branch`.",
54
+ "type": "string"
55
+ },
56
+ "branch": {
57
+ "description": "Pair with `remote`.",
58
+ "type": "string"
59
+ },
60
+ "maxRoots": {
61
+ "default": 64,
62
+ "type": "integer",
63
+ "minimum": 1,
64
+ "maximum": 256
65
+ }
66
+ },
67
+ "required": [
68
+ "allWorkspaceRoots",
69
+ "format",
70
+ "presetMerge",
71
+ "maxRoots"
72
+ ],
73
+ "additionalProperties": false
74
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_log",
4
+ "description": "Parameter schema for the 'git_log' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "absoluteGitRoots": {
23
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
24
+ "maxItems": 256,
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "format": {
31
+ "default": "markdown",
32
+ "type": "string",
33
+ "enum": [
34
+ "markdown",
35
+ "json"
36
+ ]
37
+ },
38
+ "since": {
39
+ "description": "Passed to `git log --since=`. Accepts ISO timestamps or git relative forms like `48.hours` or `2.weeks.ago`. Default: `7.days`.",
40
+ "type": "string"
41
+ },
42
+ "paths": {
43
+ "description": "Limit to commits touching these paths (passed as `-- <paths>`).",
44
+ "type": "array",
45
+ "items": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "grep": {
50
+ "description": "Filter commits whose message matches this regex (git `--grep`, case-insensitive).",
51
+ "type": "string"
52
+ },
53
+ "author": {
54
+ "description": "Filter by author name or email (passed as `--author=`).",
55
+ "type": "string"
56
+ },
57
+ "maxCommits": {
58
+ "default": 50,
59
+ "description": "Maximum commits to return per root (hard cap 500). Default 50.",
60
+ "type": "integer",
61
+ "minimum": 1,
62
+ "maximum": 500
63
+ },
64
+ "branch": {
65
+ "description": "Ref/branch to log from. Default: HEAD.",
66
+ "type": "string"
67
+ }
68
+ },
69
+ "required": [
70
+ "allWorkspaceRoots",
71
+ "format",
72
+ "maxCommits"
73
+ ],
74
+ "additionalProperties": false
75
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_merge",
4
+ "description": "Parameter schema for the 'git_merge' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "format": {
23
+ "default": "markdown",
24
+ "type": "string",
25
+ "enum": [
26
+ "markdown",
27
+ "json"
28
+ ]
29
+ },
30
+ "sources": {
31
+ "minItems": 1,
32
+ "maxItems": 20,
33
+ "type": "array",
34
+ "items": {
35
+ "type": "string",
36
+ "minLength": 1
37
+ },
38
+ "description": "Branches to merge into the destination, in order."
39
+ },
40
+ "into": {
41
+ "description": "Destination branch. Defaults to the currently checked-out branch.",
42
+ "type": "string"
43
+ },
44
+ "strategy": {
45
+ "default": "auto",
46
+ "description": "`auto` (default): cascade fast-forward → rebase → merge-commit per source. `ff-only`: only fast-forward, fail if diverged. `rebase`: rebase source onto destination, then fast-forward (no merge-commit fallback). `merge`: always create a merge commit (no fast-forward).",
47
+ "type": "string",
48
+ "enum": [
49
+ "auto",
50
+ "ff-only",
51
+ "rebase",
52
+ "merge"
53
+ ]
54
+ },
55
+ "message": {
56
+ "description": "Merge commit message (used only when a merge commit is created).",
57
+ "type": "string"
58
+ },
59
+ "deleteMergedBranches": {
60
+ "default": false,
61
+ "description": "After all sources merge cleanly, delete each source branch locally (`git branch -d`). Protected names always skipped. Never affects remote branches.",
62
+ "type": "boolean"
63
+ },
64
+ "deleteMergedWorktrees": {
65
+ "default": false,
66
+ "description": "After all sources merge cleanly, remove any local worktree currently checked out on a source branch (`git worktree remove`). Protected tails always skipped.",
67
+ "type": "boolean"
68
+ }
69
+ },
70
+ "required": [
71
+ "allWorkspaceRoots",
72
+ "format",
73
+ "sources",
74
+ "strategy",
75
+ "deleteMergedBranches",
76
+ "deleteMergedWorktrees"
77
+ ],
78
+ "additionalProperties": false
79
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_parity",
4
+ "description": "Parameter schema for the 'git_parity' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "absoluteGitRoots": {
23
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
24
+ "maxItems": 256,
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "format": {
31
+ "default": "markdown",
32
+ "type": "string",
33
+ "enum": [
34
+ "markdown",
35
+ "json"
36
+ ]
37
+ },
38
+ "pairs": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "object",
42
+ "properties": {
43
+ "left": {
44
+ "type": "string"
45
+ },
46
+ "right": {
47
+ "type": "string"
48
+ },
49
+ "label": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "required": [
54
+ "left",
55
+ "right"
56
+ ],
57
+ "additionalProperties": false
58
+ }
59
+ },
60
+ "preset": {
61
+ "type": "string"
62
+ },
63
+ "presetMerge": {
64
+ "default": false,
65
+ "type": "boolean"
66
+ }
67
+ },
68
+ "required": [
69
+ "allWorkspaceRoots",
70
+ "format",
71
+ "presetMerge"
72
+ ],
73
+ "additionalProperties": false
74
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_push",
4
+ "description": "Parameter schema for the 'git_push' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "format": {
23
+ "default": "markdown",
24
+ "type": "string",
25
+ "enum": [
26
+ "markdown",
27
+ "json"
28
+ ]
29
+ },
30
+ "remote": {
31
+ "description": "Remote to push to. Defaults to the remote inferred from the current upstream tracking ref, or `origin` when `setUpstream` is true.",
32
+ "type": "string"
33
+ },
34
+ "branch": {
35
+ "description": "Branch to push. Defaults to the currently checked-out branch. Rejected when HEAD is detached.",
36
+ "type": "string"
37
+ },
38
+ "setUpstream": {
39
+ "default": false,
40
+ "description": "Set the upstream tracking reference (`git push -u`). Use when the branch has not been pushed yet. Remote defaults to `origin`.",
41
+ "type": "boolean"
42
+ }
43
+ },
44
+ "required": [
45
+ "allWorkspaceRoots",
46
+ "format",
47
+ "setUpstream"
48
+ ],
49
+ "additionalProperties": false
50
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_reset_soft",
4
+ "description": "Parameter schema for the 'git_reset_soft' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "format": {
23
+ "default": "markdown",
24
+ "type": "string",
25
+ "enum": [
26
+ "markdown",
27
+ "json"
28
+ ]
29
+ },
30
+ "ref": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "description": "Commit to reset to. Accepts ancestor notation (`HEAD~1`, `HEAD~3`), branch names, or full SHAs."
34
+ }
35
+ },
36
+ "required": [
37
+ "allWorkspaceRoots",
38
+ "format",
39
+ "ref"
40
+ ],
41
+ "additionalProperties": false
42
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_show",
4
+ "description": "Parameter schema for the 'git_show' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "format": {
18
+ "default": "markdown",
19
+ "type": "string",
20
+ "enum": [
21
+ "markdown",
22
+ "json"
23
+ ]
24
+ },
25
+ "ref": {
26
+ "type": "string",
27
+ "description": "Commit reference (SHA, branch, tag, or any git rev-spec)."
28
+ },
29
+ "path": {
30
+ "description": "Optional file path to inspect at the ref. If provided, shows that path's content at the ref instead of the diff.",
31
+ "type": "string"
32
+ }
33
+ },
34
+ "required": [
35
+ "format",
36
+ "ref"
37
+ ],
38
+ "additionalProperties": false
39
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_stash_apply",
4
+ "description": "Parameter schema for the 'git_stash_apply' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "format": {
18
+ "default": "markdown",
19
+ "type": "string",
20
+ "enum": [
21
+ "markdown",
22
+ "json"
23
+ ]
24
+ },
25
+ "index": {
26
+ "default": 0,
27
+ "description": "Stash index (defaults to 0 for stash@{0}).",
28
+ "type": "integer",
29
+ "minimum": 0,
30
+ "maximum": 9007199254740991
31
+ },
32
+ "pop": {
33
+ "default": false,
34
+ "description": "If true, runs `git stash pop` instead of `git stash apply` (removes stash after applying).",
35
+ "type": "boolean"
36
+ }
37
+ },
38
+ "required": [
39
+ "format",
40
+ "index",
41
+ "pop"
42
+ ],
43
+ "additionalProperties": false
44
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_stash_list",
4
+ "description": "Parameter schema for the 'git_stash_list' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "format": {
18
+ "default": "markdown",
19
+ "type": "string",
20
+ "enum": [
21
+ "markdown",
22
+ "json"
23
+ ]
24
+ }
25
+ },
26
+ "required": [
27
+ "format"
28
+ ],
29
+ "additionalProperties": false
30
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_status",
4
+ "description": "Parameter schema for the 'git_status' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "allWorkspaceRoots": {
18
+ "default": false,
19
+ "description": "Fan out across all MCP file roots.",
20
+ "type": "boolean"
21
+ },
22
+ "absoluteGitRoots": {
23
+ "description": "Absolute paths to git repo roots. Use for many sibling clones under a non-git parent directory.",
24
+ "maxItems": 256,
25
+ "type": "array",
26
+ "items": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "format": {
31
+ "default": "markdown",
32
+ "type": "string",
33
+ "enum": [
34
+ "markdown",
35
+ "json"
36
+ ]
37
+ },
38
+ "includeSubmodules": {
39
+ "default": true,
40
+ "type": "boolean"
41
+ }
42
+ },
43
+ "required": [
44
+ "allWorkspaceRoots",
45
+ "format",
46
+ "includeSubmodules"
47
+ ],
48
+ "additionalProperties": false
49
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "@rethunk/mcp-multi-root-git: git_tag",
4
+ "description": "Parameter schema for the 'git_tag' MCP tool.",
5
+ "type": "object",
6
+ "properties": {
7
+ "workspaceRoot": {
8
+ "description": "Highest-priority override.",
9
+ "type": "string"
10
+ },
11
+ "rootIndex": {
12
+ "description": "0-based index into the MCP file roots list; ignored when workspaceRoot is set.",
13
+ "type": "integer",
14
+ "minimum": 0,
15
+ "maximum": 9007199254740991
16
+ },
17
+ "format": {
18
+ "default": "markdown",
19
+ "type": "string",
20
+ "enum": [
21
+ "markdown",
22
+ "json"
23
+ ]
24
+ },
25
+ "tag": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "description": "Tag name (e.g. 'v1.2.3')."
29
+ },
30
+ "message": {
31
+ "description": "If provided, create an annotated tag with this message. If absent, create a lightweight tag.",
32
+ "type": "string"
33
+ },
34
+ "ref": {
35
+ "description": "Commit/ref to tag (default: HEAD). Ignored if `delete` is true.",
36
+ "type": "string"
37
+ },
38
+ "delete": {
39
+ "default": false,
40
+ "description": "If true, delete the named tag instead of creating it.",
41
+ "type": "boolean"
42
+ }
43
+ },
44
+ "required": [
45
+ "format",
46
+ "tag",
47
+ "delete"
48
+ ],
49
+ "additionalProperties": false
50
+ }