@andrebuzeli/git-mcp 7.0.0 → 7.0.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.
package/dist/server.js CHANGED
@@ -53,6 +53,11 @@ function createServer(opts) {
53
53
  const t = toolRegistry.get(tool);
54
54
  if (!t)
55
55
  return res.status(404).json((0, errors_1.createErrorResponse)('TOOL_NOT_FOUND', `Tool not found: ${tool}`));
56
+ // Enforce projectPath presence for all tool calls to avoid agents calling tools without context
57
+ // Many tools require projectPath; centralize the check so callers receive a clear validation error.
58
+ if (!params || !params.projectPath) {
59
+ return res.status(400).json((0, errors_1.createErrorResponse)('VALIDATION_ERROR', 'projectPath is required for all tool calls'));
60
+ }
56
61
  try {
57
62
  // TODO: validate params via JSON Schema
58
63
  const result = await t.handle(params ?? {}, { providerManager: opts.providerManager });
@@ -5,7 +5,7 @@ const errors_1 = require("../utils/errors");
5
5
  class GitArchiveTool {
6
6
  constructor() {
7
7
  this.name = 'git-archive';
8
- this.description = 'Repository archive operations';
8
+ this.description = 'Repository archive operations - local operations';
9
9
  }
10
10
  async handle(params, ctx) {
11
11
  const action = params.action;
@@ -9,7 +9,7 @@ const errors_1 = require("../utils/errors");
9
9
  class GitBackupTool {
10
10
  constructor() {
11
11
  this.name = 'git-backup';
12
- this.description = 'Repository backup and restore operations';
12
+ this.description = 'Repository backup and restore operations - local operations';
13
13
  }
14
14
  async handle(params, ctx) {
15
15
  const action = params.action;
@@ -9,7 +9,7 @@ const errors_1 = require("../utils/errors");
9
9
  class GitConfigTool {
10
10
  constructor() {
11
11
  this.name = 'git-config';
12
- this.description = 'Git configuration management';
12
+ this.description = 'Git configuration management - local Git operations';
13
13
  }
14
14
  async handle(params, ctx) {
15
15
  const action = params.action;
@@ -10,7 +10,7 @@ const errors_1 = require("../utils/errors");
10
10
  class GitFilesTool {
11
11
  constructor() {
12
12
  this.name = 'git-files';
13
- this.description = 'Read-only file operations for repositories';
13
+ this.description = 'Read-only file operations for repositories - local operations only';
14
14
  }
15
15
  async handle(params) {
16
16
  const action = params.action;
@@ -6,7 +6,7 @@ const repoHelpers_1 = require("../utils/repoHelpers");
6
6
  class GitIssuesTool {
7
7
  constructor() {
8
8
  this.name = 'git-issues';
9
- this.description = 'Issue management for GitHub and Gitea';
9
+ this.description = 'Issue management for GitHub and Gitea - automatic dual-provider execution';
10
10
  }
11
11
  async handle(params, ctx) {
12
12
  const action = params.action;
@@ -5,7 +5,7 @@ const errors_1 = require("../utils/errors");
5
5
  class GitPackagesTool {
6
6
  constructor() {
7
7
  this.name = 'git-packages';
8
- this.description = 'Package management operations';
8
+ this.description = 'Package management operations - not yet implemented';
9
9
  }
10
10
  async handle(params, ctx) {
11
11
  const action = params.action;
@@ -10,7 +10,7 @@ const repoHelpers_1 = require("../utils/repoHelpers");
10
10
  class GitRemoteTool {
11
11
  constructor() {
12
12
  this.name = 'git-remote';
13
- this.description = 'Remote repository management';
13
+ this.description = 'Remote repository management - automatic username detection from env vars';
14
14
  }
15
15
  async handle(params, ctx) {
16
16
  const action = params.action;
@@ -9,7 +9,7 @@ const errors_1 = require("../utils/errors");
9
9
  class GitStashTool {
10
10
  constructor() {
11
11
  this.name = 'git-stash';
12
- this.description = 'Stash management operations';
12
+ this.description = 'Stash management operations - local Git operations';
13
13
  }
14
14
  async handle(params, ctx) {
15
15
  const action = params.action;
@@ -9,7 +9,7 @@ const errors_1 = require("../utils/errors");
9
9
  class GitSyncTool {
10
10
  constructor() {
11
11
  this.name = 'git-sync';
12
- this.description = 'Repository synchronization operations';
12
+ this.description = 'Repository synchronization operations - local Git operations';
13
13
  }
14
14
  async handle(params, ctx) {
15
15
  const action = params.action;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrebuzeli/git-mcp",
3
- "version": "7.0.0",
3
+ "version": "7.0.2",
4
4
  "description": "Professional MCP server for Git operations - STDIO UNIVERSAL: works in ANY IDE (Cursor, VSCode, Claude Desktop). Fully autonomous DUAL execution (GitHub + Gitea APIs) with automatic username detection. All tools execute on BOTH providers simultaneously. No manual parameters needed.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",