Provides comprehensive Git repository operations including status checks, staging files, creating commits, pushing and pulling from remote repositories, viewing commit history, and showing file differences.
Enables file and Git operations within n8n workflows through MCP Client nodes and AI Agent Tools, using Server-Sent Events (SSE) transport for integration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP File & Git Manager Serverlist files in the current directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP File & Git Manager Server
A Model Context Protocol (MCP) server that provides file and git operations for n8n workflows.
Features
File Operations
read_file: Read file contents
write_file: Create or update files
list_files: List files and directories (with recursive option)
delete_file: Delete files or directories
create_directory: Create new directories
Git Operations
git_status: Check repository status
git_add: Stage files for commit
git_commit: Create commits
git_push: Push to remote repository
git_pull: Pull from remote repository
git_log: View commit history
git_diff: Show file differences
Search
search_in_files: Search for text patterns in files
Quick Start
Local Development
# Install dependencies
npm install
# Build TypeScript
npm run build
# Start server
npm startDocker
# Build image
docker build -t mcp-file-git-server .
# Run container
docker run -d \
--name mcp-file-git-server \
-p 3001:3001 \
-e PROJECT_ROOT=/workspace \
-v /path/to/your/project:/workspace:rw \
mcp-file-git-serverDocker Compose
Add to your docker-compose.yml:
services:
mcp-server:
build: ./mcp-file-git-server
container_name: mcp-file-git-server
environment:
- PROJECT_ROOT=/workspace
- PORT=3001
- NODE_ENV=production
ports:
- "3001:3001"
volumes:
- /path/to/your/project:/workspace:rw
- ~/.gitconfig:/root/.gitconfig:ro
- ~/.ssh:/root/.ssh:ro
networks:
- n8n-traefik_default
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
retries: 3Configuration
Environment Variables
PROJECT_ROOT: Path to project directory (default:/workspace)PORT: Server port (default:3001)
Endpoints
Health Check:
GET http://localhost:3001/healthSSE Endpoint:
POST http://localhost:3001/sse(for n8n-nodes-mcp)Message Endpoint:
POST http://localhost:3001/message
n8n Integration
Create MCP Credential in n8n
Go to Credentials → New
Search for "MCP"
Configure:
Transport:
SSE(Server-Sent Events)URL:
http://mcp-file-git-server:3001/sse
Save
Use in Workflow
Add MCP Client node
Select your MCP credential
Choose operation (List Tools, Call Tool, etc.)
Connect to AI Agent Tool via
ai_toolconnection
Testing
Test Health Endpoint
curl http://localhost:3001/healthTest SSE Endpoint
curl -X POST http://localhost:3001/sse \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'Troubleshooting
Permission Denied
Ensure the mounted project directory has correct permissions:
sudo chown -R $(id -u):$(id -g) /path/to/your/projectGit Not Working
Initialize git in the project directory:
docker exec -it mcp-file-git-server sh
cd /workspace
git init
git config user.name "Your Name"
git config user.email "your@email.com"
exitConnection Issues
Check Docker network connectivity:
# From n8n container
docker exec -it n8n-traefik-n8n-1 sh
wget -O- http://mcp-file-git-server:3001/health
exitLicense
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.