Filesystem SSE Server in Go

by lealre

307 downloads
Not rated
GitHub

About

A Go MCP server enabling file system interactions.

Details

Author
lealre
Downloads
307
Categories
Other

- List directory entries with configurable depth.
- Read file contents from a given path.
- Create or overwrite files with specified content.
- Retrieve file info (size, modified time, MIME type, permissions).
- Rename files or directories.
- Copy files or directories to a new location.

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 Filesystem SSE Server in Go
    Command (node, npx, python, etc.)

    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

Install using go install github.com/lealre/fs-mcp@latest (Go 1.24 required), then start the server with fs-mcp -dir /your/directory/path. The server listens on http://localhost:8080 (or a custom port via -port flag) and exposes an SSE endpoint at /sse. You can then connect any MCP client (e.g., a PydanticAI agent) to this endpoint.

Claude Desktop / Cursor

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

{
    "mcpServers": {
        "filesystem sse server in go": {
            "fs-mcp": {
                "command": "python",
                "args": [
                    "script.py",
                    "List all the entries for the path in /your/directory/path/somesubpath"
                ]
            }
        }
    }
}

McpServers

{
    "fs-mcp": {
        "command": "python",
        "args": [
            "script.py",
            "List all the entries for the path in /your/directory/path/somesubpath"
        ]
    }
}

Filesystem SSE Server in Go

This repository provides a server implementation to offer a suite of tools for interacting with the file system, such as listing directory entries, reading and writing files, retrieving file information, renaming, and copying files or directories.

It specifically runs an SSE server on a local machine.

Table of Contents

- Installation
- Installing Locally by Cloning the Repository
- How to Use
- Tool Descriptions

Installation

1. Ensure that you have Go installed on your system (using Go version 1.24).
2. Run the following command to install the package using go install:

go install github.com/lealre/fs-mcp@latest

3. Run the help command:

fs-mcp -h

- The -dir flag specifies the base directory that the server will serve. It is required.
- The -port flag specifies the port on which the server will listen. It is optional, with the default being 8080.

Installing Locally by Cloning the Repository

1. Clone the repository to your local machine:

git clone https://github.com/lealre/fs-mcp.git

2. Navigate into the cloned directory:

cd fs-mcp

3. Build the project:

go build

4. Run the executable:

./fs-mcp

- This will run the server, and you can specify options such as -dir and -port with the command.

How to Use

Once the installation is complete, you can use the server by running:

fs-mcp -dir /your/directory/path

This will start the MCP server at http://localhost:8080, restricting the file system operations to be under this specific path.

For now, it only accepts one path to the server.

To change the server port, you can pass it as a flag:

fs-mcp -dir /your/directory/path -port 3000

Example of usage with PydanticAI in Python

- Run the MCP server:

fs-mcp -dir /your/directory/path

- Create the Python client (using OpenAI in this case):

```python

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.