Skip to content

Cannot find Git on Windows #37

@drolevar

Description

@drolevar

Git is installed and it's in the system path. And yet MCP can't find it:

{
	"level": 50,
	"time": 1765540389216,
	"env": "development",
	"version": "2.6.0",
	"pid": 52588,
	"requestId": "FUFHK-39BCW",
	"timestamp": "2025-12-12T11:53:09.196Z",
	"operation": "HandleToolRequest",
	"input": {
		"path": "D:\\Projects\\MyProj",
		"maxCount": 10,
		"oneline": false,
		"stat": false,
		"patch": false,
		"showSignature": false
	},
	"critical": false,
	"errorCode": -32603,
	"originalErrorType": "McpError",
	"finalErrorType": "McpError",
	"signal": {},
	"_meta": {
		"claudecode/toolUseId": "toolu_017CfasgJrWwA2x66LZiCvCL"
	},
	"toolName": "git_log",
	"errorData": {
		"cause": {
			"errno": -4058,
			"code": "ENOENT",
			"syscall": "spawn git",
			"path": "git",
			"spawnargs": [
				"log",
				"--format=%H\u001F%h\u001F%an\u001F%ae\u001F%at\u001F%s\u001F%b\u001F%P\u001E",
				"-n10"
			]
		},
		"signal": {},
		"_meta": {
			"claudecode/toolUseId": "toolu_017CfasgJrWwA2x66LZiCvCL"
		},
		"requestId": "FUFHK-39BCW",
		"timestamp": "2025-12-12T11:53:09.196Z",
		"toolName": "git_log",
		"input": {
			"path": "D:\\Projects\\MyProj",
			"maxCount": 10,
			"oneline": false,
			"stat": false,
			"patch": false,
			"showSignature": false
		},
		"operation": "HandleToolRequest",
		"originalErrorName": "McpError",
		"originalMessage": "Git command not found. Please ensure Git is installed and in your PATH.",
		"originalStack": "McpError: Git command not found. Please ensure Git is installed and in your PATH.\n    at mapGitError (file:///C:/Users/username/AppData/Local/Temp/bunx-2483025435-@cyanheads/git-mcp-server@latest/node_modules/@cyanheads/git-mcp-server/dist/index.js:168026:12)\n    at executeGitCommand (file:///C:/Users/username/AppData/Local/Temp/bunx-2483025435-@cyanheads/git-mcp-server@latest/node_modules/@cyanheads/git-mcp-server/dist/index.js:168160:11)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async executeLog (file:///C:/Users/username/AppData/Local/Temp/bunx-2483025435-@cyanheads/git-mcp-server@latest/node_modules/@cyanheads/git-mcp-server/dist/index.js:168606:23)\n    at async CliGitProvider.log (file:///C:/Users/username/AppData/Local/Temp/bunx-2483025435-@cyanheads/git-mcp-server@latest/node_modules/@cyanheads/git-mcp-server/dist/index.js:169717:20)\n    at async gitLogLogic (file:///C:/Users/username/AppData/Local/Temp/bunx-2483025435-@cyanheads/git-mcp-server@latest/node_modules/@cyanheads/git-mcp-server/dist/index.js:187544:18)\n    at async file:///C:/Users/username/AppData/Local/Temp/bunx-2483025435-@cyanheads/git-mcp-server@latest/node_modules/@cyanheads/git-mcp-server/dist/index.js:117016:22\n    at async file:///C:/Users/username/AppData/Local/Temp/bunx-2483025435-@cyanheads/git-mcp-server@latest/node_modules/@cyanheads/git-mcp-server/dist/index.js:186133:22\n    at async McpServer.executeToolHandler (file:///C:/Users/username/AppData/Local/Temp/bunx-2483025435-@cyanheads/git-mcp-server@latest/node_modules/@cyanheads/git-mcp-server/dist/index.js:185172:14)\n    at async file:///C:/Users/username/AppData/Local/Temp/bunx-2483025435-@cyanheads/git-mcp-server@latest/node_modules/@cyanheads/git-mcp-server/dist/index.js:185091:24",
		"rootCause": {
			"name": "McpError",
			"message": "Git command not found. Please ensure Git is installed and in your PATH."
		}
	}
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions