MCP File System Server
by kvas-it
MCP File System Server
MCP server providing basic file system operations. Supports navigation, reading, writing, and analyzing files.
Tools
ls(path)
- List directory contentscd(path)
- Change working directoryread_file(path)
- Read file contentswrite_file(path, content)
- Write content to a filepatch_file(path, patches)
- Apply multiple search/replace operations to a filesummary(path)
- Generate summary of Python (.py) and Markdown (.md) files:- Python: Lists functions and classes
- Markdown: Lists headers (lines starting with #)
mkdir(path)
- Create directoryrm(path)
- Remove file or empty directoryrmdir(path)
- Remove directory and contents recursivelycp(src, dst)
- Copy file or directorymv(src, dst)
- Move file or directorygrep(pattern, path)
- Search for regex pattern in file(s)add_note(path, key, note)
- Add/update a note about a file/directoryremove_note(path, key)
- Remove a noteget_all_notes()
- Get all notes for all pathsls_many(paths)
- List contents of multiple directories, returns dict mapping paths to file listsread_files(paths)
- Read multiple files, returns dict mapping paths to contentssummarize(paths)
- Generate summaries for multiple files, returns dict mapping paths to summarieswork_on(path)
- Change to directory, list its contents, and get all notes. Useful for getting familiar with a project at the start of a chat
Roadmap
- Add linting and formatting via
ruff
(via subprocess). - Add
work_on
tool for faster init. - Add
find_files
function to search for files by name. - Add support for git operations (via subprocess).
- Add support for running tests (via pytest).
- Rename to
mcp-server-pydev
becuase it's a better fit. - Add
patch_files
function to apply multiple patches to multiple files.
Ideas
- Modular command loading (with reload) via
importlib
. We'd separate more opinionated commands (likesummary
,git
,ruff
,pytest
) from more generic ones (likels
). It would also become easier to add new commands without restarting the server. - Add recursive
ls
?
This server cannot be installed
This server provides an interface for performing basic file system operations such as navigation, reading, writing, and file analysis, allowing users to manage directories and files efficiently.