@cyanheads/git-mcp-server 2.5.7 → 2.6.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.
Files changed (3) hide show
  1. package/README.md +32 -50
  2. package/dist/index.js +54989 -32169
  3. package/package.json +42 -42
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-2.5.6-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.2-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.6.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--11--25-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.24.3-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
 
@@ -48,10 +48,10 @@ The server provides structured prompt templates that guide AI agents through com
48
48
 
49
49
  This server works with **both Bun and Node.js runtimes**:
50
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) |
51
+ | Runtime | Command | Minimum Version | Notes |
52
+ | ----------- | --------------------------------------- | --------------- | -------------------------- |
53
+ | **Node.js** | `npx @cyanheads/git-mcp-server@latest` | ≥ 20.0.0 | Universal compatibility |
54
+ | **Bun** | `bunx @cyanheads/git-mcp-server@latest` | ≥ 1.2.0 | Alternative runtime option |
55
55
 
56
56
  The server automatically detects the runtime and uses the appropriate process spawning method for git operations.
57
57
 
@@ -61,14 +61,14 @@ Add the following to your MCP Client configuration file (e.g., `cline_mcp_settin
61
61
 
62
62
  **Be sure to update environment variables as needed (especially your Git information!)**
63
63
 
64
- #### Using Bun (bunx)
64
+ #### Using npx (Node.js)
65
65
 
66
66
  ```json
67
67
  {
68
68
  "mcpServers": {
69
69
  "git-mcp-server": {
70
70
  "type": "stdio",
71
- "command": "bunx",
71
+ "command": "npx",
72
72
  "args": ["@cyanheads/git-mcp-server@latest"],
73
73
  "env": {
74
74
  "MCP_TRANSPORT_TYPE": "stdio",
@@ -84,14 +84,14 @@ Add the following to your MCP Client configuration file (e.g., `cline_mcp_settin
84
84
  }
85
85
  ```
86
86
 
87
- #### Using Node.js (npx)
87
+ #### Using bunx (Bun)
88
88
 
89
89
  ```json
90
90
  {
91
91
  "mcpServers": {
92
92
  "git-mcp-server": {
93
93
  "type": "stdio",
94
- "command": "npx",
94
+ "command": "bunx",
95
95
  "args": ["@cyanheads/git-mcp-server@latest"],
96
96
  "env": {
97
97
  "MCP_TRANSPORT_TYPE": "stdio",
@@ -141,11 +141,9 @@ Plus, specialized features for **Git integration**:
141
141
 
142
142
  ### Prerequisites
143
143
 
144
- - **Either** [Bun v1.2.0+](https://bun.sh/) **OR** [Node.js v20.0.0+](https://nodejs.org/)
144
+ - [Node.js v20.0.0+](https://nodejs.org/) (or [Bun v1.2.0+](https://bun.sh/) as an alternative)
145
145
  - [Git](https://git-scm.com/) installed and accessible in your system PATH
146
146
 
147
- > **Note**: Development uses Bun for the best experience, but the published package works with both Bun (`bunx`) and Node.js (`npx`).
148
-
149
147
  ### Installation
150
148
 
151
149
  1. **Clone the repository:**
@@ -162,14 +160,6 @@ cd git-mcp-server
162
160
 
163
161
  3. **Install dependencies:**
164
162
 
165
- **With Bun (recommended for development):**
166
-
167
- ```sh
168
- bun install
169
- ```
170
-
171
- **With Node.js:**
172
-
173
163
  ```sh
174
164
  npm install
175
165
  ```
@@ -203,21 +193,13 @@ All configuration is centralized and validated at startup in `src/config/index.t
203
193
 
204
194
  ### For End Users (via Package Manager)
205
195
 
206
- The easiest way to use the server is via `bunx` or `npx` (no installation required):
207
-
208
- **With Bun:**
209
-
210
- ```sh
211
- bunx @cyanheads/git-mcp-server@latest
212
- ```
213
-
214
- **With Node.js:**
196
+ The easiest way to use the server is via `npx` (no installation required):
215
197
 
216
198
  ```sh
217
199
  npx @cyanheads/git-mcp-server@latest
218
200
  ```
219
201
 
220
- Both commands work identically and are configured through environment variables or your MCP client configuration.
202
+ Configured through environment variables or your MCP client configuration. Bun users can alternatively use `bunx @cyanheads/git-mcp-server@latest`.
221
203
 
222
204
  ### Local Development
223
205
 
@@ -225,26 +207,26 @@ Both commands work identically and are configured through environment variables
225
207
 
226
208
  ```sh
227
209
  # One-time build
228
- bun rebuild
210
+ npm run rebuild
229
211
 
230
212
  # Run the built server
231
- bun start:http
213
+ npm run start:http
232
214
  # or
233
- bun start:stdio
215
+ npm run start:stdio
234
216
  ```
235
217
 
236
218
  - **Development mode with hot reload**:
237
219
 
238
220
  ```sh
239
- bun dev:http
221
+ npm run dev:http
240
222
  # or
241
- bun dev:stdio
223
+ npm run dev:stdio
242
224
  ```
243
225
 
244
226
  - **Run checks and tests**:
245
227
  ```sh
246
- bun devcheck # Lints, formats, type-checks, and more
247
- bun test # Runs the test suite
228
+ npm run devcheck # Lints, formats, type-checks, and more
229
+ npm test # Runs the test suite
248
230
  ```
249
231
 
250
232
  ### Cloudflare Workers
@@ -252,19 +234,19 @@ Both commands work identically and are configured through environment variables
252
234
  1. **Build the Worker bundle**:
253
235
 
254
236
  ```sh
255
- bun build:worker
237
+ npm run build:worker
256
238
  ```
257
239
 
258
240
  2. **Run locally with Wrangler**:
259
241
 
260
242
  ```sh
261
- bun deploy:dev
243
+ npm run deploy:dev
262
244
  ```
263
245
 
264
246
  3. **Deploy to Cloudflare**:
265
247
 
266
248
  ```sh
267
- bun deploy:prod
249
+ npm run deploy:prod
268
250
  ```
269
251
 
270
252
  ## 📂 Project Structure
@@ -283,7 +265,7 @@ bun deploy:prod
283
265
 
284
266
  ## 📤 Understanding Tool Responses
285
267
 
286
- This server follows MCP's dual-output architecture for all tools ([MCP Tools Specification](https://modelcontextprotocol.io/specification/2025-06-18/server/tools)):
268
+ This server follows MCP's dual-output architecture for all tools ([MCP Tools Specification](https://modelcontextprotocol.io/specification/2025-11-25/server/tools)):
287
269
 
288
270
  ### Response Format Options
289
271
 
@@ -325,7 +307,7 @@ When you invoke a tool through your MCP client, you see a **formatted summary**
325
307
 
326
308
  ### What the LLM Sees (Complete Structured Data)
327
309
 
328
- Behind the scenes, the LLM receives **complete structured data** as [content blocks](https://modelcontextprotocol.io/specification/2025-06-18/server/tools#tool-results) via the `responseFormatter` function. This includes:
310
+ Behind the scenes, the LLM receives **complete structured data** as [content blocks](https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-results) via the `responseFormatter` function. This includes:
329
311
 
330
312
  - All metadata (commit hashes, timestamps, authors)
331
313
  - Full file lists and change details (never truncated - LLMs need complete context)
@@ -340,7 +322,7 @@ Behind the scenes, the LLM receives **complete structured data** as [content blo
340
322
  - **Standard**: Balanced output with essential context (recommended)
341
323
  - **Full**: Complete data including all metadata and statistics
342
324
 
343
- **For Developers**: When creating custom tools, always include complete data in your `responseFormatter`. Balance human-readable summaries with comprehensive structured information. See [`AGENTS.md`](AGENTS.md) for response formatter best practices and the [MCP specification](https://modelcontextprotocol.io/specification/2025-06-18/server/tools) for technical details.
325
+ **For Developers**: When creating custom tools, always include complete data in your `responseFormatter`. Balance human-readable summaries with comprehensive structured information. See [`AGENTS.md`](AGENTS.md) for response formatter best practices and the [MCP specification](https://modelcontextprotocol.io/specification/2025-11-25/server/tools) for technical details.
344
326
 
345
327
  ## 🧑‍💻 Agent Development Guide
346
328
 
@@ -368,18 +350,18 @@ This server uses [Vitest](https://vitest.dev/) for testing.
368
350
  - **Run all tests:**
369
351
 
370
352
  ```sh
371
- bun test
353
+ npm test
372
354
  ```
373
355
 
374
356
  - **Run tests with coverage:**
375
357
 
376
358
  ```sh
377
- bun test:coverage
359
+ npm run test:coverage
378
360
  ```
379
361
 
380
362
  - **Run tests in watch mode:**
381
363
  ```sh
382
- bun test --watch
364
+ npm test -- --watch
383
365
  ```
384
366
 
385
367
  ## 🗺️ Roadmap
@@ -415,8 +397,8 @@ The provider system allows seamless switching between implementations based on d
415
397
  Issues and pull requests are welcome! If you plan to contribute, please run the local checks and tests before submitting your PR.
416
398
 
417
399
  ```sh
418
- bun run devcheck
419
- bun test
400
+ npm run devcheck
401
+ npm test
420
402
  ```
421
403
 
422
404
  ### Development Workflow
@@ -424,8 +406,8 @@ bun test
424
406
  1. Fork the repository
425
407
  2. Create a feature branch (`git checkout -b feature/amazing-feature`)
426
408
  3. Make your changes following the existing patterns
427
- 4. Run `bun devcheck` to ensure code quality
428
- 5. Run `bun test` to verify all tests pass
409
+ 4. Run `npm run devcheck` to ensure code quality
410
+ 5. Run `npm test` to verify all tests pass
429
411
  6. Commit your changes with conventional commits
430
412
  7. Push to your fork and open a Pull Request
431
413