@cyanheads/git-mcp-server 2.12.0 → 2.14.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 +38 -38
- package/dist/index.js +1855 -2035
- 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
|
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
|
|
36
36
|
## Prompts
|
|
37
37
|
|
|
38
|
-
| Prompt | Description | Parameters
|
|
39
|
-
| :-------------- | :---------------------------------------------------------------------------------------- |
|
|
40
|
-
| **Git Wrap-up** | Workflow protocol for completing git sessions: review, document, commit, and tag changes. | `changelogPath`, `
|
|
38
|
+
| Prompt | Description | Parameters |
|
|
39
|
+
| :-------------- | :---------------------------------------------------------------------------------------- | :---------------------------- |
|
|
40
|
+
| **Git Wrap-up** | Workflow protocol for completing git sessions: review, document, commit, and tag changes. | `changelogPath`, `createTag`. |
|
|
41
41
|
|
|
42
42
|
## Getting started
|
|
43
43
|
|
|
@@ -83,20 +83,20 @@ For Streamable HTTP, set `MCP_TRANSPORT_TYPE=http` and `MCP_HTTP_PORT=3015`.
|
|
|
83
83
|
|
|
84
84
|
Built on [`mcp-ts-template`](https://github.com/cyanheads/mcp-ts-template).
|
|
85
85
|
|
|
86
|
-
| Feature | Details
|
|
87
|
-
| :--------------------------- |
|
|
88
|
-
| Declarative tools | Define capabilities in single, self-contained files. The framework handles registration, validation, and execution.
|
|
89
|
-
| Error handling | Unified `McpError` system for consistent, structured error responses.
|
|
90
|
-
| Authentication | Supports `none`, `jwt`, and `oauth` modes.
|
|
91
|
-
| Pluggable storage | Swap backends (`in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2`) without changing business logic.
|
|
92
|
-
| Observability | Structured logging (Pino) and optional auto-instrumented OpenTelemetry for traces and metrics.
|
|
93
|
-
| Dependency injection | Built with `tsyringe` for decoupled, testable architecture.
|
|
94
|
-
| Cross-runtime | Auto-detects Bun or Node.js and uses the appropriate process spawning method.
|
|
95
|
-
| Provider architecture | Pluggable git provider system. Current: CLI. Planned: isomorphic-git for edge deployment.
|
|
96
|
-
| Working directory management | Session-specific directory context for multi-repo workflows.
|
|
97
|
-
| Configurable git identity | Override author/committer info via environment variables, with fallback to global git config.
|
|
98
|
-
| Commit signing |
|
|
99
|
-
| Safety | Destructive operations (`git clean`, `git reset --hard`) require explicit confirmation flags.
|
|
86
|
+
| Feature | Details |
|
|
87
|
+
| :--------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
88
|
+
| Declarative tools | Define capabilities in single, self-contained files. The framework handles registration, validation, and execution. |
|
|
89
|
+
| Error handling | Unified `McpError` system for consistent, structured error responses. |
|
|
90
|
+
| Authentication | Supports `none`, `jwt`, and `oauth` modes. |
|
|
91
|
+
| Pluggable storage | Swap backends (`in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2`) without changing business logic. |
|
|
92
|
+
| Observability | Structured logging (Pino) and optional auto-instrumented OpenTelemetry for traces and metrics. |
|
|
93
|
+
| Dependency injection | Built with `tsyringe` for decoupled, testable architecture. |
|
|
94
|
+
| Cross-runtime | Auto-detects Bun or Node.js and uses the appropriate process spawning method. |
|
|
95
|
+
| Provider architecture | Pluggable git provider system. Current: CLI. Planned: isomorphic-git for edge deployment. |
|
|
96
|
+
| Working directory management | Session-specific directory context for multi-repo workflows. |
|
|
97
|
+
| Configurable git identity | Override author/committer info via environment variables, with fallback to global git config. |
|
|
98
|
+
| Commit signing | GPG/SSH signing (enabled by default) for commits, merges, rebases, cherry-picks, and tags. Silent fallback to unsigned on failure with `signed`/`signingWarning` fields in responses. |
|
|
99
|
+
| Safety | Destructive operations (`git clean`, `git reset --hard`) require explicit confirmation flags. |
|
|
100
100
|
|
|
101
101
|
## Security
|
|
102
102
|
|
|
@@ -111,26 +111,26 @@ Built on [`mcp-ts-template`](https://github.com/cyanheads/mcp-ts-template).
|
|
|
111
111
|
|
|
112
112
|
All configuration is validated at startup in `src/config/index.ts`. Key environment variables:
|
|
113
113
|
|
|
114
|
-
| Variable | Description
|
|
115
|
-
| :----------------------------- |
|
|
116
|
-
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`.
|
|
117
|
-
| `MCP_SESSION_MODE` | HTTP session mode: `stateless`, `stateful`, or `auto`.
|
|
118
|
-
| `MCP_RESPONSE_FORMAT` | Response format: `json` (LLM-optimized), `markdown` (human-readable), or `auto`.
|
|
119
|
-
| `MCP_RESPONSE_VERBOSITY` | Detail level: `minimal`, `standard`, or `full`.
|
|
120
|
-
| `MCP_HTTP_PORT` | HTTP server port.
|
|
121
|
-
| `MCP_HTTP_HOST` | HTTP server hostname.
|
|
122
|
-
| `MCP_HTTP_ENDPOINT_PATH` | MCP request endpoint path.
|
|
123
|
-
| `MCP_AUTH_MODE` | Authentication mode: `none`, `jwt`, or `oauth`.
|
|
124
|
-
| `STORAGE_PROVIDER_TYPE` | Storage backend: `in-memory`, `filesystem`, `supabase`, `cloudflare-kv`, `r2`.
|
|
125
|
-
| `OTEL_ENABLED` | Enable OpenTelemetry.
|
|
126
|
-
| `MCP_LOG_LEVEL` | Minimum log level: `debug`, `info`, `warn`, `error`.
|
|
127
|
-
| `GIT_SIGN_COMMITS` |
|
|
128
|
-
| `GIT_AUTHOR_NAME` | Git author name. Aliases: `GIT_USERNAME`, `GIT_USER`. Falls back to global git config.
|
|
129
|
-
| `GIT_AUTHOR_EMAIL` | Git author email. Aliases: `GIT_EMAIL`, `GIT_USER_EMAIL`. Falls back to global git config.
|
|
130
|
-
| `GIT_BASE_DIR` | Absolute path to restrict all git operations to a specific directory tree.
|
|
131
|
-
| `GIT_WRAPUP_INSTRUCTIONS_PATH` | Path to custom markdown file with workflow instructions.
|
|
132
|
-
| `MCP_AUTH_SECRET_KEY` | Required for `jwt` auth. 32+ character secret key.
|
|
133
|
-
| `OAUTH_ISSUER_URL` | Required for `oauth` auth. OIDC provider URL.
|
|
114
|
+
| Variable | Description | Default |
|
|
115
|
+
| :----------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------ | :---------- |
|
|
116
|
+
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
|
|
117
|
+
| `MCP_SESSION_MODE` | HTTP session mode: `stateless`, `stateful`, or `auto`. | `auto` |
|
|
118
|
+
| `MCP_RESPONSE_FORMAT` | Response format: `json` (LLM-optimized), `markdown` (human-readable), or `auto`. | `json` |
|
|
119
|
+
| `MCP_RESPONSE_VERBOSITY` | Detail level: `minimal`, `standard`, or `full`. | `standard` |
|
|
120
|
+
| `MCP_HTTP_PORT` | HTTP server port. | `3015` |
|
|
121
|
+
| `MCP_HTTP_HOST` | HTTP server hostname. | `127.0.0.1` |
|
|
122
|
+
| `MCP_HTTP_ENDPOINT_PATH` | MCP request endpoint path. | `/mcp` |
|
|
123
|
+
| `MCP_AUTH_MODE` | Authentication mode: `none`, `jwt`, or `oauth`. | `none` |
|
|
124
|
+
| `STORAGE_PROVIDER_TYPE` | Storage backend: `in-memory`, `filesystem`, `supabase`, `cloudflare-kv`, `r2`. | `in-memory` |
|
|
125
|
+
| `OTEL_ENABLED` | Enable OpenTelemetry. | `false` |
|
|
126
|
+
| `MCP_LOG_LEVEL` | Minimum log level: `debug`, `info`, `warn`, `error`. | `info` |
|
|
127
|
+
| `GIT_SIGN_COMMITS` | GPG/SSH signing for commits, merges, rebases, cherry-picks, and tags. Falls back to unsigned on failure (see response `signed`/`signingWarning`). | `true` |
|
|
128
|
+
| `GIT_AUTHOR_NAME` | Git author name. Aliases: `GIT_USERNAME`, `GIT_USER`. Falls back to global git config. | `(none)` |
|
|
129
|
+
| `GIT_AUTHOR_EMAIL` | Git author email. Aliases: `GIT_EMAIL`, `GIT_USER_EMAIL`. Falls back to global git config. | `(none)` |
|
|
130
|
+
| `GIT_BASE_DIR` | Absolute path to restrict all git operations to a specific directory tree. | `(none)` |
|
|
131
|
+
| `GIT_WRAPUP_INSTRUCTIONS_PATH` | Path to custom markdown file with workflow instructions. | `(none)` |
|
|
132
|
+
| `MCP_AUTH_SECRET_KEY` | Required for `jwt` auth. 32+ character secret key. | `(none)` |
|
|
133
|
+
| `OAUTH_ISSUER_URL` | Required for `oauth` auth. OIDC provider URL. | `(none)` |
|
|
134
134
|
|
|
135
135
|
## Running the server
|
|
136
136
|
|