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
@@ -45,20 +45,29 @@ Please note that mcp-server-git is currently in early development. The functiona
45
45
-`message` (string): Commit message
46
46
- Returns: Confirmation with new commit hash
47
47
48
-
6.`git_add`
48
+
6.`git_commit_signed`
49
+
- Records changes to the repository and signs the commit with GPG
50
+
- Inputs:
51
+
-`repo_path` (string): Path to Git repository
52
+
-`message` (string): Commit message
53
+
-`key_id` (string, optional): GPG key ID to use for signing. If omitted, the default signing key configured in Git will be used.
54
+
- 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.
55
+
- Returns: Confirmation with new commit hash. If signing fails (for example, no GPG key is configured), the underlying Git command will raise an error.
56
+
57
+
7.`git_add`
49
58
- Adds file contents to the staging area
50
59
- Inputs:
51
60
-`repo_path` (string): Path to Git repository
52
61
-`files` (string[]): Array of file paths to stage
53
62
- Returns: Confirmation of staged files
54
63
55
-
7.`git_reset`
64
+
8.`git_reset`
56
65
- Unstages all staged changes
57
66
- Input:
58
67
-`repo_path` (string): Path to Git repository
59
68
- Returns: Confirmation of reset operation
60
69
61
-
8.`git_log`
70
+
9.`git_log`
62
71
- Shows the commit logs with optional date filtering
63
72
- Inputs:
64
73
-`repo_path` (string): Path to Git repository
@@ -67,34 +76,36 @@ Please note that mcp-server-git is currently in early development. The functiona
67
76
-`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')
68
77
- Returns: Array of commit entries with hash, author, date, and message
69
78
70
-
9.`git_create_branch`
79
+
10.`git_create_branch`
71
80
- Creates a new branch
72
81
- Inputs:
73
82
-`repo_path` (string): Path to Git repository
74
83
-`branch_name` (string): Name of the new branch
75
84
-`base_branch` (string, optional): Base branch to create from (defaults to current branch)
76
85
- Returns: Confirmation of branch creation
77
-
10.`git_checkout`
86
+
87
+
11.`git_checkout`
78
88
- Switches branches
79
89
- Inputs:
80
90
-`repo_path` (string): Path to Git repository
81
91
-`branch_name` (string): Name of branch to checkout
82
92
- Returns: Confirmation of branch switch
83
-
11.`git_show`
93
+
94
+
12.`git_show`
84
95
- Shows the contents of a commit
85
96
- Inputs:
86
97
-`repo_path` (string): Path to Git repository
87
98
-`revision` (string): The revision (commit hash, branch name, tag) to show
88
99
- Returns: Contents of the specified commit
89
100
90
-
12.`git_branch`
91
-
- List Git branches
92
-
- Inputs:
93
-
-`repo_path` (string): Path to the Git repository.
94
-
-`branch_type` (string): Whether to list local branches ('local'), remote branches ('remote') or all branches('all').
95
-
-`contains` (string, optional): The commit sha that branch should contain. Do not pass anything to this param if no commit sha is specified
96
-
-`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
97
-
- Returns: List of branches
101
+
13.`git_branch`
102
+
- List Git branches
103
+
- Inputs:
104
+
-`repo_path` (string): Path to the Git repository.
105
+
-`branch_type` (string): Whether to list local branches ('local'), remote branches ('remote') or all branches('all').
106
+
-`contains` (string, optional): The commit sha that branch should contain. Do not pass anything to this param if no commit sha is specified
107
+
-`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