@cyanheads/git-mcp-server 2.7.0 → 2.8.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.
- package/README.md +20 -18
- package/dist/index.js +623 -445
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<h1>@cyanheads/git-mcp-server</h1>
|
|
3
3
|
<p><b>A secure and scalable Git MCP server giving AI agents powerful version control for local and (soon) serverless environments. STDIO & Streamable HTTP</b>
|
|
4
|
-
<div>
|
|
4
|
+
<div>28 Tools • 1 Resource • 1 Prompt</div>
|
|
5
5
|
</p>
|
|
6
6
|
</div>
|
|
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
|
|
|
@@ -15,16 +15,17 @@
|
|
|
15
15
|
|
|
16
16
|
## 🛠️ Tools Overview
|
|
17
17
|
|
|
18
|
-
This server provides
|
|
18
|
+
This server provides 28 comprehensive Git operations organized into seven functional categories:
|
|
19
19
|
|
|
20
|
-
| Category | Tools | Description
|
|
21
|
-
| :------------------------ | :----------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
-
| **Repository Management** | `git_init`, `git_clone`, `git_status`, `git_clean` | Initialize repos, clone from remotes, check status, and clean untracked files
|
|
23
|
-
| **Staging & Commits** | `git_add`, `git_commit`, `git_diff` | Stage changes, create commits, and compare changes
|
|
24
|
-
| **History & Inspection** | `git_log`, `git_show`, `git_blame`, `git_reflog` | View commit history, inspect objects, trace line-by-line authorship, and view ref logs
|
|
25
|
-
| **
|
|
26
|
-
| **
|
|
27
|
-
| **
|
|
20
|
+
| Category | Tools | Description |
|
|
21
|
+
| :------------------------ | :----------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
22
|
+
| **Repository Management** | `git_init`, `git_clone`, `git_status`, `git_clean` | Initialize repos, clone from remotes, check status, and clean untracked files |
|
|
23
|
+
| **Staging & Commits** | `git_add`, `git_commit`, `git_diff` | Stage changes, create commits, and compare changes |
|
|
24
|
+
| **History & Inspection** | `git_log`, `git_show`, `git_blame`, `git_reflog` | View commit history, inspect objects, trace line-by-line authorship, and view ref logs |
|
|
25
|
+
| **Analysis** | `git_changelog_analyze` | Gather git context and review instructions for LLM-driven changelog analysis (security, features, storyline, gaps, breaking changes, quality) |
|
|
26
|
+
| **Branching & Merging** | `git_branch`, `git_checkout`, `git_merge`, `git_rebase`, `git_cherry_pick` | Manage branches, switch contexts, integrate changes, and apply specific commits |
|
|
27
|
+
| **Remote Operations** | `git_remote`, `git_fetch`, `git_pull`, `git_push` | Configure remotes, download updates, synchronize repositories, and publish changes |
|
|
28
|
+
| **Advanced Workflows** | `git_tag`, `git_stash`, `git_reset`, `git_worktree`, `git_set_working_dir`, `git_clear_working_dir`, `git_wrapup_instructions` | Tag releases, stash changes, reset state, manage worktrees, set/clear session directory, and access workflow guidance |
|
|
28
29
|
|
|
29
30
|
## 📦 Resources Overview
|
|
30
31
|
|
|
@@ -131,7 +132,7 @@ Plus, specialized features for **Git integration**:
|
|
|
131
132
|
- **Cross-Runtime Compatibility**: Works seamlessly with both Bun and Node.js runtimes. Automatically detects the runtime and uses optimal process spawning (Bun.spawn in Bun, child_process.spawn in Node.js).
|
|
132
133
|
- **Provider-Based Architecture**: Pluggable git provider system with current CLI implementation and planned isomorphic-git provider for edge deployment.
|
|
133
134
|
- **Optimized Git Execution**: Direct git CLI interaction with cross-runtime support for high-performance process management, streaming I/O, and timeout handling (current CLI provider).
|
|
134
|
-
- **Comprehensive Coverage**:
|
|
135
|
+
- **Comprehensive Coverage**: 28 tools covering all essential Git operations from init to push, plus changelog analysis.
|
|
135
136
|
- **Working Directory Management**: Session-specific directory context for multi-repo workflows.
|
|
136
137
|
- **Configurable Git Identity**: Override author/committer information via environment variables with automatic fallback to global git config.
|
|
137
138
|
- **Safety Features**: Explicit confirmations for destructive operations like `git clean` and `git reset --hard`.
|
|
@@ -345,23 +346,24 @@ For strict rules when using this server with an AI agent, refer to the **`AGENTS
|
|
|
345
346
|
|
|
346
347
|
## 🧪 Testing
|
|
347
348
|
|
|
348
|
-
|
|
349
|
+
Tests run via [Bun's test runner](https://bun.sh/docs/cli/test) with Vitest compatibility.
|
|
349
350
|
|
|
350
351
|
- **Run all tests:**
|
|
351
352
|
|
|
352
353
|
```sh
|
|
353
|
-
|
|
354
|
+
bun test
|
|
354
355
|
```
|
|
355
356
|
|
|
356
357
|
- **Run tests with coverage:**
|
|
357
358
|
|
|
358
359
|
```sh
|
|
359
|
-
|
|
360
|
+
bun test --coverage
|
|
360
361
|
```
|
|
361
362
|
|
|
362
|
-
- **Run
|
|
363
|
+
- **Run quality checks (lint, format, typecheck, audit):**
|
|
364
|
+
|
|
363
365
|
```sh
|
|
364
|
-
|
|
366
|
+
bun run devcheck
|
|
365
367
|
```
|
|
366
368
|
|
|
367
369
|
## 🗺️ Roadmap
|
|
@@ -371,7 +373,7 @@ This server uses [Vitest](https://vitest.dev/) for testing.
|
|
|
371
373
|
The server uses a **provider-based architecture** to support multiple git implementation backends:
|
|
372
374
|
|
|
373
375
|
- **✅ CLI Provider** (Current): Full-featured git operations via native git CLI
|
|
374
|
-
-
|
|
376
|
+
- Implementation coverage for all 28 git tools
|
|
375
377
|
- Executes git commands using Bun.spawn for optimal performance
|
|
376
378
|
- Streaming I/O handling for large outputs (10MB buffer limit)
|
|
377
379
|
- Configurable timeouts (60s default) and automatic process cleanup
|