You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/git/README.md
+25-14Lines changed: 25 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,20 +43,29 @@ Please note that mcp-server-git is currently in early development. The functiona
43
43
-`message` (string): Commit message
44
44
- Returns: Confirmation with new commit hash
45
45
46
-
6.`git_add`
46
+
6.`git_commit_signed`
47
+
- Records changes to the repository and signs the commit with GPG
48
+
- Inputs:
49
+
-`repo_path` (string): Path to Git repository
50
+
-`message` (string): Commit message
51
+
-`key_id` (string, optional): GPG key ID to use for signing. If omitted, the default signing key configured in Git will be used.
52
+
- Behavior: Uses the Git CLI `-S`/`--gpg-sign` flag to create a GPG-signed commit. This passes through to the system's `git` and `gpg` configuration, so GPG must be available and configured on the host.
53
+
- Returns: Confirmation with new commit hash. If signing fails (for example, no GPG key is configured), the underlying Git command will raise an error.
54
+
55
+
7.`git_add`
47
56
- Adds file contents to the staging area
48
57
- Inputs:
49
58
-`repo_path` (string): Path to Git repository
50
59
-`files` (string[]): Array of file paths to stage
51
60
- Returns: Confirmation of staged files
52
61
53
-
7.`git_reset`
62
+
8.`git_reset`
54
63
- Unstages all staged changes
55
64
- Input:
56
65
-`repo_path` (string): Path to Git repository
57
66
- Returns: Confirmation of reset operation
58
67
59
-
8.`git_log`
68
+
9.`git_log`
60
69
- Shows the commit logs with optional date filtering
61
70
- Inputs:
62
71
-`repo_path` (string): Path to Git repository
@@ -65,34 +74,36 @@ Please note that mcp-server-git is currently in early development. The functiona
65
74
-`end_timestamp` (string, optional): End timestamp for filtering commits. Accepts ISO 8601 format (e.g., '2024-01-15T14:30:25'), relative dates (e.g., '2 weeks ago', 'yesterday'), or absolute dates (e.g., '2024-01-15', 'Jan 15 2024')
66
75
- Returns: Array of commit entries with hash, author, date, and message
67
76
68
-
9.`git_create_branch`
77
+
10.`git_create_branch`
69
78
- Creates a new branch
70
79
- Inputs:
71
80
-`repo_path` (string): Path to Git repository
72
81
-`branch_name` (string): Name of the new branch
73
82
-`base_branch` (string, optional): Base branch to create from (defaults to current branch)
74
83
- Returns: Confirmation of branch creation
75
-
10.`git_checkout`
84
+
85
+
11.`git_checkout`
76
86
- Switches branches
77
87
- Inputs:
78
88
-`repo_path` (string): Path to Git repository
79
89
-`branch_name` (string): Name of branch to checkout
80
90
- Returns: Confirmation of branch switch
81
-
11.`git_show`
91
+
92
+
12.`git_show`
82
93
- Shows the contents of a commit
83
94
- Inputs:
84
95
-`repo_path` (string): Path to Git repository
85
96
-`revision` (string): The revision (commit hash, branch name, tag) to show
86
97
- Returns: Contents of the specified commit
87
98
88
-
12.`git_branch`
89
-
- List Git branches
90
-
- Inputs:
91
-
-`repo_path` (string): Path to the Git repository.
92
-
-`branch_type` (string): Whether to list local branches ('local'), remote branches ('remote') or all branches('all').
93
-
-`contains` (string, optional): The commit sha that branch should contain. Do not pass anything to this param if no commit sha is specified
94
-
-`not_contains` (string, optional): The commit sha that branch should NOT contain. Do not pass anything to this param if no commit sha is specified
95
-
- Returns: List of branches
99
+
13.`git_branch`
100
+
- List Git branches
101
+
- Inputs:
102
+
-`repo_path` (string): Path to the Git repository.
103
+
-`branch_type` (string): Whether to list local branches ('local'), remote branches ('remote') or all branches('all').
104
+
-`contains` (string, optional): The commit sha that branch should contain. Do not pass anything to this param if no commit sha is specified
105
+
-`not_contains` (string, optional): The commit sha that branch should NOT contain. Do not pass anything to this param if no commit sha is specified
0 commit comments