DocFS
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DocFS show directory tree of src"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DocFS
DocFS is a Model Context Protocol (MCP) server that exposes read-only file system tools to MCP clients. It supports multiple root directories, filters paths using .gitignore, and caches file metadata in an in-memory LRU cache for faster access. Requires Node.js 18 or later.
Tools
dir_tree– view directory structure as a treelist_files– list directories and filessearch_files– search text across filesread_files– read file contents
Related MCP server: mcp-file-lens
Differences from a generic filesystem MCP server
DocFS trades the broader read/write capabilities of a standard filesystem server for a narrower, read-only feature set with extra safety and convenience features:
Read-only operations only
Limited to
dir_tree,list_files,search_files, andread_filesEnforces one or more user-specified root directories
Applies
.gitignorerules and caches file metadata using an in-memory LRU cache
Quick Start
Add the server to any MCP-compatible client by including this JSON in its configuration:
JSON:
{
"mcpServers": {
"docfs": {
"command": "npx",
"args": ["-y", "docfs", "--root", "/path/to/project"]
}
}
}Claude Code:
claude mcp add docfs -- npx -y docfs --root /path/to/project
Codex CLI:
[mcp_servers.docfs]
command = "npx"
args = ["-y", "docfs", "--root", "/path/to/project"]Replace /path/to/project with the directory you want to expose. Repeat --root to allow multiple directories.
Development
pnpm install
pnpm format
pnpm lint
pnpm typecheck
pnpm test
pnpm buildRun DocFS on demand with npx:
npx -y docfs --root /path/to/projectLicense
MIT
Available Tools
4 toolsdir_treeB
Returns a nested directory tree for the specified path
Inputs: path, maxDepth, includeHidden.
list_filesB
Lists files and directories in the configured root directories and returns JSON data
Inputs: path, pattern, maxDepth, recursive, +1 more.
read_filesB
Reads content from one or more files and returns JSON data
Inputs: path, paths, endLine, encoding, +3 more.
search_filesA
Searches for text content within files and returns JSON data
Inputs: query (required), maxDepth, wholeWord, maxResults, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
list_files and dir_tree both provide directory listings, which could cause confusion, but dir_tree is specifically a nested tree while list_files is a flat listing of files and directories. read_files and search_files are clearly distinct: one retrieves content, the other finds text within files.
Three tools follow the consistent verb_noun pattern: list_files, search_files, read_files. dir_tree breaks this pattern by using a noun phrase instead of a verb_noun structure, though it is still readable and follows underscore conventions.
Four tools form a well-scoped set for a read-only document/file access server. Each tool addresses a distinct core operation: listing, searching, reading, and showing structure, without unnecessary bloat.
The read-side workflows are well covered: discovering files, viewing directory structure, searching content, and reading file contents. Missing write/update/delete operations are likely out of scope for a read-only document server, but if the intent is a full file system, these would be notable gaps.
Related MCP Connectors
Browse and manage files in your Moxt AI workspace from any MCP client.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
A MCP server built for developers enabling Git based project management with project and personal…
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceA secure MCP server enabling read-only access and file search capabilities within a specified directory, while respecting .gitignore patterns.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides a flexible lens into directory structures and files, enabling LLM clients to efficiently navigate and understand codebases with minimal noise. It offers secure, gitignore-aware file access with tools like directory listing, file reading, and grep-like search.1MIT
- AlicenseBqualityDmaintenanceA secure, read-only MCP server for browsing and searching files in a specified directory with path traversal protection and .gitignore support.3MIT
- AlicenseNot gradedqualityDmaintenanceA professional MCP server that provides filesystem operations while automatically respecting .gitignore patterns, enabling efficient and token-friendly file access for Claude.MIT