Cover image
Try Now
2025-03-23

3 years

Works with Finder

1

Github Watches

1

Github Forks

0

Github Stars

Filesystem MCP Server

This is a Go implementation of the Model Context Protocol (MCP) server for filesystem operations, based on Anthropic's reference implementation from modelcontextprotocol/servers.

Significant differences from the reference implementation include:

  • The get_file_info and directory_tree commands return JSON data.
  • The search_files tool supports gitignore-style exclude patterns.

Installation

Install the server with the following command:

go install github.com/optistar/mcp-server-filesystem/cmd/mcp-server-filesystem@latest

The executable will be installed in the Go bin directory, which is typically ~/go/bin. If this directory is not in your PATH, you may need to add it.

You can also set the GOBIN environment variable to change the installation directory.

Testing

A full test suite is included to ensure the server behaves as expected.

  • The tests can be run normally with go test.
  • A tester command packages the test suite as an MCP client that can be used to test the MCP server command, or another MCP server implementation.

Tools

The server provides the following tools for interacting with the filesystem:

  • create_directory: Create a new directory or ensure a directory exists.
  • directory_tree: Get a recursive tree view of files and directories as a JSON structure.
  • edit_file: Make line-based edits to a text file.
  • get_file_info: Retrieve detailed metadata about a file or directory.
  • list_allowed_directories: Returns the list of directories that this server is allowed to access.
  • list_directory: Get a detailed listing of all files and directories in a specified path.
  • move_file: Move or rename files and directories.
  • read_file: Read the complete contents of a file from the file system.
  • read_multiple_files: Read the contents of multiple files simultaneously.
  • search_files: Recursively search for files and directories matching a pattern.
  • write_file: Create a new file or completely overwrite an existing file with new content.

Use the inspector for full details on each tool.

Other implementations

This repository is unrelated to mark3labs/mcp-filesystem-server.

License

The code in this repository is distributed under the MIT License.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • momi
  • Provides initial medical assessments and advice.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

  • zhaoyunxing92
  • 本项目是一个钉钉MCP(Message Connector Protocol)服务,提供了与钉钉企业应用交互的API接口。项目基于Go语言开发,支持员工信息查询和消息发送等功能。

  • justmywyw
  • Short and sweet example MCP server / client implementation for Tools, Resources and Prompts.

  • sligter
  • Lite-MCP-Client是一个基于命令行的轻量级MCP客户端工具

    Reviews

    3 (1)
    Avatar
    user_mjA2eKwT
    2025-04-16

    The mcp-server-filesystem by optistar is a fantastic tool for managing server files efficiently. I've been using it for a while now and it has significantly streamlined my workflow. The GitHub link provides all the necessary documentation and support, making it easy to get started. Highly recommend for anyone looking to enhance their server file management!