@cyanheads/git-mcp-server 2.0.1 → 2.0.2
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 +12 -6
- package/package.json +11 -10
- /package/{build → dist}/config/index.js +0 -0
- /package/{build → dist}/index.js +0 -0
- /package/{build → dist}/mcp-server/server.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitAdd/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitAdd/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitAdd/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitBranch/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitBranch/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitBranch/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitCheckout/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitCheckout/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitCheckout/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitCherryPick/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitCherryPick/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitCherryPick/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitClean/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitClean/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitClean/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitClearWorkingDir/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitClearWorkingDir/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitClearWorkingDir/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitClone/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitClone/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitClone/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitCommit/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitCommit/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitCommit/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitDiff/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitDiff/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitDiff/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitFetch/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitFetch/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitFetch/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitInit/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitInit/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitInit/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitLog/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitLog/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitLog/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitMerge/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitMerge/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitMerge/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitPull/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitPull/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitPull/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitPush/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitPush/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitPush/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitRebase/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitRebase/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitRebase/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitRemote/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitRemote/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitRemote/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitReset/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitReset/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitReset/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitSetWorkingDir/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitSetWorkingDir/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitSetWorkingDir/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitShow/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitShow/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitShow/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitStash/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitStash/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitStash/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitStatus/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitStatus/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitStatus/registration.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitTag/index.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitTag/logic.js +0 -0
- /package/{build → dist}/mcp-server/tools/gitTag/registration.js +0 -0
- /package/{build → dist}/types-global/errors.js +0 -0
- /package/{build → dist}/types-global/mcp.js +0 -0
- /package/{build → dist}/types-global/tool.js +0 -0
- /package/{build → dist}/utils/errorHandler.js +0 -0
- /package/{build → dist}/utils/idGenerator.js +0 -0
- /package/{build → dist}/utils/index.js +0 -0
- /package/{build → dist}/utils/jsonParser.js +0 -0
- /package/{build → dist}/utils/logger.js +0 -0
- /package/{build → dist}/utils/rateLimiter.js +0 -0
- /package/{build → dist}/utils/requestContext.js +0 -0
- /package/{build → dist}/utils/sanitization.js +0 -0
- /package/{build → dist}/utils/tokenCounter.js +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.typescriptlang.org/)
|
|
4
4
|
[](https://modelcontextprotocol.io/)
|
|
5
|
-
[](./CHANGELOG.md)
|
|
6
6
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
7
|
[](https://github.com/cyanheads/git-mcp-server/issues)
|
|
8
8
|
[](https://github.com/cyanheads/git-mcp-server)
|
|
@@ -72,13 +72,17 @@ Implemented as an MCP server, it allows LLM agents and other compatible clients
|
|
|
72
72
|
|
|
73
73
|
## Overview
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
**Empower your AI agents and development tools with seamless Git integration!**
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
- **Servers**: This server provides tools for Git operations.
|
|
79
|
-
- **LLM Agents**: AI models that leverage the server's Git capabilities.
|
|
77
|
+
The Git MCP Server acts as a bridge, allowing applications (MCP Clients) that understand the Model Context Protocol (MCP) – like advanced AI assistants (LLMs), IDE extensions, or custom scripts – to interact directly and safely with local Git repositories.
|
|
80
78
|
|
|
81
|
-
|
|
79
|
+
Instead of complex scripting or manual CLI, your tools can leverage this server to:
|
|
80
|
+
|
|
81
|
+
- **Automate Git workflows**: Clone repositories, create branches, stage changes, commit work, push updates, and manage tags programmatically.
|
|
82
|
+
- **Gain repository insights**: Check status, view logs, diff changes, and inspect Git objects without leaving the host application.
|
|
83
|
+
- **Integrate Git into AI-driven development**: Enable LLMs to manage version control as part of their coding or refactoring tasks.
|
|
84
|
+
|
|
85
|
+
Built on the robust `mcp-ts-template`, this server provides a standardized, secure, and efficient way to expose Git functionality via the MCP standard. It achieves this by securely executing the standard `git` command-line tool installed on the system using Node.js's `child_process` module, ensuring compatibility and leveraging the full power of Git.
|
|
82
86
|
|
|
83
87
|
## Features
|
|
84
88
|
|
|
@@ -96,6 +100,8 @@ Leverages the robust utilities provided by the `mcp-ts-template`:
|
|
|
96
100
|
|
|
97
101
|
### Git Operations
|
|
98
102
|
|
|
103
|
+
- **Direct Git CLI Execution**: Interacts with Git by securely executing the standard `git` command-line tool via Node.js `child_process`, ensuring full compatibility and access to Git's features.
|
|
104
|
+
|
|
99
105
|
- **Comprehensive Command Coverage**: Exposes a wide range of Git commands as MCP tools (see [Tools](#tools) section).
|
|
100
106
|
- **Repository Interaction**: Supports status checking, branching, staging, committing, fetching, pulling, pushing, diffing, logging, resetting, tagging, and more.
|
|
101
107
|
- **Working Directory Management**: Allows setting and clearing a session-specific working directory for context persistence across multiple Git operations.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/git-mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "An MCP (Model Context Protocol) server providing tools to interact with Git repositories. Enables LLMs and AI agents to perform Git operations like clone, commit, push, pull, branch, diff, log, status, and more via the MCP standard.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -17,19 +17,20 @@
|
|
|
17
17
|
"node": ">=18.0.0"
|
|
18
18
|
},
|
|
19
19
|
"bin": {
|
|
20
|
-
"git-mcp-server": "./
|
|
20
|
+
"git-mcp-server": "./dist/index.js"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
|
-
"
|
|
23
|
+
"dist"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build": "tsc && node -
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"tree": "ts-node scripts/tree.ts",
|
|
32
|
-
"
|
|
26
|
+
"build": "tsc && node --loader ts-node/esm scripts/make-executable.ts dist/index.js",
|
|
27
|
+
"start": "node dist/index.js",
|
|
28
|
+
"start:stdio": "MCP_TRANSPORT_TYPE=stdio node dist/index.js",
|
|
29
|
+
"start:http": "MCP_TRANSPORT_TYPE=http node dist/index.js",
|
|
30
|
+
"rebuild": "ts-node --esm scripts/clean.ts && npm run build",
|
|
31
|
+
"tree": "ts-node --esm scripts/tree.ts",
|
|
32
|
+
"inspector": "npx @modelcontextprotocol/inspector dist/index.js",
|
|
33
|
+
"clean": "ts-node --esm scripts/clean.ts"
|
|
33
34
|
},
|
|
34
35
|
"publishConfig": {
|
|
35
36
|
"access": "public"
|
|
File without changes
|
/package/{build → dist}/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|