Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/XxYouDeaDPunKxX/chatgpt-local-agent-mcp/llms.txt

Use this file to discover all available pages before exploring further.

The three Git tools expose the most common local Git operations without requiring shell access. git_status and git_diff are read-only and run at observe policy mode, so they are available in every server configuration except the most locked-down. git_commit mutates repository history and therefore requires destructive policy mode, even though it does not overwrite any tracked files on disk. All three require the mcp:git scope, which is granted independently of mcp:shell — you can give ChatGPT Git visibility without giving it a general-purpose shell.
These tools invoke the git binary from PATH. Git must be installed on the Windows machine running the MCP server.

git_status

Required scope: mcp:git
Policy mode: observe
Risk tags: repo-state
Returns the working tree status for a repository, equivalent to git status --short --branch. The output includes the current branch, tracked files with staged or unstaged modifications, and untracked files. Use this to understand the state of a repo before deciding what to stage or commit. Parameters:
ParameterTypeRequiredDescription
cwdstringRepository working directory.
Response fields:
FieldDescription
cwdThe resolved working directory used for the command.
stdoutRaw git status --short --branch output.
stderrAny error output from Git.
codeExit code (0 = success).
timedOutWhether the command was terminated due to timeout.
outputLimitExceededWhether output was truncated at the server’s byte limit.

git_diff

Required scope: mcp:git
Policy mode: observe
Risk tags: repo-content
Returns the diff for a repository, equivalent to git diff (unstaged changes) or git diff --cached (staged changes). The staged flag selects between these two modes. Use this to review what has changed before committing, or to verify that a patch was applied correctly. Parameters:
ParameterTypeRequiredDescription
cwdstringRepository working directory.
stagedbooleanWhen true, shows staged (cached) changes. Defaults to false.
Response fields:
FieldDescription
cwdThe resolved working directory used for the command.
stagedThe staged value that was used.
stdoutRaw diff output.
stderrAny error output from Git.
codeExit code (0 = success).
timedOutWhether the command was terminated due to timeout.
outputLimitExceededWhether output was truncated at the server’s byte limit.

git_commit

Required scope: mcp:git
Policy mode: destructive
Risk tags: commit, repo-mutation
Creates a Git commit with the provided message. By default, commits whatever is currently staged. The addAll flag runs git add -A before committing, staging all tracked and untracked changes. The allowEmpty flag permits a commit even when there is nothing staged. Requires confirm: true when dryRun: false. A dryRun: true call (the default) runs git status --short on the repository instead of committing, letting you see what would be included without mutating history. This is a safe way to verify staging state before proceeding.
git_commit requires destructive policy mode because it permanently mutates repository history, even though it does not overwrite working tree files. Treat it with the same caution as a file-write operation.
Parameters:
ParameterTypeRequiredDescription
messagestringCommit message. Must be at least 1 character.
cwdstringRepository working directory.
dryRunbooleanShow status instead of committing. Defaults to true.
confirmbooleanRequired when executing with dryRun: false.
addAllbooleanRun git add -A before committing. Defaults to false.
allowEmptybooleanAllow a commit with no staged changes. Defaults to false.
Response fields:
FieldDescription
auditQualityAlways "granular" — indicates the operation was journaled with full detail.
cwdThe resolved working directory used for the command.
dryRunWhether the call was a dry run.
confirmedThe value of the confirm parameter that was used.
stdoutRaw git commit (or git status) output.
stderrAny error output from Git.
codeExit code (0 = success).
timedOutWhether the command was terminated due to timeout.
outputLimitExceededWhether output was truncated at the server’s byte limit.

Typical ChatGPT-assisted commit workflow

The three Git tools compose naturally into a review-then-commit sequence. A typical workflow looks like this: Step 1 — check current status
{
  "tool": "git_status",
  "arguments": { "cwd": "C:\\Users\\you\\repos\\my-project" }
}
The response shows something like:
## main...origin/main
M  src/app.ts
?? src/utils/helpers.ts
Step 2 — review staged or unstaged changes
{
  "tool": "git_diff",
  "arguments": {
    "cwd": "C:\\Users\\you\\repos\\my-project",
    "staged": false
  }
}
The response includes the full unified diff of unstaged changes. To see what is already staged, pass "staged": true. Step 3 — dry-run the commit to confirm staging state
{
  "tool": "git_commit",
  "arguments": {
    "cwd": "C:\\Users\\you\\repos\\my-project",
    "message": "refactor: extract helper utilities",
    "dryRun": true,
    "confirm": false
  }
}
In dry-run mode, git_commit returns the current git status --short output so you can confirm what will be included. Step 4 — execute the commit
{
  "tool": "git_commit",
  "arguments": {
    "cwd": "C:\\Users\\you\\repos\\my-project",
    "message": "refactor: extract helper utilities",
    "dryRun": false,
    "confirm": true
  }
}
A code: 0 response confirms the commit was created. The stdout field contains the standard git commit output including the new commit SHA.
If you want ChatGPT to stage all changed files automatically, pass "addAll": true in step 4. This is equivalent to running git add -A followed by git commit -m "..." in a single tool call.

When you need more than these three tools

git_status, git_diff, and git_commit cover the most common local workflow. For operations beyond these — such as git log, git stash, git rebase, git push, git pull, branch management, or arbitrary git subcommands — use the shell tool with the mcp:shell scope enabled.
mcp:shell grants unrestricted command execution. Enable it only when you need Git operations that the dedicated git tools do not cover, and consider using workspace_guarded shell policy to limit the command working directory.

Build docs developers (and LLMs) love