File System Utilities

by da-snap

1 stars
239 downloads
Not rated
GitHub

About

Provides a set of file system utilities for executing shell commands, displaying file contents, searching with regex, and writing to files through a Go-based server that communicates via stdio transport.

Details

Author
da-snap
Repository
da-snap/mcp-server-developer-tool
GitHub stars
1
Downloads
239
License
MIT License
Categories
Productivity, Developer Tools, Design, File Management, AI, Search, Infrastructure, Frontend
Tags
#integration

The server now includes a path restriction system to limit file operations to specified directories.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name File System Utilities
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @highlight/mcp-server

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository


You can configure allowed paths in several ways:

bash

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "file system utilities": {
            "env": {},
            "args": [
                "-y",
                "@highlight/mcp-server"
            ],
            "command": "npx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Macos

{
    "env": [],
    "args": [
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "npx"
}

Windows

{
    "env": [],
    "args": [
        "/c",
        "npx",
        "-y",
        "@highlight/mcp-server"
    ],
    "command": "cmd"
}

Modular MCP Server

This is a Go implementation of the Model Context Protocol (MCP) server using the github.com/metoro-io/mcp-golang library, restructured in a modular way.

Project Structure

mcp-server/
├── cmd/
│   └── mcp-server/
│       └── main.go           # Entry point
├── internal/
│   ├── config/
│   │   └── config.go         # Server configuration
│   ├── server/
│   │   ├── server.go         # MCP server implementation
│   │   └── server_test.go    # Server tests
│   ├── tools/
│   │   ├── tool.go           # Tool interface
│   │   ├── execute.go        # Execute shell command tool
│   │   ├── showfile.go       # Show file tool
│   │   ├── searchfile.go     # Search in file tool
│   │   └── writefile.go      # Write file tool
│   └── utils/
│       └── response.go       # Common response utilities
├── go.mod
├── go.sum
└── README.md

Building and Running

# Build the server
cd cmd/mcp-server
go build -o mcp-server

Run the server

./mcp-server

Security Features

The server now includes a path restriction system to limit file operations to specified directories.

Configuring Allowed Paths

You can configure allowed paths in several ways:

1. Using Command-line Flags

# Allow operations only in specific directories
./mcp-server --paths=/home/user/safe:/tmp/workspace

Explicitly deny specific paths even if within allowed paths

./mcp-server --paths=/home/user --deny-paths=/home/user/.ssh:/home/user/credentials

2. Using Environment Variables

# Set allowed paths
export MCP_ALLOWED_PATHS=/home/user/safe:/tmp/workspace

Set denied paths

export MCP_DENIED_PATHS=/home/user/.ssh:/home/user/credentials

Run the server

./mcp-server

3. Programmatically

You can also create a custom configuration programmatically:

cfg := config.DefaultConfig()
cfg.AddAllowedPath("/path/to/allow")
cfg.AddDeniedPath("/path/to/deny")

server, err := server.NewServerWithConfig(cfg)

Default Behavior

- If no paths are specified, the server defaults to allowing only the current working directory.
- Common sensitive directories like .git and .env are automatically added to the deny list.

Shell Command Security

For the execute_shell_command tool:

- Commands are restricted to a whitelist of common utilities
- Custom executable paths are checked against the allowed paths configuration
- Working directories must be within allowed paths

Adding New Tools

To add a new tool:

1. Create a new file in the internal/tools directory
2. Implement the Tool interface
3. Optionally implement the ConfigAware interface if your tool needs access to server configuration
4. Register the tool in cmd/mcp-server/main.go

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.