Overview
What is BetterMCPFileServer?
BetterMCPFileServer is a reimagined Model Context Protocol (MCP) server for filesystem access that introduces privacy-preserving path aliases and an optimized, LLM-friendly API. It is designed for developers who want to let AI models (like Claude) interact with local files without exposing full system paths or usernames.
How to use BetterMCPFileServer?
Install from source by cloning the repository, running npm install and npm run build. Start the server with one or more alias:directory pairs, for example BetterMCPFileServer code:~/projects docs:~/documents. The server then exposes paths like code/src/main.js instead of /Users/username/projects/src/main.js.
Key features of BetterMCPFileServer
- Path aliases that hide real directory paths and usernames
- Only 6 API functions, reduced from 11, covering all file operations
- Unified search function for directory listings and glob-based searches
- LLM-optimized naming (camelCase, clear function purposes)
- Privacy-first design – no system paths exposed to AI models
- Strict filesystem boundaries enforced via configured aliases
Use cases of BetterMCPFileServer
- Giving an LLM secure, privacy-preserving access to local project files
- Managing files and folders through an AI assistant without exposing sensitive directory structures
- Simplifying file operations by reducing the number of tool options the LLM must choose from
- Using logical aliases (e.g., “docs”, “code”) instead of full absolute paths in AI conversations
FAQ from BetterMCPFileServer
How does path aliasing protect privacy?
BetterMCPFileServer maps user-defined aliases to real directories (e.g., code:~/projects). The LLM only sees aliased paths like projects/readme.md, never the full system path that might contain the username or sensitive folder names.
How many functions does the API expose?
The API exposes exactly 6 functions: writeFile, readFileContent, editFile, manageFile, manageFolder, and searchFilesAndFolders. This is reduced from the original 11 while maintaining full capability.
How do I install BetterMCPFileServer?
Currently the server must be installed from source: git clone, cd BetterMCPFileServer, npm install, npm run build. An npm package is planned but not yet available.
How do I start the server?
Run BetterMCPFileServer alias:directory [alias2:directory2 ...]. Provide at least one alias–path pair. For example: BetterMCPFileServer code:~/projects docs:~/documents.
What happens if I use an undefined alias?
The server returns an “Unknown alias” error. Only aliases defined at startup are allowed.