Skip to main content
Glama

Filesystem MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_DIRNoSpecifies the directory where log files (combined.log, error.log) will be stored../logs
LOG_LEVELNoControls the verbosity of logs. Options: error, warn, info, http, verbose, debug, silly.info
FS_BASE_DIRECTORYNoIf set to an absolute path, all file operations performed by the server will be strictly confined within this directory and its subdirectories. This prevents the AI agent from accessing files outside the intended scope.

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
read_file

Reads the entire content of a specified file as UTF-8 text. Accepts relative or absolute paths. Relative paths are resolved against the session default set by set_filesystem_default.

set_filesystem_default

Sets a default absolute path for the current session. Relative paths used in other filesystem tools (like readFile) will be resolved against this default. The default is cleared on server restart.

write_file

Writes content to a specified file. Creates the file (and necessary directories) if it doesn't exist, or overwrites it if it does. Accepts relative or absolute paths (resolved like readFile).

update_file

Performs targeted search-and-replace operations within an existing file using an array of {search, replace} blocks. Preferred for smaller, localized changes. For large-scale updates or overwrites, consider using write_file. Accepts relative or absolute paths. File must exist. Supports optional useRegex (boolean, default false) and replaceAll (boolean, default false).

list_files

Lists files and directories within the specified directory. Optionally lists recursively and returns a tree-like structure. Includes an optional maxEntries parameter (default 50) to limit the number of items returned.

delete_file

Removes a specific file. Accepts relative or absolute paths.

delete_directory

Removes a directory. Optionally removes recursively. Accepts relative or absolute paths.

create_directory

Creates a directory. Optionally creates parent directories. Accepts relative or absolute paths.

move_path

Moves or renames a file or directory. Accepts relative or absolute paths for source and destination.

copy_path

Copies a file or directory to a new location. Accepts relative or absolute paths. Defaults to recursive copy for directories.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/filesystem-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server