Lets Claude read, write, list, move and search files, restricted to configured allowed paths.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add filesystem-server-ai-yliu --env ALLOWED_DIRECTORIES='<ALLOWED_DIRECTORIES>' -- node /path/to/filesystem-server/build/index.js /path/to/allowed/dir1 /path/to/allowed/dir2~/.codex/config.toml
[mcp_servers.filesystem-server-ai-yliu]
command = "node"
args = ["/path/to/filesystem-server/build/index.js", "/path/to/allowed/dir1", "/path/to/allowed/dir2"]
env = { ALLOWED_DIRECTORIES = "<ALLOWED_DIRECTORIES>" }
# codex mcp add filesystem-server-ai-yliu --env ALLOWED_DIRECTORIES='<ALLOWED_DIRECTORIES>' -- node /path/to/filesystem-server/build/index.js /path/to/allowed/dir1 /path/to/allowed/dir2~/.cursor/mcp.json
{
"mcpServers": {
"filesystem-server-ai-yliu": {
"command": "node",
"args": [
"/path/to/filesystem-server/build/index.js",
"/path/to/allowed/dir1",
"/path/to/allowed/dir2"
],
"env": {
"ALLOWED_DIRECTORIES": "<ALLOWED_DIRECTORIES>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"filesystem-server-ai-yliu": {
"type": "stdio",
"command": "node",
"args": [
"/path/to/filesystem-server/build/index.js",
"/path/to/allowed/dir1",
"/path/to/allowed/dir2"
],
"env": {
"ALLOWED_DIRECTORIES": "<ALLOWED_DIRECTORIES>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"filesystem-server-ai-yliu": {
"command": "node",
"args": [
"/path/to/filesystem-server/build/index.js",
"/path/to/allowed/dir1",
"/path/to/allowed/dir2"
],
"env": {
"ALLOWED_DIRECTORIES": "<ALLOWED_DIRECTORIES>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"filesystem-server-ai-yliu": {
"command": "node",
"args": [
"/path/to/filesystem-server/build/index.js",
"/path/to/allowed/dir1",
"/path/to/allowed/dir2"
],
"env": {
"ALLOWED_DIRECTORIES": "<ALLOWED_DIRECTORIES>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"filesystem-server-ai-yliu": {
"command": "node",
"args": [
"/path/to/filesystem-server/build/index.js",
"/path/to/allowed/dir1",
"/path/to/allowed/dir2"
],
"env": {
"ALLOWED_DIRECTORIES": "<ALLOWED_DIRECTORIES>"
}
}
}
}Environment variables
ALLOWED_DIRECTORIES
Replace the placeholders with your own credentials and keep them out of version control.