Skip to main content
Glama
lalax-systems

file-extractor-mcp

๐Ÿ—‚๏ธ File Extractor MCP Server

License: MIT GitHub MCP Version

Professional MCP server for file management and GitHub repository automation - Extract, organize, and manage files between directories with AI-powered tools. Developed by Javier Gomez.

๐Ÿš€ Quick Start

Installation

git clone https://github.com/lalax-systems/file-extractor-mcp.git
cd file-extractor-mcp
npm install
npm run build

Configuration (Kilo Code)

Add to mcp_settings.json:

{
  "mcpServers": {
    "file-extractor": {
      "command": "node",
      "args": ["/path/to/file-extractor-mcp/build/index.js"],
      "disabled": false
    }
  }
}

Related MCP server: llm-file-operations-agent

๐Ÿ’ก Prompt Usage Examples

Example 1: Extract Photos

I need to backup all my photos. Please use the file-extractor MCP to:

Extract all JPG and PNG files from my camera folder to a backup directory:

- sourceDir: "/home/user/photos/camera"
- targetDir: "/home/user/backup/photos"
- pattern: "*.{jpg,png}"
- recursive: true
- move: false
- conflictResolution: "rename"

Example 2: Clean GitHub Repositories

I want to delete all my GitHub repositories except "file-extractor-mcp":

Use the delete_all_github_repositories_except tool with:
- token: "github_pat_..."
- username: "lalax-systems"
- keepRepository: "file-extractor-mcp"
- confirm: true

Example 3: Organize Downloads

My downloads folder is a mess. Please organize all files by extension:

Use the organize_files tool with:
- sourceDir: "/home/user/Downloads"
- organizeBy: "extension"

๐Ÿ”ง Available Tools

๐Ÿ“ File Management Tools

1. extract_files - Smart File Extraction

Extract files with pattern matching and conflict resolution.

Parameters:

  • sourceDir (string): Source directory path

  • targetDir (string): Target directory path

  • pattern (string, optional): File pattern (e.g., *.jpg, *.{txt,md})

  • recursive (boolean, optional): Search subdirectories (default: true)

  • move (boolean, optional): Move instead of copy (default: false)

  • conflictResolution (string, optional): "skip", "overwrite", or "rename" (default)

2. list_files - Directory Analysis

List files with filtering and detailed information.

Parameters:

  • directory (string): Directory to analyze

  • pattern (string, optional): Filter pattern

  • recursive (boolean, optional): Recursive listing (default: false)

3. organize_files - Automated Organization

Organize files by extension, date, or size.

Parameters:

  • sourceDir (string): Source directory

  • targetDir (string, optional): Target directory (default: same as source)

  • organizeBy (string, optional): "extension" (default), "date", or "size"

๐Ÿ™ GitHub Management Tools

4. list_github_repositories - Repository Listing

List all GitHub repositories for a user.

Parameters:

  • token (string): GitHub Personal Access Token (with repo scope)

  • username (string, optional): GitHub username (default: authenticated user)

5. delete_github_repository - Single Repository Deletion

Delete a specific GitHub repository.

Parameters:

  • token (string): GitHub Personal Access Token (with repo scope)

  • owner (string): Repository owner (user or organization)

  • repo (string): Repository name to delete

  • confirm (boolean): Must be true to proceed (safety measure)

6. delete_all_github_repositories_except - Bulk Repository Cleanup

Delete all repositories except one specified repository.

Parameters:

  • token (string): GitHub Personal Access Token (with repo scope)

  • username (string): GitHub username

  • keepRepository (string): Repository name to keep (not delete)

  • confirm (boolean): Must be true to proceed (safety measure)

โš ๏ธ Important Security Notes

GitHub Token Requirements:

  • Scope: repo (full control of private repositories)

  • Permissions: Delete repositories

  • Safety: Tokens should be kept secure and never shared

Deletion Safety Features:

  1. Confirmation Required: confirm: true parameter is mandatory

  2. Selective Deletion: Can keep specific repositories

  3. Error Handling: Detailed error messages for failed operations

  4. Audit Trail: Returns detailed results of all operations

๐Ÿ“Š Real-World Use Cases

๐Ÿ–ผ๏ธ Photo Management

# Backup vacation photos
sourceDir: "/media/camera/DCIM/2025-vacation"
targetDir: "/cloud/backup/photos"
pattern: "*.{jpg,raw,cr2}"
recursive: true

๐Ÿงน GitHub Account Cleanup

# Keep only the main project
token: "github_pat_..."
username: "lalax-systems"
keepRepository: "file-extractor-mcp"
confirm: true

๐Ÿ“ Project Archive

# Archive old project files
sourceDir: "/projects/old-project"
targetDir: "/archive/projects"
pattern: "*.{log,tmp,bak}"
move: true

๐Ÿ› ๏ธ Technical Features

  • โœ… Recursive Operations: Process nested directories automatically

  • โœ… Pattern Matching: Support for glob patterns (*.jpg, *.{txt,md})

  • โœ… Conflict Resolution: Skip, overwrite, or rename duplicate files

  • โœ… GitHub Integration: Full repository management via Octokit

  • โœ… Cross-Platform: Works on Windows, macOS, and Linux

  • โœ… MCP Standard: Compatible with any MCP client

  • โœ… TypeScript: Full type safety and modern development

  • โœ… Safety First: Confirmation required for destructive operations

๐Ÿ“‹ Compatibility

โœ… AI Agents

  • Kilo Code

  • Claude Desktop

  • Cursor AI

  • Any MCP-compatible AI agent

โœ… VSCode Forks

  • Cursor

  • Windsurf

  • Cline

  • Any editor with MCP support

๐Ÿ—๏ธ Project Structure

file-extractor-mcp/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ index.ts          # Core server implementation
โ”œโ”€โ”€ build/
โ”‚   โ””โ”€โ”€ index.js          # Compiled production code
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ USAGE.md          # Detailed usage guide
โ”‚   โ””โ”€โ”€ INSTALLATION.md   # Installation instructions
โ”œโ”€โ”€ package.json          # Dependencies and metadata
โ”œโ”€โ”€ tsconfig.json         # TypeScript configuration
โ””โ”€โ”€ README.md            # This documentation

๐Ÿš€ Getting Started

1. Clone & Build

git clone https://github.com/lalax-systems/file-extractor-mcp.git
cd file-extractor-mcp
npm install
npm run build

2. Configure Your Client

Kilo Code: Edit ~/.config/Kilo-Code/mcp_settings.json
Cursor: Edit ~/.cursor/mcp.json
Windsurf: Edit ~/.windsurf/mcp.json

3. Start Using

The tools will be available in your AI agent's prompt interface.

๐Ÿ” Advanced Examples

GitHub Token Creation

  1. Go to GitHub โ†’ Settings โ†’ Developer settings โ†’ Personal access tokens โ†’ Tokens (classic)

  2. Generate new token with repo scope (full control)

  3. Copy the token and use it in the tools

Bulk Repository Management

# List all repositories first
token: "github_pat_..."
username: "lalax-systems"

# Then delete all except one
token: "github_pat_..."
username: "lalax-systems"
keepRepository: "file-extractor-mcp"
confirm: true

Automated Backup Script

# Daily backup script
sourceDir: "/important/documents"
targetDir: "/backup/daily-$(date +%Y%m%d)"
pattern: "*"
recursive: true
move: false
conflictResolution: "rename"

๐Ÿ“ˆ Performance

  • Fast: Uses Node.js streams for efficient file operations

  • Reliable: Comprehensive error handling and logging

  • Scalable: Handles thousands of files efficiently

  • Safe: Non-destructive operations by default

  • Secure: GitHub operations require explicit confirmation

๐Ÿค Contributing

Contributions are welcome! Please see our Contributing Guidelines for details.

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Submit a pull request

๐Ÿ“„ License

MIT License - Copyright (c) 2026 Javier Gomez

See LICENSE for full details.

โš ๏ธ Warning

GitHub repository deletion is permanent and irreversible. Use the deletion tools with extreme caution. Always:

  1. Backup important repositories

  2. Double-check repository names

  3. Use the confirm: true parameter carefully

  4. Consider archiving instead of deleting

โญ Show Your Support

If this project helps you, please give it a star on GitHub!


Built with โค๏ธ by Javier Gomez
Making file and repository management smarter with AI

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

โ€“Maintainers
โ€“Response time
โ€“Release cycle
โ€“Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lalax-systems/file-extractor-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server