@cyanheads/git-mcp-server 2.8.0 → 2.8.1
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 +1 -1
- package/dist/index.js +54 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx) [](https://modelcontextprotocol.io/) [](./LICENSE) [](https://github.com/cyanheads/git-mcp-server/issues) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
package/dist/index.js
CHANGED
|
@@ -15335,7 +15335,7 @@ var package_default;
|
|
|
15335
15335
|
var init_package = __esm(() => {
|
|
15336
15336
|
package_default = {
|
|
15337
15337
|
name: "@cyanheads/git-mcp-server",
|
|
15338
|
-
version: "2.
|
|
15338
|
+
version: "2.8.1",
|
|
15339
15339
|
mcpName: "io.github.cyanheads/git-mcp-server",
|
|
15340
15340
|
description: "A secure and scalable Git MCP server enabling AI agents to perform comprehensive Git version control operations via STDIO and Streamable HTTP.",
|
|
15341
15341
|
main: "dist/index.js",
|
|
@@ -176201,7 +176201,20 @@ async function executeCommit(options, context, execGit) {
|
|
|
176201
176201
|
args.push(`--author=${authorStr}`);
|
|
176202
176202
|
}
|
|
176203
176203
|
const cmd = buildGitCommand({ command: "commit", args });
|
|
176204
|
-
|
|
176204
|
+
try {
|
|
176205
|
+
await execGit(cmd, context.workingDirectory, context.requestContext);
|
|
176206
|
+
} catch (error48) {
|
|
176207
|
+
if (shouldSign && options.forceUnsignedOnFailure) {
|
|
176208
|
+
const unsignedArgs = args.filter((a) => a !== "--gpg-sign");
|
|
176209
|
+
const unsignedCmd = buildGitCommand({
|
|
176210
|
+
command: "commit",
|
|
176211
|
+
args: unsignedArgs
|
|
176212
|
+
});
|
|
176213
|
+
await execGit(unsignedCmd, context.workingDirectory, context.requestContext);
|
|
176214
|
+
} else {
|
|
176215
|
+
throw error48;
|
|
176216
|
+
}
|
|
176217
|
+
}
|
|
176205
176218
|
const hashCmd = buildGitCommand({
|
|
176206
176219
|
command: "rev-parse",
|
|
176207
176220
|
args: ["HEAD"]
|
|
@@ -177015,22 +177028,40 @@ async function executeTag(options, context, execGit) {
|
|
|
177015
177028
|
if (!options.tagName) {
|
|
177016
177029
|
throw new Error("Tag name is required for create operation");
|
|
177017
177030
|
}
|
|
177018
|
-
args.push(options.tagName);
|
|
177019
177031
|
const shouldSign = options.sign ?? shouldSignCommits();
|
|
177020
|
-
|
|
177021
|
-
const
|
|
177022
|
-
|
|
177023
|
-
|
|
177024
|
-
|
|
177025
|
-
|
|
177026
|
-
|
|
177027
|
-
|
|
177028
|
-
|
|
177029
|
-
|
|
177030
|
-
|
|
177032
|
+
const buildCreateArgs = (sign) => {
|
|
177033
|
+
const createArgs = [options.tagName];
|
|
177034
|
+
if (sign) {
|
|
177035
|
+
const message = options.message || `Tag ${options.tagName}`;
|
|
177036
|
+
createArgs.push("-s", "-m", message);
|
|
177037
|
+
} else if (options.message && options.annotated) {
|
|
177038
|
+
createArgs.push("-a", "-m", options.message);
|
|
177039
|
+
}
|
|
177040
|
+
if (options.commit) {
|
|
177041
|
+
createArgs.push(options.commit);
|
|
177042
|
+
}
|
|
177043
|
+
if (options.force) {
|
|
177044
|
+
createArgs.push("--force");
|
|
177045
|
+
}
|
|
177046
|
+
return createArgs;
|
|
177047
|
+
};
|
|
177048
|
+
const createCmd = buildGitCommand({
|
|
177049
|
+
command: "tag",
|
|
177050
|
+
args: buildCreateArgs(shouldSign)
|
|
177051
|
+
});
|
|
177052
|
+
try {
|
|
177053
|
+
await execGit(createCmd, context.workingDirectory, context.requestContext);
|
|
177054
|
+
} catch (error48) {
|
|
177055
|
+
if (shouldSign && options.forceUnsignedOnFailure) {
|
|
177056
|
+
const unsignedCmd = buildGitCommand({
|
|
177057
|
+
command: "tag",
|
|
177058
|
+
args: buildCreateArgs(false)
|
|
177059
|
+
});
|
|
177060
|
+
await execGit(unsignedCmd, context.workingDirectory, context.requestContext);
|
|
177061
|
+
} else {
|
|
177062
|
+
throw error48;
|
|
177063
|
+
}
|
|
177031
177064
|
}
|
|
177032
|
-
const cmd = buildGitCommand({ command: "tag", args });
|
|
177033
|
-
await execGit(cmd, context.workingDirectory, context.requestContext);
|
|
177034
177065
|
const createResult = {
|
|
177035
177066
|
mode: "create",
|
|
177036
177067
|
created: options.tagName
|
|
@@ -196532,6 +196563,8 @@ var InputSchema27 = exports_external.object({
|
|
|
196532
196563
|
commit: CommitRefSchema.optional().describe("Commit to tag (default: HEAD for create operation)."),
|
|
196533
196564
|
message: exports_external.string().optional().describe("Tag message (creates annotated tag)."),
|
|
196534
196565
|
annotated: exports_external.boolean().default(false).describe("Create annotated tag with message."),
|
|
196566
|
+
sign: SignSchema,
|
|
196567
|
+
forceUnsignedOnFailure: exports_external.boolean().default(false).describe("If GPG/SSH signing fails, retry the tag creation without signing instead of failing."),
|
|
196535
196568
|
force: ForceSchema.describe("Force tag creation/deletion (overwrite existing).")
|
|
196536
196569
|
});
|
|
196537
196570
|
var TagInfoSchema = exports_external.object({
|
|
@@ -196550,7 +196583,8 @@ var OutputSchema28 = exports_external.object({
|
|
|
196550
196583
|
});
|
|
196551
196584
|
async function gitTagLogic(input, { provider, targetPath, appContext }) {
|
|
196552
196585
|
const tagOptions = {
|
|
196553
|
-
mode: input.mode
|
|
196586
|
+
mode: input.mode,
|
|
196587
|
+
forceUnsignedOnFailure: input.forceUnsignedOnFailure
|
|
196554
196588
|
};
|
|
196555
196589
|
if (input.tagName !== undefined) {
|
|
196556
196590
|
tagOptions.tagName = input.tagName;
|
|
@@ -196564,6 +196598,9 @@ async function gitTagLogic(input, { provider, targetPath, appContext }) {
|
|
|
196564
196598
|
if (input.annotated !== undefined) {
|
|
196565
196599
|
tagOptions.annotated = input.annotated;
|
|
196566
196600
|
}
|
|
196601
|
+
if (input.sign !== undefined) {
|
|
196602
|
+
tagOptions.sign = input.sign;
|
|
196603
|
+
}
|
|
196567
196604
|
if (input.force !== undefined) {
|
|
196568
196605
|
tagOptions.force = input.force;
|
|
196569
196606
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/git-mcp-server",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"mcpName": "io.github.cyanheads/git-mcp-server",
|
|
5
5
|
"description": "A secure and scalable Git MCP server enabling AI agents to perform comprehensive Git version control operations via STDIO and Streamable HTTP.",
|
|
6
6
|
"main": "dist/index.js",
|