Filesystem

v2.0.0
io.github.domdomegg/filesystem-mcp Checked 22 hours ago Published 13 days ago

Read, create, and edit files.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

view View

View file contents or list directory. For files: - Returns content with line numbers (format: " N\t<content>") - Use view_range to read specific lines [start, end] (1-indexed, inclusive) - Large files are truncated at 16000 characters For directories: - Lists contents with type indicator (/ for directories) - Shows 2 levels deep by default - Ignores hidden files and node_modules

ParameterTypeDescription
path *stringAbsolute path to file or directory
view_rangearrayLine range [start, end] for text files (1-indexed, inclusive)

create Create

Create or overwrite a file with the specified content. - Creates parent directories if they don't exist - Overwrites existing files without warning - Use absolute paths

ParameterTypeDescription
content *stringContent to write to the file
path *stringAbsolute path where file will be created

str_replace String Replace

Replace an exact string in a file. - old_str must match exactly and be unique in the file - If old_str appears 0 times or more than once, the operation fails - If new_str is omitted, old_str is deleted - Use absolute paths

ParameterTypeDescription
old_str *stringExact string to find (must be unique)
path *stringAbsolute path to file
new_strstringReplacement string (omit to delete)

insert Insert

Insert text at a specific line in a file. - insert_line = 0: Insert at the beginning - insert_line = N: Insert after line N - insert_line = -1: Insert at the end - insert_text should typically end with a newline - Use absolute paths

ParameterTypeDescription
insert_line *integerLine number to insert after (0 = beginning, -1 = end)
insert_text *stringText to insert (should end with newline)
path *stringAbsolute path to file