optistar
MCP Serveroptistarpublic

mcp server filesystem

Filesystem MCP Server 是一个基于 Go 语言的用于文件系统操作的 MCP Server,支持文件/目录管理、JSON 输出以及带有排除模式的递归搜索。

Repository Info

0
Stars
1
Forks
0
Watchers
0
Issues
Go
Language
MIT License
License

About This Server

Filesystem MCP Server 是一个基于 Go 语言的用于文件系统操作的 MCP Server,支持文件/目录管理、JSON 输出以及带有排除模式的递归搜索。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

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.

Quick Start

1

Clone the repository

git clone https://github.com/optistar/mcp-server-filesystem
2

Install dependencies

cd mcp-server-filesystem
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Owneroptistar
Repomcp-server-filesystem
LanguageGo
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation