Back to Home
alacambra icon

git-mcp-scoped-repo-server

Verified Safe

by alacambra

Overview

Provides Claude with scoped file system access and Git operations within a specific directory of a Git repository, ensuring path traversal protection.

Installation

Run Command
node dist/index.js

Environment Variables

  • MCP_SCOPED_REPO_PATH
  • MCP_SCOPED_REPO_ROOT

Security Notes

The server implements robust path validation using `path.resolve` and `path.normalize` to prevent path traversal attacks, explicitly checking if resolved paths remain within the configured `basePath`. File system operations use `fs/promises`. Git commands are executed via `child_process.execFile` which is safer than `exec` as it avoids shell interpretation of arguments, with `cwd` explicitly set to the `repoRoot`. Delete operations are intentionally omitted. No 'eval' or other dynamic code execution is apparent. No hardcoded secrets were found. The server communicates via standard I/O (StdioServerTransport) which typically implies local process communication rather than exposing network ports by default, reducing external attack surface.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens1000
Stars0
Forks0
Last Update2025-11-28

Tags

MCPFile SystemGitSecurityScoped Access