Get the FREE Ultimate OpenClaw Setup Guide →

mcp-filesystem

A Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio qiangmzsx-mcp-filesystem-server mcp-filesystem-server /Users/username/Desktop /path/to/other/allowed/dir

How to use

The mcp-filesystem-server is a Go-based MCP (Model Context Protocol) server that exposes local filesystem data as an external data source for your LLM applications. By running this server, you enable your MCP client (for example Claude Desktop) to query and interact with files and directories on the host as if they were MCP resources. You can point the server at one or more allowed directories, and then reference those paths in your MCP configuration so the LLM can read or reason about files, metadata, and directory structures within those paths. This is useful for applications like document retrieval, code search, or file-based tool demonstrations where the LLM needs access to real-world file content while maintaining security boundaries through an explicit allowlist of directories.

How to install

Prerequisites:

  • Go installed and available on your PATH (go 1.20+ recommended).
  • Internet access to fetch the module when running go install.

Installation steps:

  1. Install the MCP filesystem server binary: go install github.com/qiangmzsx/mcp-filesystem-server

  2. Verify the binary is in your PATH:

    • On Unix-like systems: which mcp-filesystem-server
    • On Windows: where mcp-filesystem-server
  3. (Optional) Build from source if you prefer from repository: git clone https://github.com/qiangmzsx/mcp-filesystem-server.git cd mcp-filesystem-server go build -o mcp-filesystem-server ./...

  4. Prepare your Claude Desktop or MCP client configuration to reference the server (see mcp_config example to wire up allowed directories).

Additional notes

Notes and tips:

  • The server reads one or more directory paths that you explicitly allow. Only files within these paths are accessible to the MCP client.
  • Ensure the running user has read access to the configured directories.
  • You can extend the allowed directories by editing the mcp configuration in your client (e.g., claude_desktop_config.json) and reloading the MCP server if supported by your client.
  • This container is a Go implementation; there is no npm package involved. If you deploy elsewhere, ensure the binary name matches your build (mcp-filesystem-server).
  • MIT License applies to the server; respect any data access policy and your organization's security guidelines when exposing local filesystem data to LLMs.

Related MCP Servers

Sponsor this space

Reach thousands of developers