MCP File & Git Manager Server

MCP File & Git Manager Server

Provides file system operations (read, write, list, delete) and Git repository management (status, commit, push, pull, diff) for n8n workflows through the Model Context Protocol.

Category
Visit Server

README

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 start

Docker

# 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-server

Docker 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: 3

Configuration

Environment Variables

  • PROJECT_ROOT: Path to project directory (default: /workspace)
  • PORT: Server port (default: 3001)

Endpoints

  • Health Check: GET http://localhost:3001/health
  • SSE Endpoint: POST http://localhost:3001/sse (for n8n-nodes-mcp)
  • Message Endpoint: POST http://localhost:3001/message

n8n Integration

Create MCP Credential in n8n

  1. Go to CredentialsNew
  2. Search for "MCP"
  3. Configure:
    • Transport: SSE (Server-Sent Events)
    • URL: http://mcp-file-git-server:3001/sse
  4. Save

Use in Workflow

  1. Add MCP Client node
  2. Select your MCP credential
  3. Choose operation (List Tools, Call Tool, etc.)
  4. Connect to AI Agent Tool via ai_tool connection

Testing

Test Health Endpoint

curl http://localhost:3001/health

Test 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/project

Git 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"
exit

Connection 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
exit

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured