mcp-filesystem
A Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools
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:
-
Install the MCP filesystem server binary: go install github.com/qiangmzsx/mcp-filesystem-server
-
Verify the binary is in your PATH:
- On Unix-like systems: which mcp-filesystem-server
- On Windows: where mcp-filesystem-server
-
(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 ./...
-
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
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go