loading…
Search for a command to run...
loading…
Provides secure access to local files from specified directories. Enables listing files, reading contents, and configurable file size and extension filtering.
Provides secure access to local files from specified directories. Enables listing files, reading contents, and configurable file size and extension filtering.
A Model Context Protocol (MCP) server that provides secure access to local files from specified directories.
Create a .env file in the same directory as app.py:
# Comma-separated list of allowed directories
ALLOWED_DIRECTORIES=/home/user/documents,/home/user/projects,/path/to/your/files
# Maximum file size in bytes (default: 10MB)
MAX_FILE_SIZE=10485760
# Allowed file extensions (comma-separated)
ALLOWED_EXTENSIONS=.txt,.md,.py,.js,.json,.yaml,.yml,.csv,.xml,.html,.css
Set environment variables directly:
export ALLOWED_DIRECTORIES="/home/user/documents,/home/user/projects"
export MAX_FILE_SIZE=10485760
export ALLOWED_EXTENSIONS=".txt,.md,.py,.js,.json,.yaml,.yml,.csv,.xml,.html,.css"
python app.py
ALLOWED_DIRECTORIES can be accessedThis error occurs when:
.env file with ALLOWED_DIRECTORIES setting.env in the script directory first, then current directoryUse the lf_get_config tool to check what configuration the server is actually using:
# This will show the current configuration
lf_get_config()
# Example configuration for a development environment
ALLOWED_DIRECTORIES=/home/alice/projects,/home/alice/documents,/tmp/safe-files
MAX_FILE_SIZE=52428800
ALLOWED_EXTENSIONS=.txt,.md,.py,.js,.json,.yaml,.yml,.csv,.xml,.html,.css,.log
pip install fastmcp
Выполни в терминале:
claude mcp add localfiles-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.