naveensaini-ddun/mcp-filesystem
3.1
If you are the rightful owner of mcp-filesystem and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This server implements the Model Context Protocol (MCP) for performing filesystem operations, providing a structured and efficient way to manage files and directories.
Tools
8
Resources
0
Prompts
0
Filesystem MCP Server
Spring server implementing Model Context Protocol (MCP) for filesystem operations.
Features
- Read/write files
- Create/list/delete directories
- Move files/directories
- Search files
API
Tools
-
read_file
- Read complete contents of a file
- Input:
path(string) - Reads complete file contents with UTF-8 encoding
-
read_multiple_files
- Read multiple files simultaneously
- Input:
paths(string[]) - Failed reads won't stop the entire operation
-
write_file
- Create new file or overwrite existing (exercise caution with this)
- Inputs:
path(string): File locationcontent(string): File content
-
edit_file
- Make selective edits using advanced pattern matching and formatting
- Features:
- Line-based and multi-line content matching
- Whitespace normalization with indentation preservation
- Multiple simultaneous edits with correct positioning
- Indentation style detection and preservation
- Git-style diff output with context
- Preview changes with dry run mode
- Inputs:
path(string): File to editedits(array): List of edit operationsoldText(string): Text to search for (can be substring)newText(string): Text to replace with
dryRun(boolean): Preview changes without applying (default: false)
- Returns detailed diff and match information for dry runs, otherwise applies changes
- Best Practice: Always use dryRun first to preview changes before applying them
-
create_directory
- Create new directory or ensure it exists
- Input:
path(string) - Creates parent directories if needed
- Succeeds silently if directory exists
-
list_directory
- List directory contents using a structured format
- Input:
path(string)
-
move_file
- Move or rename files and directories
- Inputs:
source(string)destination(string)
- Fails if destination exists
-
search_files
- Recursively search for files/directories
- Inputs:
path(string): Starting directorypattern(string): Search patternexcludePatterns(string[]): Exclude any patterns. Glob formats are supported.
- Case-insensitive matching
- Returns paths relative to search path
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
Jar File
{
"mcpServers": {
"filesystem": {
"command": "java",
"args": [
"-jar",
"/path/to/jar/file.jar"
]
}
}
}