@andrebuzeli/git-mcp 5.8.1 → 5.8.3

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 (2) hide show
  1. package/dist/index.js +16 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -116,9 +116,12 @@ async function main() {
116
116
  terminal: false
117
117
  });
118
118
  rl.on('line', async (line) => {
119
+ let request;
120
+ let id = null;
119
121
  try {
120
- const request = JSON.parse(line);
121
- const { jsonrpc, id, method, params } = request;
122
+ request = JSON.parse(line);
123
+ id = request.id ?? null;
124
+ const { jsonrpc, method, params } = request;
122
125
  let response = { jsonrpc: '2.0', id };
123
126
  switch (method) {
124
127
  case 'initialize':
@@ -130,7 +133,7 @@ async function main() {
130
133
  },
131
134
  serverInfo: {
132
135
  name: 'git-mcp',
133
- version: '5.8.0'
136
+ version: '5.8.1'
134
137
  }
135
138
  };
136
139
  break;
@@ -216,6 +219,16 @@ async function main() {
216
219
  console.log(JSON.stringify(response));
217
220
  }
218
221
  catch (err) {
222
+ // Send error response with id if we have it
223
+ const errorResponse = {
224
+ jsonrpc: '2.0',
225
+ id: id,
226
+ error: {
227
+ code: -32700,
228
+ message: `Parse error: ${err.message || String(err)}`
229
+ }
230
+ };
231
+ console.log(JSON.stringify(errorResponse));
219
232
  if (process.env.DEBUG) {
220
233
  console.error('Error processing request:', err);
221
234
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrebuzeli/git-mcp",
3
- "version": "5.8.1",
3
+ "version": "5.8.3",
4
4
  "description": "Professional MCP server for Git operations - automatic dual-provider execution (GitHub + Gitea), no provider parameter needed, organized responses by provider, enhanced security and safety features",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",