Git for local-first & privacy
For local-first and privacy work, the reference Git server is the third of three picks, and it keeps version-controlled code entirely on-machine. This Anthropic reference server exposes status, diffs, commits, branches, and history on a local repo path, so an agent works with your code without anything traveling to a third-party service.
It rounds out a local trio rather than leading it, but for the source-code slice it is the natural fit. Your repository stays where it is, and the agent operates on it in place.
How Git fits
git_status shows the working tree, git_diff_unstaged, git_diff_staged, and git_diff reveal changes and compare branches or commits, and git_log with git_show reads history, all without leaving the machine. git_add, git_commit, and git_reset manage staging and recording, git_create_branch and git_checkout handle branching, and git_branch lists branches. Every operation runs against the local repo path, so version-controlled work stays on-machine end to end.
The siblings cover the rest of a local workspace. The Filesystem server gives sandboxed read and write across allowed directories, the general-purpose base, and Obsidian works over a plain-Markdown notes vault on disk. Git is the version-control piece of that set; it does not browse arbitrary files or edit notes the way the other two do. Combine all three for a complete local workspace the agent can navigate with no external dependency beyond the model call itself.
Tools you would use
| Tool | What it does |
|---|---|
| git_status | Shows the working tree status. |
| git_diff_unstaged | Shows changes in the working directory not yet staged. |
| git_diff_staged | Shows changes that are staged for commit. |
| git_diff | Shows differences between branches or commits. |
| git_commit | Records staged changes to the repository with a message. |
| git_add | Adds file contents to the staging area. |
| git_reset | Unstages all staged changes. |
| git_log | Shows the commit logs with optional date filtering. |
| git_create_branch | Creates a new branch from an optional base. |
| git_checkout | Switches to the given branch. |
FAQ
- Does the Git server keep my code local?
- Yes. Its tools, git_status, git_diff, git_commit, git_log, and the branch operations, run against a local repo path. Nothing about your version-controlled code leaves the machine through this server, which is the point for a local-first setup.
- How does Git fit with Filesystem and Obsidian for local-first work?
- Git handles version-controlled code, Filesystem gives sandboxed read and write across allowed directories, and Obsidian works over a Markdown notes vault. Together they form a complete on-machine workspace; Git is the source-control piece of the trio.