@andrebuzeli/git-mcp 5.8.1 → 5.8.2

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 +13 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -116,9 +116,11 @@ async function main() {
116
116
  terminal: false
117
117
  });
118
118
  rl.on('line', async (line) => {
119
+ let requestId = null;
119
120
  try {
120
121
  const request = JSON.parse(line);
121
122
  const { jsonrpc, id, method, params } = request;
123
+ requestId = id;
122
124
  let response = { jsonrpc: '2.0', id };
123
125
  switch (method) {
124
126
  case 'initialize':
@@ -130,7 +132,7 @@ async function main() {
130
132
  },
131
133
  serverInfo: {
132
134
  name: 'git-mcp',
133
- version: '5.8.0'
135
+ version: '5.8.1'
134
136
  }
135
137
  };
136
138
  break;
@@ -216,6 +218,16 @@ async function main() {
216
218
  console.log(JSON.stringify(response));
217
219
  }
218
220
  catch (err) {
221
+ // Always send a proper JSON-RPC error response, even for parse errors
222
+ const errorResponse = {
223
+ jsonrpc: '2.0',
224
+ id: requestId,
225
+ error: {
226
+ code: -32700,
227
+ message: `Parse error: ${err.message || String(err)}`
228
+ }
229
+ };
230
+ console.log(JSON.stringify(errorResponse));
219
231
  if (process.env.DEBUG) {
220
232
  console.error('Error processing request:', err);
221
233
  }
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.2",
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",