1. Conduid
  2. Developer Tools
  3. Fs MCP
MCP server · Developer Tools

Fs MCP

A Go MCP server enabling file system interactions.

Unclaimed last commit a year ago devtools
41Fair

Scored 3 days ago · breakdown

About Fs MCP

Fs MCP is an MCP server published by lealre in the Developer Tools category: a Go MCP server enabling file system interactions. It has been installed 0 times through Conduid.

The repository has 1 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues (0) before depending on it in production.

Install

Install
npx fs-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

Ask AI about Fs MCP

Powered by Claude · Grounded in docs

I know everything about Fs MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ·README presentNot checked yet.
  • ·License declaredNot checked yet.
  • ·Tests presentNot checked yet.
  • ·Dependencies pinnedNot checked yet.
  • ·No dynamic code executionNot checked yet.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.1.4v0.1.4
v0.1.3v0.1.3
v0.1.2v0.1.2
v0.1.1v0.1.1
v0.1.0v0.1.0

README

Filesystem MCP

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

It allows users to run using stdio or SSE server on a local machine.

Table of Contents

Installation

  1. Ensure that you have Go installed on your system. Use Go version 1.24.
  2. Run the following command to install the package using go install:
go install github.com/lealre/fs-mcp@latest
  1. 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.
  • The -t flag specifies the transport type. It can be either stdio or http (default is stdio).

Installing Locally by Cloning the Repository

  1. Clone the repository to your local machine:
git clone https://github.com/lealre/fs-mcp.git
  1. Navigate into the cloned directory:
cd fs-mcp
  1. Build the project:
go build
  1. Run the executable:
./fs-mcp -t http -dir /your/directory/path
  • This will run the server at http://localhost:8080.

Using Docker

This MCP can only be run in Docker using the SSE option. To do so, create a volume pointing to the directory you want to expose for file system operations.

You can pull the image from Docker Hub and run it as follows:

docker pull lealre/fs-mcp:latest

Or build the image from the cloned repository:

docker build -t fs-mcp .

Run the container, mapping your desired directory and port:

docker run -p 8080:8080 -v /your/directory/path:/baseDir lealre/fs-mcp -volume "/your/directory/path:/baseDir"
  • Replace /your/directory/path with the actual path you want to serve.
  • The -p flag maps your local machine's port to the Docker container's port.
  • The -v flag specifies the path to the base directory similarly in the --volume flag to ensure Docker has access to your files.

This setup will start the server at http://localhost:8080, serving the specified directory.

[!IMPORTANT] For this to work properly, ensure the paths in -v and -volume match exactly.

The container’s base folder volume name (/baseDir) can be customized, and the port can be changed using the -port flag (along with adjusting -p in Docker). Example:

docker run -p 8081:8081 -v /your/directory/path:/baseDir lealre/fs-mcp -volume "/your/directory/path:/baseDir" -port 8081

How to Use

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

fs-mcp -t http -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

To run it using stdio, just omit the flag -t.

Example of usage with PydanticAI in Python

Using SSE server

  • Run the MCP server:
fs-mcp -dir /your/directory/path
  • Create the Python client (using OpenAI in this case):
# script.py

import asyncio
import sys
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerSSE

server = MCPServerSSE('http://localhost:8080/sse')
agent = Agent('openai:gpt-4o', mcp_servers=[server])

async def main():
    if len(sys.argv) < 2:
        print("Usage: python script.py 'your prompt/query here'")
        sys.exit(1)

    query = sys.argv[1]

    async with agent.run_mcp_servers():
        result = await agent.run(query)

    print(result.output)

if __name__ == '__main__':
    asyncio.run(main())
  • Then you can run:
python script.py "List all the entries for the path in /your/directory/path/somesubpath"

Using stdio

  • Create the Python client (using OpenAI in this case):
# script.py

import asyncio
import sys
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerStdio

base_path = "/your/directory/path"
server = MCPServerStdio(
    'fs-mcp',
    args=['-dir', base_path]
)
agent = Agent('openai:gpt-4o', mcp_servers=[server])

async def main():
    if len(sys.argv) < 2:
        print("Usage: python script.py 'your prompt/query here'")
        sys.exit(1)

    query = sys.argv[1]

    async with agent.run_mcp_servers():
        result = await agent.run(query)

    print(result.output)

if __name__ == '__main__':
    asyncio.run(main())
  • Then you can run:
python script.py "List all the entries for the path in /your/directory/path/somesubpath"

Tool Descriptions

This project provides various tools to interact with the file system. Below are the descriptions of each tool:

  • listEntries: List entries at a given path. Parameters:

    • path (string, required): Path for which to list all entries.
    • depth (number, optional): Depth of the directory tree (default is 3).
  • readFromFile: Read the contents of a file at a given path. Parameters:

    • path (string, required): Path to the file to be read.
  • writeToFile: Create or overwrite a file with the given content. Parameters:

    • path (string, required): Path to the file to write to.
    • content (string, required): Content to write to the file.
  • getFileInfo: Retrieve file information including size, last modified time, detected MIME type, and file permissions. Parameters:

    • path (string, required): Path to the file to retrieve information from.
  • renamePath: Renames a file or directory to a new name. Parameters:

    • path (string, required): Path to the file or directory to be renamed.
    • newPathFinalName (string, required): New name for the file or directory (just the name, not the full path).
  • copyFileOrDir: Copies a file or directory to a new location. Parameters:

    • path (string, required): Path to the file or directory to be copied.
    • destination (string, required): Destination path where the file or directory will be copied.

This project uses the mcp-go library to implement core functionality.

README mirrored from the source repository 3 days ago. The original is authoritative.

Questions

About Fs MCP

How do I install Fs MCP?

Run npx fs-mcp, then add the server to your MCP client's configuration. Conduid has recorded 0 installs, so the command is known to work with current clients.

Is Fs MCP safe to use with an AI agent?

Its trust score is 41 out of 100 (fair). It passes 0 of 1 static security checks; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Fs MCP still maintained?

The last commit was a year ago, with 0 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.