include/entropic/mcp/servers/git.h¶
include/entropic/mcp/servers/git.h
entropic::GitServer
Git MCP server for version control operations.
Inherits from entropic::MCPServerBase.
entropic::GitServer::GitServer(const std::filesystem::path &repo_dir, const std::string &data_dir)
Construct with repo directory and data dir.
A thin MCPServerBase subclass: build the eight tools, register them, and override only set_working_dir. Every tool runs against repo_dir_.
- Parameters
repo_dir— Repository root directory.data_dir— Path to bundled data directory.
entropic::GitServer::~GitServer() override
Destructor.
bool entropic::GitServer::set_working_dir(const std::string &path) override
Set working directory (repo root).
Re-targets every git tool at once so a sandbox swap does not require reconstructing the server.
- Parameters
path— New repo directory.
- Returns
- true on success.
- true — the re-target always succeeds.
const std::filesystem::path & entropic::GitServer::repo_dir() const
Get repo directory.
- Returns
- Repo root path.
- The repo root every git tool runs git -C against.