Install
openclaw skills install light-fs-mcpLightweight, security-scoped filesystem MCP server for AI agents. Provides workspace introspection, file read/write/append, directory listing, creation, and glob search — all strictly restricted to a configurable workspace root.
openclaw skills install light-fs-mcpUse this skill when an agent needs to:
get_workspace_info)Do not use when:
openclaw skills install light-fs-mcp
Then add to your agent config:
skills:
- clawhub:AIsofialuz/light-fs-mcp@0.1.3
tools:
- type: mcp
skill: AIsofialuz/light-fs-mcp
version: "0.1.3"
env:
AGENT_WORKSPACE: /path/to/your/workspace
{
"mcpServers": {
"light-fs-mcp": {
"command": "uv",
"args": ["run", "/absolute/path/to/light-fs-mcp/server.py"],
"env": {
"AGENT_WORKSPACE": "/Users/you/agent-workspace"
}
}
}
}
git clone https://github.com/AIsofialuz/light-fs-mcp
cd light-fs-mcp
uv sync
MCP_TRANSPORT=http MCP_PORT=8000 uv run server.py
# Endpoint: http://127.0.0.1:8000/mcp
uv sync
uv run server.py
MCP_TRANSPORT=http MCP_PORT=8000 uv run server.py
MCP_TRANSPORT=sse MCP_PORT=8001 uv run server.py
| Variable | Default | Purpose |
|---|---|---|
AGENT_WORKSPACE | ~/agent-workspace | Root folder — all operations are jailed here |
MCP_TRANSPORT | stdio | stdio, http, or sse |
MCP_HOST | 127.0.0.1 | Bind address (HTTP/SSE only) |
MCP_PORT | 8000 | Bind port (HTTP/SSE only) |
LOG_LEVEL | INFO | DEBUG, INFO, WARNING, or ERROR |
All paths are relative to the workspace root. Absolute paths and ../ traversal are rejected.
get_workspace_info() → dictReturns workspace root, file/folder counts, and disk usage. Call this first to orient yourself before any other operation.
get_workspace_info()
# → {
# "root": "/home/user/agent-workspace",
# "total_files": 12,
# "total_dirs": 3,
# "disk_usage_bytes": 48210,
# "disk_usage_human": "47.1 KB"
# }
read_file(path: str) → strRead the full UTF-8 text content of a file.
read_file("notes.txt") # → "Hello, agent!\nLine 2."
read_file("data/config.json") # → '{"key": "value"}'
write_file(path: str, content: str) → strWrite (or overwrite) a file. Parent directories are created automatically.
write_file("output/summary.md", "# Summary\n\nAll done.")
# → "✓ Written 22 bytes → output/summary.md [/home/user/agent-workspace/output/summary.md]"
⚠️ Overwrites without confirmation. Use
append_to_fileto add without erasing.
append_to_file(path: str, content: str) → strAppend text to a file. Creates the file if it doesn't exist. No automatic newline — include \n yourself.
append_to_file("run.log", "\n2026-01-01 task completed in 4.2s")
# → "✓ Appended 36 bytes → run.log [/home/user/agent-workspace/run.log]"
list_dir(path: str = ".") → list[str]List the immediate contents of a directory. Directories have a trailing /.
list_dir(".") # → ["data/", "log.txt", "output/", "report.md"]
list_dir("data") # → ["prices.csv", "users.json"]
create_directory(path: str) → strCreate a directory tree. Safe to call if it already exists.
create_directory("projects/alpha/v2")
# → "✓ Directory ready: projects/alpha/v2 [...]"
search_files(glob_pattern: str) → list[str]Glob-search across the entire workspace. Returns relative paths, capped at 200.
search_files("**/*.py") # → ["scripts/run.py", "src/agent.py"]
search_files("reports/*.md") # → ["reports/jan.md", "reports/feb.md"]
search_files("**/*") # → every file in the workspace
# 1. Orient yourself
info = get_workspace_info()
# 2. Check what's already there
files = list_dir(".")
# 3. Set up structure
create_directory("outputs/run-01")
# 4. Do work, write results
write_file("outputs/run-01/result.json", json_data)
append_to_file("agent.log", f"\n[{timestamp}] Started task: {task_name}")
# ... do work ...
append_to_file("agent.log", f"\n[{timestamp}] Completed in {elapsed}s")
# Find all CSVs, read each one
csv_files = search_files("**/*.csv")
for path in csv_files:
content = read_file(path)
# process...
write_file(path.replace(".csv", "_processed.csv"), result)
WORKSPACE; anything outside raises ValueError.subprocess, no os.system.AGENT_WORKSPACE per agent to avoid conflicts.get_workspace_info() first — it tells you the root path and what's already there.append_to_file for logs and incremental output to avoid accidental overwrites.search_files("**/*") to audit the workspace before a multi-step task.MCP_HOST=127.0.0.1 (default) unless you have network-level access controls.LOG_LEVEL=DEBUG during development to see every operation in stderr.AGENT_WORKSPACE path.# Install CLI
npm install -g clawhub
# Login
clawhub login --token YOUR_TOKEN --no-browser
# Publish
clawhub skill publish . --slug light-fs-mcp --version 0.1.3
# Anyone installs with:
openclaw skills install light-fs-mcp