@cyanheads/git-mcp-server 2.4.5 → 2.4.7

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.
Files changed (3) hide show
  1. package/README.md +115 -57
  2. package/dist/index.js +312 -125
  3. package/package.json +42 -40
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <div align="center">
2
2
  <h1>@cyanheads/git-mcp-server</h1>
3
- <p><b>A secure and scalable Git MCP server giving AI agents powerful version control for local and (soon) serverless environments.</b>
4
- <div>27 Tools • 1 Resources • 1 Prompt</div>
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>27 Tools • 1 Resource • 1 Prompt</div>
5
5
  </p>
6
6
  </div>
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-2.4.5-blue.svg?style=flat-square)](./CHANGELOG.md) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--06--18-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-06-18/changelog.mdx) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.20.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Status](https://img.shields.io/badge/Status-Stable-brightgreen.svg?style=flat-square)](https://github.com/cyanheads/git-mcp-server/issues) [![TypeScript](https://img.shields.io/badge/TypeScript-^5.9.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.2.21-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-2.4.7-blue.svg?style=flat-square)](./CHANGELOG.md) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--06--18-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-06-18/changelog.mdx) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.20.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Status](https://img.shields.io/badge/Status-Stable-brightgreen.svg?style=flat-square)](https://github.com/cyanheads/git-mcp-server/issues) [![TypeScript](https://img.shields.io/badge/TypeScript-^5.9.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.2.21-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -26,40 +26,52 @@ This server provides 27 comprehensive Git operations organized into six function
26
26
  | **Remote Operations** | `git_remote`, `git_fetch`, `git_pull`, `git_push` | Configure remotes, download updates, synchronize repositories, and publish changes |
27
27
  | **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
28
 
29
- ## Features
29
+ ## 📦 Resources Overview
30
30
 
31
- This server is built on the [`mcp-ts-template`](https://github.com/cyanheads/mcp-ts-template) and inherits its rich feature set:
31
+ The server provides resources that offer contextual information about the Git environment:
32
32
 
33
- - **Declarative Tools**: Define agent capabilities in single, self-contained files. The framework handles registration, validation, and execution.
34
- - **Robust Error Handling**: A unified `McpError` system ensures consistent, structured error responses.
35
- - **Pluggable Authentication**: Secure your server with zero-fuss support for `none`, `jwt`, or `oauth` modes.
36
- - **Abstracted Storage**: Swap storage backends (`in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2`) without changing business logic.
37
- - **Full-Stack Observability**: Deep insights with structured logging (Pino) and optional, auto-instrumented OpenTelemetry for traces and metrics.
38
- - **Dependency Injection**: Built with `tsyringe` for a clean, decoupled, and testable architecture.
39
- - **Edge-Ready Architecture**: Built on an edge-compatible framework that runs seamlessly on local machines or Cloudflare Workers. _Note: Current git operations use the CLI provider which requires local git installation. Edge deployment support is planned through the isomorphic-git provider integration._
33
+ | Resource | URI | Description |
34
+ | :------------------------ | :------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------- |
35
+ | **Git Working Directory** | `git://working-directory` | Provides the current session working directory for git operations. This is the directory set via `git_set_working_dir` and used as the default. |
40
36
 
41
- Plus, specialized features for **Git integration**:
37
+ ## 🎯 Prompts Overview
42
38
 
43
- - **Provider-Based Architecture**: Pluggable git provider system with current CLI implementation and planned isomorphic-git provider for edge deployment.
44
- - **Optimized Git Execution**: Direct git CLI interaction via Bun.spawn for high-performance process management with streaming I/O and timeout handling (current CLI provider).
45
- - **Comprehensive Coverage**: 27 tools covering all essential Git operations from init to push.
46
- - **Working Directory Management**: Session-specific directory context for multi-repo workflows.
47
- - **Safety Features**: Explicit confirmations for destructive operations like `git clean` and `git reset --hard`.
48
- - **Commit Signing**: Optional GPG/SSH signing support for verified commits.
39
+ The server provides structured prompt templates that guide AI agents through complex workflows:
40
+
41
+ | Prompt | Description | Parameters |
42
+ | :-------------- | :----------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------- |
43
+ | **Git Wrap-up** | A systematic workflow protocol for completing git sessions. Guides agents through reviewing, documenting, committing, and tagging changes. | `changelogPath`, `skipDocumentation`, `createTag`, and `updateAgentFiles`. |
49
44
 
50
45
  ## 🚀 Getting Started
51
46
 
47
+ ### Runtime Compatibility
48
+
49
+ This server works with **both Bun and Node.js runtimes**:
50
+
51
+ | Runtime | Command | Minimum Version | Notes |
52
+ | ----------- | --------------------------------------- | --------------- | ---------------------------------------- |
53
+ | **Bun** | `bunx @cyanheads/git-mcp-server@latest` | ≥ 1.2.0 | Native Bun runtime (optimal performance) |
54
+ | **Node.js** | `npx @cyanheads/git-mcp-server@latest` | ≥ 20.0.0 | Via npx/bunx (universal compatibility) |
55
+
56
+ The server automatically detects the runtime and uses the appropriate process spawning method for git operations.
57
+
52
58
  ### MCP Client Settings/Configuration
53
59
 
54
- Add the following to your MCP Client configuration file (e.g., `cline_mcp_settings.json`).
60
+ Add the following to your MCP Client configuration file (e.g., `cline_mcp_settings.json`). Clients have different ways to configure servers, so refer to your client's documentation for specifics.
61
+
62
+ **Be sure to update environment variables as needed (especially your Git information!)**
63
+
64
+ #### Using Bun (bunx)
55
65
 
56
66
  ```json
57
67
  {
58
68
  "mcpServers": {
59
69
  "git-mcp-server": {
70
+ "type": "stdio",
60
71
  "command": "bunx",
61
72
  "args": ["@cyanheads/git-mcp-server@latest"],
62
73
  "env": {
74
+ "MCP_TRANSPORT_TYPE": "stdio",
63
75
  "MCP_LOG_LEVEL": "info",
64
76
  "GIT_MCP_BASE_DIR": "~/Developer/",
65
77
  "LOGS_DIR": "~/Developer/logs/git-mcp-server/",
@@ -72,11 +84,67 @@ Add the following to your MCP Client configuration file (e.g., `cline_mcp_settin
72
84
  }
73
85
  ```
74
86
 
87
+ #### Using Node.js (npx)
88
+
89
+ ```json
90
+ {
91
+ "mcpServers": {
92
+ "git-mcp-server": {
93
+ "type": "stdio",
94
+ "command": "npx",
95
+ "args": ["@cyanheads/git-mcp-server@latest"],
96
+ "env": {
97
+ "MCP_TRANSPORT_TYPE": "stdio",
98
+ "MCP_LOG_LEVEL": "info",
99
+ "GIT_MCP_BASE_DIR": "~/Developer/",
100
+ "LOGS_DIR": "~/Developer/logs/git-mcp-server/",
101
+ "GIT_USERNAME": "cyanheads",
102
+ "GIT_EMAIL": "casey@caseyjhand.com",
103
+ "GIT_SIGN_COMMITS": "false"
104
+ }
105
+ }
106
+ }
107
+ }
108
+ ```
109
+
110
+ #### Streamable HTTP Configuration
111
+
112
+ ```bash
113
+ MCP_TRANSPORT_TYPE=http
114
+ MCP_HTTP_PORT=3015
115
+ ```
116
+
117
+ ## ✨ Server Features
118
+
119
+ This server is built on the [`mcp-ts-template`](https://github.com/cyanheads/mcp-ts-template) and inherits its rich feature set:
120
+
121
+ - **Declarative Tools**: Define agent capabilities in single, self-contained files. The framework handles registration, validation, and execution.
122
+ - **Robust Error Handling**: A unified `McpError` system ensures consistent, structured error responses.
123
+ - **Pluggable Authentication**: Secure your server with zero-fuss support for `none`, `jwt`, or `oauth` modes.
124
+ - **Abstracted Storage**: Swap storage backends (`in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2`) without changing business logic.
125
+ - **Full-Stack Observability**: Deep insights with structured logging (Pino) and optional, auto-instrumented OpenTelemetry for traces and metrics.
126
+ - **Dependency Injection**: Built with `tsyringe` for a clean, decoupled, and testable architecture.
127
+ - **Edge-Ready Architecture**: Built on an edge-compatible framework that runs seamlessly on local machines or Cloudflare Workers. _Note: Current git operations use the CLI provider which requires local git installation. Edge deployment support is planned through the isomorphic-git provider integration._
128
+
129
+ Plus, specialized features for **Git integration**:
130
+
131
+ - **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
+ - **Provider-Based Architecture**: Pluggable git provider system with current CLI implementation and planned isomorphic-git provider for edge deployment.
133
+ - **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**: 27 tools covering all essential Git operations from init to push.
135
+ - **Working Directory Management**: Session-specific directory context for multi-repo workflows.
136
+ - **Safety Features**: Explicit confirmations for destructive operations like `git clean` and `git reset --hard`.
137
+ - **Commit Signing**: Optional GPG/SSH signing support for verified commits.
138
+
139
+ ### Development Environment Setup
140
+
75
141
  ### Prerequisites
76
142
 
77
- - [Bun v1.2.0](https://bun.sh/) or higher
143
+ - **Either** [Bun v1.2.0+](https://bun.sh/) **OR** [Node.js v20.0.0+](https://nodejs.org/)
78
144
  - [Git](https://git-scm.com/) installed and accessible in your system PATH
79
145
 
146
+ > **Note**: Development uses Bun for the best experience, but the published package works with both Bun (`bunx`) and Node.js (`npx`).
147
+
80
148
  ### Installation
81
149
 
82
150
  1. **Clone the repository:**
@@ -93,10 +161,18 @@ cd git-mcp-server
93
161
 
94
162
  3. **Install dependencies:**
95
163
 
164
+ **With Bun (recommended for development):**
165
+
96
166
  ```sh
97
167
  bun install
98
168
  ```
99
169
 
170
+ **With Node.js:**
171
+
172
+ ```sh
173
+ npm install
174
+ ```
175
+
100
176
  ## ⚙️ Configuration
101
177
 
102
178
  All configuration is centralized and validated at startup in `src/config/index.ts`. Key environment variables in your `.env` file include:
@@ -122,6 +198,24 @@ All configuration is centralized and validated at startup in `src/config/index.t
122
198
 
123
199
  ## ▶️ Running the Server
124
200
 
201
+ ### For End Users (via Package Manager)
202
+
203
+ The easiest way to use the server is via `bunx` or `npx` (no installation required):
204
+
205
+ **With Bun:**
206
+
207
+ ```sh
208
+ bunx @cyanheads/git-mcp-server@latest
209
+ ```
210
+
211
+ **With Node.js:**
212
+
213
+ ```sh
214
+ npx @cyanheads/git-mcp-server@latest
215
+ ```
216
+
217
+ Both commands work identically and are configured through environment variables or your MCP client configuration.
218
+
125
219
  ### Local Development
126
220
 
127
221
  - **Build and run the production version**:
@@ -184,42 +278,6 @@ bun deploy:prod
184
278
  | `src/config` | Environment variable parsing and validation with Zod. |
185
279
  | `tests/` | Unit and integration tests, mirroring the `src/` directory structure. |
186
280
 
187
- ## 📦 Resources
188
-
189
- The server provides resources that offer contextual information about the Git environment:
190
-
191
- | Resource URI | Description |
192
- | :------------------------ | :-------------------------------------------------------------------------------------------- |
193
- | `git://working-directory` | Returns the currently configured working directory for the session. Shows `NOT_SET` if unset. |
194
-
195
- ## 🎯 Prompts
196
-
197
- The server provides structured prompt templates that guide AI agents through complex workflows:
198
-
199
- | Prompt Name | Description | Parameters |
200
- | :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------- |
201
- | `git_wrapup` | A systematic workflow protocol for completing git sessions. Guides agents through reviewing changes, updating documentation, and creating commits. | `changelogPath`, `skipDocumentation`, `createTag`, `updateAgentFiles` |
202
-
203
- ### Using Prompts
204
-
205
- Prompts are MCP primitives that LLM clients can discover and invoke through the protocol. They work together with tools to provide comprehensive workflows:
206
-
207
- **How it works:**
208
-
209
- 1. **Prompt** (`git_wrapup`): Provides the workflow template and instructions to the agent
210
- 2. **Tool** (`git_wrapup_instructions`): Retrieves current repository status and user-specific workflow preferences
211
-
212
- The `git_wrapup` prompt creates a structured checklist for completing git sessions:
213
-
214
- - First calls `git_wrapup_instructions` tool to get context and workflow configuration
215
- - Analyzes repository changes with `git_diff`
216
- - Updates `CHANGELOG.md` with version entries
217
- - Reviews and updates documentation
218
- - Creates atomic, conventional commits
219
- - Verifies completion with `git_status`
220
-
221
- This dual approach (prompt + tool) ensures agents have both the workflow logic and current repository context to complete tasks effectively.
222
-
223
281
  ## 📤 Understanding Tool Responses
224
282
 
225
283
  This server follows MCP's dual-output architecture for all tools ([MCP Tools Specification](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)):
package/dist/index.js CHANGED
@@ -4246,9 +4246,9 @@ var package_default;
4246
4246
  var init_package = __esm(() => {
4247
4247
  package_default = {
4248
4248
  name: "@cyanheads/git-mcp-server",
4249
- version: "2.4.4",
4249
+ version: "2.4.7",
4250
4250
  mcpName: "io.github.cyanheads/git-mcp-server",
4251
- description: "An MCP (Model Context Protocol) server enabling LLMs and AI agents to interact with Git repositories. Provides tools for comprehensive Git operations including clone, commit, branch, diff, log, status, push, pull, merge, rebase, worktree, tag management, and more, via the MCP standard. STDIO & HTTP.",
4251
+ description: "A secure and scalable Git MCP server enabling AI agents to perform comprehensive Git version control operations via STDIO and Streamable HTTP.",
4252
4252
  main: "dist/index.js",
4253
4253
  files: [
4254
4254
  "dist"
@@ -4275,40 +4275,44 @@ var init_package = __esm(() => {
4275
4275
  },
4276
4276
  homepage: "https://github.com/cyanheads/git-mcp-server#readme",
4277
4277
  scripts: {
4278
- build: "bun build ./src/index.ts --outdir ./dist --target node",
4279
- "build:worker": "bun build ./src/worker.ts --outdir ./dist --target bun --no-external",
4278
+ "//--- Development": "",
4279
+ dev: "bun --watch src/index.ts",
4280
+ "dev:http": "MCP_LOG_LEVEL=debug MCP_TRANSPORT_TYPE=http bun --watch src/index.ts",
4281
+ "dev:stdio": "MCP_LOG_LEVEL=debug MCP_TRANSPORT_TYPE=stdio bun --watch src/index.ts",
4282
+ devcheck: "bun run scripts/devcheck.ts",
4283
+ devdocs: "bun run scripts/devdocs.ts",
4284
+ "//--- Build & Deploy": "",
4285
+ build: "rm -rf dist && bun build ./src/index.ts --outdir ./dist --target node",
4286
+ "build:worker": "rm -rf dist && bun build ./src/worker.ts --outdir ./dist --target bun --no-external",
4280
4287
  "deploy:dev": "MCP_TRANSPORT_TYPE=http bunx wrangler dev",
4281
4288
  "deploy:prod": "MCP_TRANSPORT_TYPE=http bunx wrangler deploy",
4289
+ "//--- Start": "",
4282
4290
  start: "bun ./dist/index.js",
4283
- "start:stdio": "MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js",
4284
4291
  "start:http": "MCP_TRANSPORT_TYPE=http bun ./dist/index.js",
4285
- dev: "bun --watch src/index.ts",
4286
- "dev:stdio": "MCP_LOG_LEVEL=debug MCP_TRANSPORT_TYPE=stdio bun --watch src/index.ts",
4287
- "dev:http": "MCP_LOG_LEVEL=debug MCP_TRANSPORT_TYPE=http bun --watch src/index.ts",
4288
- devdocs: "bun run scripts/devdocs.ts",
4289
- devcheck: "bun run scripts/devcheck.ts",
4290
- rebuild: "bun run scripts/clean.ts && bun run build",
4291
- "docs:generate": "bunx typedoc",
4292
+ "start:stdio": "MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js",
4293
+ "//--- Quality & Maintenance": "",
4294
+ audit: "bun audit",
4295
+ "audit:fix": "bun audit --fix",
4292
4296
  depcheck: "bunx depcheck",
4297
+ format: 'bunx prettier --write "**/*.{ts,js,json,md,html,css}"',
4293
4298
  lint: "bunx eslint .",
4294
4299
  "lint:fix": "bunx eslint . --fix",
4295
- typecheck: "bunx tsc --noEmit",
4296
- tree: "bun run scripts/tree.ts",
4297
- "fetch-spec": "bun run scripts/fetch-openapi-spec.ts",
4298
- format: 'bunx prettier --write "**/*.{ts,js,json,md,html,css}"',
4299
4300
  prepare: "bunx husky",
4300
- inspector: "bunx mcp-inspector --config mcp.json --server git-mcp-server",
4301
4301
  test: "bun test --config vitest.config.ts",
4302
4302
  "test:coverage": "bun test --coverage",
4303
- audit: "bun audit",
4304
- "audit:fix": "bun audit --fix",
4305
- "publish-mcp": "bun scripts/validate-mcp-publish-schema.ts"
4303
+ typecheck: "bunx tsc --noEmit",
4304
+ "//--- Utilities": "",
4305
+ "docs:generate": "bunx typedoc",
4306
+ "fetch-spec": "bun run scripts/fetch-openapi-spec.ts",
4307
+ inspector: "bunx mcp-inspector --config mcp.json --server git-mcp-server",
4308
+ "publish-mcp": "bun scripts/validate-mcp-publish-schema.ts",
4309
+ tree: "bun run scripts/tree.ts"
4306
4310
  },
4307
4311
  resolutions: {
4308
4312
  "@hono/node-server": "1.19.5",
4309
4313
  "chrono-node": "2.9.0",
4310
4314
  dotenv: "17.2.3",
4311
- hono: "4.9.10",
4315
+ hono: "4.9.12",
4312
4316
  zod: "3.23.8",
4313
4317
  typescript: "5.9.3"
4314
4318
  },
@@ -4321,7 +4325,7 @@ var init_package = __esm(() => {
4321
4325
  "chrono-node": "^2.9.0",
4322
4326
  dotenv: "^17.2.3",
4323
4327
  "fast-xml-parser": "^5.3.0",
4324
- hono: "^4.9.10",
4328
+ hono: "^4.9.12",
4325
4329
  ignore: "^7.0.5",
4326
4330
  jose: "^6.1.0",
4327
4331
  "js-yaml": "^4.1.0",
@@ -4333,7 +4337,7 @@ var init_package = __esm(() => {
4333
4337
  pino: "^10.0.0",
4334
4338
  "pino-pretty": "^13.1.2",
4335
4339
  "reflect-metadata": "^0.2.2",
4336
- repomix: "^1.6.1",
4340
+ repomix: "^1.7.0",
4337
4341
  "sanitize-html": "^2.17.0",
4338
4342
  tslib: "^2.8.1",
4339
4343
  tsyringe: "^4.10.0",
@@ -4355,7 +4359,7 @@ var init_package = __esm(() => {
4355
4359
  "@eslint/js": "^9.37.0",
4356
4360
  "@types/bun": "^1.3.0",
4357
4361
  "@types/js-yaml": "^4.0.9",
4358
- "@types/node": "^24.7.1",
4362
+ "@types/node": "^24.7.2",
4359
4363
  "@types/node-cron": "^3.0.11",
4360
4364
  "@types/papaparse": "^5.3.16",
4361
4365
  "@types/sanitize-html": "^2.16.0",
@@ -4375,23 +4379,14 @@ var init_package = __esm(() => {
4375
4379
  typedoc: "^0.28.14",
4376
4380
  typescript: "^5.9.3",
4377
4381
  "typescript-eslint": "8.46.0",
4378
- vite: "7.1.7",
4382
+ vite: "7.1.9",
4379
4383
  "vite-tsconfig-paths": "^5.1.4",
4380
4384
  vitest: "^3.2.4"
4381
4385
  },
4382
4386
  keywords: [
4383
- "typescript",
4384
- "MCP",
4385
- "model-context-protocol",
4386
- "mcp-server",
4387
- "llm-tools",
4388
- "git-tools",
4389
- "LLM",
4390
- "AI-integration",
4391
- "server",
4392
- "git",
4393
- "version-control",
4394
- "repository",
4387
+ "ai-agent",
4388
+ "ai-integration",
4389
+ "automation",
4395
4390
  "branch",
4396
4391
  "cherry-pick",
4397
4392
  "clone",
@@ -4399,8 +4394,15 @@ var init_package = __esm(() => {
4399
4394
  "devops",
4400
4395
  "diff",
4401
4396
  "fetch",
4397
+ "git",
4398
+ "git-tools",
4399
+ "llm",
4400
+ "llm-tools",
4402
4401
  "log",
4402
+ "mcp",
4403
+ "mcp-server",
4403
4404
  "merge",
4405
+ "model-context-protocol",
4404
4406
  "pull",
4405
4407
  "push",
4406
4408
  "rebase",
@@ -4409,9 +4411,9 @@ var init_package = __esm(() => {
4409
4411
  "stash",
4410
4412
  "status",
4411
4413
  "tag",
4412
- "worktree",
4413
- "ai-agent",
4414
- "automation"
4414
+ "typescript",
4415
+ "version-control",
4416
+ "worktree"
4415
4417
  ],
4416
4418
  author: "cyanheads <casey@caseyjhand.com> (https://github.com/cyanheads/git-mcp-server#readme)",
4417
4419
  license: "Apache-2.0",
@@ -101618,23 +101620,55 @@ var init_error_handler = __esm(() => {
101618
101620
  });
101619
101621
 
101620
101622
  // src/utils/internal/runtime.ts
101623
+ function detectRuntime() {
101624
+ if (runtimeCaps.isBun) {
101625
+ return "bun";
101626
+ }
101627
+ if (runtimeCaps.isNode) {
101628
+ return "node";
101629
+ }
101630
+ if (runtimeCaps.isWorkerLike) {
101631
+ return "worker";
101632
+ }
101633
+ if (runtimeCaps.isBrowserLike) {
101634
+ return "browser";
101635
+ }
101636
+ return "unknown";
101637
+ }
101638
+ function getRuntimeDescription() {
101639
+ const runtime = detectRuntime();
101640
+ switch (runtime) {
101641
+ case "bun":
101642
+ return `Bun ${process.versions?.bun || "unknown"}`;
101643
+ case "node":
101644
+ return `Node.js ${process.versions?.node || "unknown"}`;
101645
+ case "worker":
101646
+ return "Cloudflare Workers / Web Worker";
101647
+ case "browser":
101648
+ return "Browser";
101649
+ default:
101650
+ return "Unknown runtime";
101651
+ }
101652
+ }
101621
101653
  var safeHas = (key) => {
101622
101654
  try {
101623
101655
  return typeof globalThis[key] !== "undefined";
101624
101656
  } catch {
101625
101657
  return false;
101626
101658
  }
101627
- }, isNode, hasProcess, hasBuffer, hasTextEncoder, hasPerformanceNow, isWorkerLike, isBrowserLike, runtimeCaps;
101659
+ }, isBun, isNode, hasProcess, hasBuffer, hasTextEncoder, hasPerformanceNow, isWorkerLike, isBrowserLike, runtimeCaps;
101628
101660
  var init_runtime = __esm(() => {
101629
- isNode = typeof process !== "undefined" && typeof process.versions?.node === "string";
101661
+ isBun = typeof globalThis.Bun !== "undefined" || typeof process.versions?.bun === "string";
101662
+ isNode = !isBun && typeof process !== "undefined" && typeof process.versions?.node === "string";
101630
101663
  hasProcess = typeof process !== "undefined";
101631
101664
  hasBuffer = typeof Buffer !== "undefined";
101632
101665
  hasTextEncoder = safeHas("TextEncoder");
101633
101666
  hasPerformanceNow = typeof globalThis.performance?.now === "function";
101634
- isWorkerLike = !isNode && typeof globalThis.WorkerGlobalScope !== "undefined";
101635
- isBrowserLike = !isNode && !isWorkerLike && safeHas("window");
101667
+ isWorkerLike = !isNode && !isBun && typeof globalThis.WorkerGlobalScope !== "undefined";
101668
+ isBrowserLike = !isNode && !isBun && !isWorkerLike && safeHas("window");
101636
101669
  runtimeCaps = {
101637
101670
  isNode,
101671
+ isBun,
101638
101672
  isWorkerLike,
101639
101673
  isBrowserLike,
101640
101674
  hasProcess,
@@ -135725,10 +135759,12 @@ __export(exports_utils, {
135725
135759
  jsonParser: () => jsonParser,
135726
135760
  initializePerformance_Hrt: () => initializePerformance_Hrt,
135727
135761
  idGenerator: () => idGenerator,
135762
+ getRuntimeDescription: () => getRuntimeDescription,
135728
135763
  getHealthSnapshot: () => getHealthSnapshot,
135729
135764
  generateUUID: () => generateUUID,
135730
135765
  generateRequestContextId: () => generateRequestContextId,
135731
135766
  fetchWithTimeout: () => fetchWithTimeout,
135767
+ detectRuntime: () => detectRuntime,
135732
135768
  degrees: () => import_pdf_lib.degrees,
135733
135769
  dateParser: () => dateParser,
135734
135770
  csvParser: () => csvParser,
@@ -151548,6 +151584,7 @@ async function shutdownOpenTelemetry() {
151548
151584
  var import_reflect_metadata2 = __toESM(require_Reflect(), 1);
151549
151585
  init_utils();
151550
151586
  init_logger();
151587
+ init_runtime();
151551
151588
 
151552
151589
  // src/container/index.ts
151553
151590
  var import_reflect_metadata = __toESM(require_Reflect(), 1);
@@ -151827,32 +151864,98 @@ function isGitNotFoundError(error) {
151827
151864
  return message.includes("git") && (message.includes("not found") || message.includes("enoent") || message.includes("command not found"));
151828
151865
  }
151829
151866
 
151830
- // src/services/git/providers/cli/utils/git-executor.ts
151831
- var GIT_COMMAND_TIMEOUT_MS = 60000;
151832
- async function executeGitCommand(args, cwd) {
151833
- try {
151834
- validateGitArgs(args);
151835
- const proc = Bun.spawn(["git", ...args], {
151867
+ // src/services/git/providers/cli/utils/runtime-adapter.ts
151868
+ import { spawn } from "node:child_process";
151869
+ function detectRuntime2() {
151870
+ if (typeof globalThis.Bun !== "undefined") {
151871
+ return "bun";
151872
+ }
151873
+ if (process.versions?.bun) {
151874
+ return "bun";
151875
+ }
151876
+ return "node";
151877
+ }
151878
+ async function spawnWithBun(args, cwd, env, timeout) {
151879
+ const bunApi = globalThis.Bun;
151880
+ const proc = bunApi.spawn(["git", ...args], {
151881
+ cwd,
151882
+ env,
151883
+ stdio: ["ignore", "pipe", "pipe"]
151884
+ });
151885
+ const timeoutPromise = new Promise((_, reject) => {
151886
+ const timeoutId = setTimeout(() => {
151887
+ proc.kill();
151888
+ reject(new Error(`Git command timed out after ${timeout / 1000}s: git ${args.join(" ")}`));
151889
+ }, timeout);
151890
+ proc.exited.finally(() => clearTimeout(timeoutId));
151891
+ });
151892
+ const exitCode = await Promise.race([proc.exited, timeoutPromise]);
151893
+ const [stdout, stderr] = await Promise.all([
151894
+ proc.stdout.text(),
151895
+ proc.stderr.text()
151896
+ ]);
151897
+ if (exitCode !== 0) {
151898
+ const combinedOutput = `Exit Code: ${exitCode}
151899
+ Stderr: ${stderr}
151900
+ Stdout: ${stdout}`;
151901
+ throw new Error(combinedOutput);
151902
+ }
151903
+ return { stdout, stderr };
151904
+ }
151905
+ async function spawnWithNode(args, cwd, env, timeout) {
151906
+ return new Promise((resolve, reject) => {
151907
+ const proc = spawn("git", args, {
151836
151908
  cwd,
151837
- env: buildGitEnv(process.env),
151909
+ env,
151838
151910
  stdio: ["ignore", "pipe", "pipe"]
151839
151911
  });
151840
- const stdoutPromise = Bun.readableStreamToText(proc.stdout);
151841
- const stderrPromise = Bun.readableStreamToText(proc.stderr);
151842
- const timeoutPromise = new Promise((_, reject) => setTimeout(() => {
151843
- proc.kill();
151844
- reject(new Error(`Git command timed out after ${GIT_COMMAND_TIMEOUT_MS / 1000}s: ${args.join(" ")}`));
151845
- }, GIT_COMMAND_TIMEOUT_MS));
151846
- const exitCode = await Promise.race([proc.exited, timeoutPromise]);
151847
- const stdout = await stdoutPromise;
151848
- const stderr = await stderrPromise;
151849
- if (exitCode !== 0) {
151850
- const combinedOutput = `Exit Code: ${exitCode}
151912
+ const stdoutChunks = [];
151913
+ const stderrChunks = [];
151914
+ proc.stdout.on("data", (chunk) => {
151915
+ stdoutChunks.push(chunk);
151916
+ });
151917
+ proc.stderr.on("data", (chunk) => {
151918
+ stderrChunks.push(chunk);
151919
+ });
151920
+ const timeoutHandle = setTimeout(() => {
151921
+ proc.kill("SIGTERM");
151922
+ reject(new Error(`Git command timed out after ${timeout / 1000}s: ${args.join(" ")}`));
151923
+ }, timeout);
151924
+ proc.on("error", (error) => {
151925
+ clearTimeout(timeoutHandle);
151926
+ reject(error);
151927
+ });
151928
+ proc.on("close", (exitCode) => {
151929
+ clearTimeout(timeoutHandle);
151930
+ const stdout = Buffer.concat(stdoutChunks).toString("utf-8");
151931
+ const stderr = Buffer.concat(stderrChunks).toString("utf-8");
151932
+ if (exitCode !== 0) {
151933
+ const combinedOutput = `Exit Code: ${exitCode}
151851
151934
  Stderr: ${stderr}
151852
151935
  Stdout: ${stdout}`;
151853
- throw new Error(combinedOutput);
151854
- }
151855
- return { stdout, stderr };
151936
+ reject(new Error(combinedOutput));
151937
+ } else {
151938
+ resolve({ stdout, stderr });
151939
+ }
151940
+ });
151941
+ });
151942
+ }
151943
+ async function spawnGitCommand(args, cwd, env, timeout = 60000) {
151944
+ const runtime2 = detectRuntime2();
151945
+ if (runtime2 === "bun") {
151946
+ return spawnWithBun(args, cwd, env, timeout);
151947
+ } else {
151948
+ return spawnWithNode(args, cwd, env, timeout);
151949
+ }
151950
+ }
151951
+
151952
+ // src/services/git/providers/cli/utils/git-executor.ts
151953
+ var GIT_COMMAND_TIMEOUT_MS = 60000;
151954
+ async function executeGitCommand(args, cwd) {
151955
+ try {
151956
+ validateGitArgs(args);
151957
+ const result = await spawnGitCommand(args, cwd, buildGitEnv(process.env), GIT_COMMAND_TIMEOUT_MS);
151958
+ return result;
151856
151959
  } catch (error) {
151857
151960
  throw mapGitError(error, args[0] || "unknown");
151858
151961
  }
@@ -152411,6 +152514,14 @@ async function executeBranch(options, context, execGit) {
152411
152514
  ].join(GIT_FIELD_DELIMITER);
152412
152515
  const refPrefix = options.remote ? "refs/remotes" : "refs/heads";
152413
152516
  args.push(`--format=${format}`, refPrefix);
152517
+ if (options.merged !== undefined) {
152518
+ const mergedRef = typeof options.merged === "string" ? options.merged : "HEAD";
152519
+ args.push(`--merged=${mergedRef}`);
152520
+ }
152521
+ if (options.noMerged !== undefined) {
152522
+ const noMergedRef = typeof options.noMerged === "string" ? options.noMerged : "HEAD";
152523
+ args.push(`--no-merged=${noMergedRef}`);
152524
+ }
152414
152525
  const cmd = buildGitCommand({ command: "for-each-ref", args });
152415
152526
  const result = await execGit(cmd, context.workingDirectory, context.requestContext);
152416
152527
  const branches = parseBranchRef(result.stdout);
@@ -165452,7 +165563,7 @@ async function gitWrapupInstructionsLogic(input, { provider, storage, appContext
165452
165563
  let finalInstructions = baseInstructions;
165453
165564
  if (input.updateAgentMetaFiles) {
165454
165565
  finalInstructions += `
165455
- Extra request: review and update if needed the .clinerules and claude.md files if present.`;
165566
+ Extra request: review and update if needed the .cline_rules and claude.md files if present.`;
165456
165567
  }
165457
165568
  if (input.createTag) {
165458
165569
  finalInstructions += `
@@ -165520,6 +165631,29 @@ var gitWrapupInstructionsTool = {
165520
165631
 
165521
165632
  // src/mcp-server/tools/definitions/git-add.tool.ts
165522
165633
  init_lib();
165634
+
165635
+ // src/mcp-server/tools/utils/git-formatters.ts
165636
+ function flattenChanges(changes) {
165637
+ const result = {};
165638
+ if (changes.added && changes.added.length > 0) {
165639
+ result.added = changes.added;
165640
+ }
165641
+ if (changes.modified && changes.modified.length > 0) {
165642
+ result.modified = changes.modified;
165643
+ }
165644
+ if (changes.deleted && changes.deleted.length > 0) {
165645
+ result.deleted = changes.deleted;
165646
+ }
165647
+ if (changes.renamed && changes.renamed.length > 0) {
165648
+ result.renamed = changes.renamed;
165649
+ }
165650
+ if (changes.copied && changes.copied.length > 0) {
165651
+ result.copied = changes.copied;
165652
+ }
165653
+ return result;
165654
+ }
165655
+
165656
+ // src/mcp-server/tools/definitions/git-add.tool.ts
165523
165657
  var TOOL_NAME10 = "git_add";
165524
165658
  var TOOL_TITLE10 = "Git Add";
165525
165659
  var TOOL_DESCRIPTION10 = "Stage files for commit. Add file contents to the staging area (index) to prepare for the next commit.";
@@ -165559,20 +165693,6 @@ async function gitAddLogic(input, { provider, targetPath, appContext }) {
165559
165693
  requestContext: appContext,
165560
165694
  tenantId: appContext.tenantId || "default-tenant"
165561
165695
  });
165562
- const flattenChanges = (changes) => {
165563
- const result2 = {};
165564
- if (changes.added && changes.added.length > 0)
165565
- result2.added = changes.added;
165566
- if (changes.modified && changes.modified.length > 0)
165567
- result2.modified = changes.modified;
165568
- if (changes.deleted && changes.deleted.length > 0)
165569
- result2.deleted = changes.deleted;
165570
- if (changes.renamed && changes.renamed.length > 0)
165571
- result2.renamed = changes.renamed;
165572
- if (changes.copied && changes.copied.length > 0)
165573
- result2.copied = changes.copied;
165574
- return result2;
165575
- };
165576
165696
  return {
165577
165697
  success: result.success,
165578
165698
  stagedFiles: result.stagedFiles,
@@ -165695,20 +165815,6 @@ async function gitCommitLogic(input, { provider, targetPath, appContext }) {
165695
165815
  requestContext: appContext,
165696
165816
  tenantId: appContext.tenantId || "default-tenant"
165697
165817
  });
165698
- const flattenChanges = (changes) => {
165699
- const result2 = {};
165700
- if (changes.added && changes.added.length > 0)
165701
- result2.added = changes.added;
165702
- if (changes.modified && changes.modified.length > 0)
165703
- result2.modified = changes.modified;
165704
- if (changes.deleted && changes.deleted.length > 0)
165705
- result2.deleted = changes.deleted;
165706
- if (changes.renamed && changes.renamed.length > 0)
165707
- result2.renamed = changes.renamed;
165708
- if (changes.copied && changes.copied.length > 0)
165709
- result2.copied = changes.copied;
165710
- return result2;
165711
- };
165712
165818
  return {
165713
165819
  success: result.success,
165714
165820
  commitHash: result.commitHash,
@@ -166057,8 +166163,8 @@ var InputSchema15 = z.object({
166057
166163
  force: ForceSchema,
166058
166164
  all: AllSchema.describe("For list operation: show both local and remote branches."),
166059
166165
  remote: z.boolean().default(false).describe("For list operation: show only remote branches."),
166060
- merged: z.boolean().optional().describe("For list operation: show only branches merged into HEAD."),
166061
- noMerged: z.boolean().optional().describe("For list operation: show only branches not merged into HEAD.")
166166
+ merged: z.union([z.boolean(), CommitRefSchema]).optional().describe("For list operation: show only branches merged into HEAD (true) or specified commit (string)."),
166167
+ noMerged: z.union([z.boolean(), CommitRefSchema]).optional().describe("For list operation: show only branches not merged into HEAD (true) or specified commit (string).")
166062
166168
  });
166063
166169
  var BranchInfoSchema = z.object({
166064
166170
  name: z.string().describe("Branch name."),
@@ -166093,15 +166199,7 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
166093
166199
  };
166094
166200
  }
166095
166201
  }
166096
- const {
166097
- path: _path,
166098
- operation,
166099
- name,
166100
- newName,
166101
- merged: _merged,
166102
- noMerged: _noMerged,
166103
- ...rest
166104
- } = input;
166202
+ const { path: _path, operation, name, newName, ...rest } = input;
166105
166203
  const branchOptions = {
166106
166204
  mode: operation
166107
166205
  };
@@ -166120,6 +166218,12 @@ async function gitBranchLogic(input, { provider, targetPath, appContext }) {
166120
166218
  if (rest.all !== undefined || rest.remote !== undefined) {
166121
166219
  branchOptions.remote = rest.remote || rest.all;
166122
166220
  }
166221
+ if (rest.merged !== undefined) {
166222
+ branchOptions.merged = rest.merged;
166223
+ }
166224
+ if (rest.noMerged !== undefined) {
166225
+ branchOptions.noMerged = rest.noMerged;
166226
+ }
166123
166227
  const result = await provider.branch(branchOptions, {
166124
166228
  workingDirectory: targetPath,
166125
166229
  requestContext: appContext,
@@ -169269,6 +169373,27 @@ var Hono = class {
169269
169373
  };
169270
169374
  };
169271
169375
 
169376
+ // node_modules/hono/dist/router/reg-exp-router/matcher.js
169377
+ var emptyParam = [];
169378
+ function match(method, path4) {
169379
+ const matchers = this.buildAllMatchers();
169380
+ const match2 = (method2, path22) => {
169381
+ const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];
169382
+ const staticMatch = matcher[2][path22];
169383
+ if (staticMatch) {
169384
+ return staticMatch;
169385
+ }
169386
+ const match3 = path22.match(matcher[0]);
169387
+ if (!match3) {
169388
+ return [[], emptyParam];
169389
+ }
169390
+ const index = match3.indexOf("", 1);
169391
+ return [matcher[1][index], match3];
169392
+ };
169393
+ this.match = match2;
169394
+ return match2(method, path4);
169395
+ }
169396
+
169272
169397
  // node_modules/hono/dist/router/reg-exp-router/node.js
169273
169398
  var LABEL_REG_EXP_STR = "[^/]+";
169274
169399
  var ONLY_WILDCARD_REG_EXP_STR = ".*";
@@ -169430,7 +169555,6 @@ var Trie = class {
169430
169555
  };
169431
169556
 
169432
169557
  // node_modules/hono/dist/router/reg-exp-router/router.js
169433
- var emptyParam = [];
169434
169558
  var nullMatcher = [/^$/, [], /* @__PURE__ */ Object.create(null)];
169435
169559
  var wildcardRegExpCache = /* @__PURE__ */ Object.create(null);
169436
169560
  function buildWildcardRegExp(path4) {
@@ -169565,30 +169689,14 @@ var RegExpRouter = class {
169565
169689
  });
169566
169690
  }
169567
169691
  }
169568
- match(method, path4) {
169569
- clearWildcardRegExpCache();
169570
- const matchers = this.#buildAllMatchers();
169571
- this.match = (method2, path22) => {
169572
- const matcher = matchers[method2] || matchers[METHOD_NAME_ALL];
169573
- const staticMatch = matcher[2][path22];
169574
- if (staticMatch) {
169575
- return staticMatch;
169576
- }
169577
- const match = path22.match(matcher[0]);
169578
- if (!match) {
169579
- return [[], emptyParam];
169580
- }
169581
- const index = match.indexOf("", 1);
169582
- return [matcher[1][index], match];
169583
- };
169584
- return this.match(method, path4);
169585
- }
169586
- #buildAllMatchers() {
169692
+ match = match;
169693
+ buildAllMatchers() {
169587
169694
  const matchers = /* @__PURE__ */ Object.create(null);
169588
169695
  Object.keys(this.#routes).concat(Object.keys(this.#middleware)).forEach((method) => {
169589
169696
  matchers[method] ||= this.#buildMatcher(method);
169590
169697
  });
169591
169698
  this.#middleware = this.#routes = undefined;
169699
+ clearWildcardRegExpCache();
169592
169700
  return matchers;
169593
169701
  }
169594
169702
  #buildMatcher(method) {
@@ -169611,6 +169719,78 @@ var RegExpRouter = class {
169611
169719
  }
169612
169720
  };
169613
169721
 
169722
+ // node_modules/hono/dist/router/reg-exp-router/prepared-router.js
169723
+ var PreparedRegExpRouter = class {
169724
+ name = "PreparedRegExpRouter";
169725
+ #matchers;
169726
+ #relocateMap;
169727
+ constructor(matchers, relocateMap) {
169728
+ this.#matchers = matchers;
169729
+ this.#relocateMap = relocateMap;
169730
+ }
169731
+ #addWildcard(method, handlerData) {
169732
+ const matcher = this.#matchers[method];
169733
+ matcher[1].forEach((list) => list && list.push(handlerData));
169734
+ Object.values(matcher[2]).forEach((list) => list[0].push(handlerData));
169735
+ }
169736
+ #addPath(method, path4, handler, indexes, map3) {
169737
+ const matcher = this.#matchers[method];
169738
+ if (!map3) {
169739
+ matcher[2][path4][0].push([handler, {}]);
169740
+ } else {
169741
+ indexes.forEach((index) => {
169742
+ if (typeof index === "number") {
169743
+ matcher[1][index].push([handler, map3]);
169744
+ } else {
169745
+ matcher[2][index || path4][0].push([handler, map3]);
169746
+ }
169747
+ });
169748
+ }
169749
+ }
169750
+ add(method, path4, handler) {
169751
+ if (!this.#matchers[method]) {
169752
+ const all = this.#matchers[METHOD_NAME_ALL];
169753
+ const staticMap = {};
169754
+ for (const key in all[2]) {
169755
+ staticMap[key] = [all[2][key][0].slice(), emptyParam];
169756
+ }
169757
+ this.#matchers[method] = [
169758
+ all[0],
169759
+ all[1].map((list) => Array.isArray(list) ? list.slice() : 0),
169760
+ staticMap
169761
+ ];
169762
+ }
169763
+ if (path4 === "/*" || path4 === "*") {
169764
+ const handlerData = [handler, {}];
169765
+ if (method === METHOD_NAME_ALL) {
169766
+ for (const m in this.#matchers) {
169767
+ this.#addWildcard(m, handlerData);
169768
+ }
169769
+ } else {
169770
+ this.#addWildcard(method, handlerData);
169771
+ }
169772
+ return;
169773
+ }
169774
+ const data = this.#relocateMap[path4];
169775
+ if (!data) {
169776
+ throw new Error(`Path ${path4} is not registered`);
169777
+ }
169778
+ for (const [indexes, map3] of data) {
169779
+ if (method === METHOD_NAME_ALL) {
169780
+ for (const m in this.#matchers) {
169781
+ this.#addPath(m, path4, handler, indexes, map3);
169782
+ }
169783
+ } else {
169784
+ this.#addPath(method, path4, handler, indexes, map3);
169785
+ }
169786
+ }
169787
+ }
169788
+ buildAllMatchers() {
169789
+ return this.#matchers;
169790
+ }
169791
+ match = match;
169792
+ };
169793
+
169614
169794
  // node_modules/hono/dist/router/smart-router/router.js
169615
169795
  var SmartRouter = class {
169616
169796
  name = "SmartRouter";
@@ -172351,6 +172531,13 @@ var start = async () => {
172351
172531
  }
172352
172532
  await logger.initialize(validatedMcpLogLevel);
172353
172533
  logger.info(`Logger initialized. Effective MCP logging level: ${validatedMcpLogLevel}.`, requestContextService.createRequestContext({ operation: "LoggerInit" }));
172534
+ const runtime2 = detectRuntime();
172535
+ const runtimeDesc = getRuntimeDescription();
172536
+ logger.info(`Runtime detected: ${runtimeDesc}`, requestContextService.createRequestContext({
172537
+ operation: "RuntimeDetection",
172538
+ runtime: runtime2,
172539
+ runtimeVersion: runtimeDesc
172540
+ }));
172354
172541
  logger.info(`Storage service initialized with provider: ${config2.storage.providerType}`, requestContextService.createRequestContext({ operation: "StorageInit" }));
172355
172542
  transportManager = container_default.resolve(TransportManagerToken);
172356
172543
  const startupContext = requestContextService.createRequestContext({
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@cyanheads/git-mcp-server",
3
- "version": "2.4.5",
3
+ "version": "2.4.7",
4
4
  "mcpName": "io.github.cyanheads/git-mcp-server",
5
- "description": "An MCP (Model Context Protocol) server enabling LLMs and AI agents to interact with Git repositories. Provides tools for comprehensive Git operations including clone, commit, branch, diff, log, status, push, pull, merge, rebase, worktree, tag management, and more, via the MCP standard. STDIO & HTTP.",
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",
7
7
  "files": [
8
8
  "dist"
@@ -29,40 +29,44 @@
29
29
  },
30
30
  "homepage": "https://github.com/cyanheads/git-mcp-server#readme",
31
31
  "scripts": {
32
- "build": "bun build ./src/index.ts --outdir ./dist --target node",
33
- "build:worker": "bun build ./src/worker.ts --outdir ./dist --target bun --no-external",
32
+ "//--- Development": "",
33
+ "dev": "bun --watch src/index.ts",
34
+ "dev:http": "MCP_LOG_LEVEL=debug MCP_TRANSPORT_TYPE=http bun --watch src/index.ts",
35
+ "dev:stdio": "MCP_LOG_LEVEL=debug MCP_TRANSPORT_TYPE=stdio bun --watch src/index.ts",
36
+ "devcheck": "bun run scripts/devcheck.ts",
37
+ "devdocs": "bun run scripts/devdocs.ts",
38
+ "//--- Build & Deploy": "",
39
+ "build": "rm -rf dist && bun build ./src/index.ts --outdir ./dist --target node",
40
+ "build:worker": "rm -rf dist && bun build ./src/worker.ts --outdir ./dist --target bun --no-external",
34
41
  "deploy:dev": "MCP_TRANSPORT_TYPE=http bunx wrangler dev",
35
42
  "deploy:prod": "MCP_TRANSPORT_TYPE=http bunx wrangler deploy",
43
+ "//--- Start": "",
36
44
  "start": "bun ./dist/index.js",
37
- "start:stdio": "MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js",
38
45
  "start:http": "MCP_TRANSPORT_TYPE=http bun ./dist/index.js",
39
- "dev": "bun --watch src/index.ts",
40
- "dev:stdio": "MCP_LOG_LEVEL=debug MCP_TRANSPORT_TYPE=stdio bun --watch src/index.ts",
41
- "dev:http": "MCP_LOG_LEVEL=debug MCP_TRANSPORT_TYPE=http bun --watch src/index.ts",
42
- "devdocs": "bun run scripts/devdocs.ts",
43
- "devcheck": "bun run scripts/devcheck.ts",
44
- "rebuild": "bun run scripts/clean.ts && bun run build",
45
- "docs:generate": "bunx typedoc",
46
+ "start:stdio": "MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js",
47
+ "//--- Quality & Maintenance": "",
48
+ "audit": "bun audit",
49
+ "audit:fix": "bun audit --fix",
46
50
  "depcheck": "bunx depcheck",
51
+ "format": "bunx prettier --write \"**/*.{ts,js,json,md,html,css}\"",
47
52
  "lint": "bunx eslint .",
48
53
  "lint:fix": "bunx eslint . --fix",
49
- "typecheck": "bunx tsc --noEmit",
50
- "tree": "bun run scripts/tree.ts",
51
- "fetch-spec": "bun run scripts/fetch-openapi-spec.ts",
52
- "format": "bunx prettier --write \"**/*.{ts,js,json,md,html,css}\"",
53
54
  "prepare": "bunx husky",
54
- "inspector": "bunx mcp-inspector --config mcp.json --server git-mcp-server",
55
55
  "test": "bun test --config vitest.config.ts",
56
56
  "test:coverage": "bun test --coverage",
57
- "audit": "bun audit",
58
- "audit:fix": "bun audit --fix",
59
- "publish-mcp": "bun scripts/validate-mcp-publish-schema.ts"
57
+ "typecheck": "bunx tsc --noEmit",
58
+ "//--- Utilities": "",
59
+ "docs:generate": "bunx typedoc",
60
+ "fetch-spec": "bun run scripts/fetch-openapi-spec.ts",
61
+ "inspector": "bunx mcp-inspector --config mcp.json --server git-mcp-server",
62
+ "publish-mcp": "bun scripts/validate-mcp-publish-schema.ts",
63
+ "tree": "bun run scripts/tree.ts"
60
64
  },
61
65
  "resolutions": {
62
66
  "@hono/node-server": "1.19.5",
63
67
  "chrono-node": "2.9.0",
64
68
  "dotenv": "17.2.3",
65
- "hono": "4.9.10",
69
+ "hono": "4.9.12",
66
70
  "zod": "3.23.8",
67
71
  "typescript": "5.9.3"
68
72
  },
@@ -75,7 +79,7 @@
75
79
  "chrono-node": "^2.9.0",
76
80
  "dotenv": "^17.2.3",
77
81
  "fast-xml-parser": "^5.3.0",
78
- "hono": "^4.9.10",
82
+ "hono": "^4.9.12",
79
83
  "ignore": "^7.0.5",
80
84
  "jose": "^6.1.0",
81
85
  "js-yaml": "^4.1.0",
@@ -87,7 +91,7 @@
87
91
  "pino": "^10.0.0",
88
92
  "pino-pretty": "^13.1.2",
89
93
  "reflect-metadata": "^0.2.2",
90
- "repomix": "^1.6.1",
94
+ "repomix": "^1.7.0",
91
95
  "sanitize-html": "^2.17.0",
92
96
  "tslib": "^2.8.1",
93
97
  "tsyringe": "^4.10.0",
@@ -109,7 +113,7 @@
109
113
  "@eslint/js": "^9.37.0",
110
114
  "@types/bun": "^1.3.0",
111
115
  "@types/js-yaml": "^4.0.9",
112
- "@types/node": "^24.7.1",
116
+ "@types/node": "^24.7.2",
113
117
  "@types/node-cron": "^3.0.11",
114
118
  "@types/papaparse": "^5.3.16",
115
119
  "@types/sanitize-html": "^2.16.0",
@@ -129,23 +133,14 @@
129
133
  "typedoc": "^0.28.14",
130
134
  "typescript": "^5.9.3",
131
135
  "typescript-eslint": "8.46.0",
132
- "vite": "7.1.7",
136
+ "vite": "7.1.9",
133
137
  "vite-tsconfig-paths": "^5.1.4",
134
138
  "vitest": "^3.2.4"
135
139
  },
136
140
  "keywords": [
137
- "typescript",
138
- "MCP",
139
- "model-context-protocol",
140
- "mcp-server",
141
- "llm-tools",
142
- "git-tools",
143
- "LLM",
144
- "AI-integration",
145
- "server",
146
- "git",
147
- "version-control",
148
- "repository",
141
+ "ai-agent",
142
+ "ai-integration",
143
+ "automation",
149
144
  "branch",
150
145
  "cherry-pick",
151
146
  "clone",
@@ -153,8 +148,15 @@
153
148
  "devops",
154
149
  "diff",
155
150
  "fetch",
151
+ "git",
152
+ "git-tools",
153
+ "llm",
154
+ "llm-tools",
156
155
  "log",
156
+ "mcp",
157
+ "mcp-server",
157
158
  "merge",
159
+ "model-context-protocol",
158
160
  "pull",
159
161
  "push",
160
162
  "rebase",
@@ -163,9 +165,9 @@
163
165
  "stash",
164
166
  "status",
165
167
  "tag",
166
- "worktree",
167
- "ai-agent",
168
- "automation"
168
+ "typescript",
169
+ "version-control",
170
+ "worktree"
169
171
  ],
170
172
  "author": "cyanheads <casey@caseyjhand.com> (https://github.com/cyanheads/git-mcp-server#readme)",
171
173
  "license": "Apache-2.0",