MCP
utility
Filesystem
Read, write, and navigate files inside the MCP runner's sandbox — no credentials needed.
Requires Growth plan or above.
Enable Filesystem
Stateless — no credentials required. Toggle Filesystem on at /dashboard/connections. All file operations are scoped to a per-app sandbox directory.
Example
Write a generated report to disk so a later step can read it back.
app/api/save-report/route.ts
export async function POST() {const res = await fetch('https://leash.build/api/integrations/filesystem/write_file', {method: 'POST',headers: {'x-api-key': process.env.LEASH_API_KEY!,'content-type': 'application/json',},body: JSON.stringify({path: '/workspace/report.md',content: '# Weekly report\n\nRevenue is up 12% WoW.\n',}),})const { data } = await res.json()// data =>// {// path: '/workspace/report.md',// bytesWritten: 41,// created: true// }return Response.json(data)}
Available tools
read_text_file/read_file/read_media_file/read_multiple_files— read content.write_file/edit_file— write or in-place edit.create_directory/move_file— directory + path management.list_directory/list_directory_with_sizes/directory_tree— directory listings.search_files— recursive glob/regex search.get_file_info— file metadata.list_allowed_directories— directories the sandbox exposes.
Common gotchas
- Paths are sandboxed. Operations outside the directories returned by
list_allowed_directoriesare rejected withEACCES. - Storage is ephemeral. Files survive the lifetime of the MCP runner instance; treat the FS as scratch space, not durable storage.
- read_media_file returns base64. Decode before re-uploading or serving as binary.
See the Filesystem MCP server source for the underlying provider docs.
Other languages: see SDK overview.