Fileport

io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Oct 29, 2026

Sandboxed file access: read, write, edit and search in allowed dirs.

已驗證STDIO僅桌面檔案與儲存開發者工具

概覽

AI 產生的概覽

沙箱化的本機檔案系統伺服器,讓助理只在明確允許的目錄內讀取、寫入、編輯、移動與搜尋檔案。

可以做什麼
  • 讀取檔案:完整文字、開頭或結尾若干行、以 base64 回傳的媒體內容,或一次讀取多個檔案
  • 寫入文字檔、依完全相符的內容套用編輯(可先試跑預覽差異)、建立目錄
  • 列出目錄與大小、產生巢狀目錄樹、檢視檔案中繼資料
  • 在沙箱內移動或重新命名檔案,並以 glob 遞迴搜尋
  • 查詢目前生效的允許根目錄
適用情境
適合需要讓助理操作本機實際檔案的場合,例如閱讀文件、做精準修改或瀏覽專案資料夾,同時把存取範圍限制在指定目錄。若想要檔案存取能力又不想暴露整顆磁碟,這是合適的選擇。
執行需求
以 stdio 方式在本機執行,可透過 npx 使用 npm 套件,或使用 Docker 容器映像。允許的根目錄在 mcp 子命令後以參數提供,或透過 FILEPORT_ROOTS 環境變數設定;兩者皆未設定時,僅目前工作目錄為根目錄。未宣告需要帳號、金鑰或網路存取。
安裝前請注意
相關工具可在允許的根目錄內寫入、編輯、移動檔案並建立目錄,因此應把根目錄指向範圍較窄的資料夾,而非家目錄或系統目錄。存取控制完全取決於根目錄設定;根目錄之外一律拒絕,包括透過 .. 或符號連結逃逸的路徑。讀取媒體檔案會把檔案內容以 base64 形式交給助理。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Fileport,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

fileport

fileport gives an agent careful, sandboxed access to the local filesystem. It can read and write text, return media as base64, apply exact-match edits, walk directory trees, and search by glob — but only inside the directories you allow. Anything outside those roots is refused, including paths that escape through .. segments or symlinks.

Install

bash
npx @reneturcios/fileport list .

Or run the container image:

bash
docker run -i ghcr.io/cloudcorprecords/fileport

The container defaults to the MCP server. Pass CLI arguments to use it as a CLI instead.

Allowed directories

The sandbox is the whole point of this tool, so it is configured explicitly:

  • fileport mcp /data/docs /data/notes — the arguments after mcp are the allowed roots.
  • FILEPORT_ROOTS — a path-delimiter-separated list used when no arguments are given.
  • With neither set, the current working directory is the only root.

Every path a tool receives is canonicalised (symlinks resolved; new files resolved through their parent) and checked against the roots before any read or write happens.

CLI

bash
fileport list <path>     # entries as [FILE] / [DIR] linesfileport read <path>     # print a file's text contentsfileport mcp [dirs...]   # start the stdio MCP serverfileport --version

Exit codes: 0 on success, 1 when an operation fails (for example a path outside the allowed directories), 2 for usage errors. The list and read helpers resolve paths against the working directory.

MCP server

bash
npx -y @reneturcios/fileport mcp /path/to/allowed/dir

MCP client configuration:

json
{  "mcpServers": {    "fileport": {      "command": "npx",      "args": ["-y", "@reneturcios/fileport", "mcp", "/path/to/allowed/dir"]    }  }}

Tools

ToolInputWhat it returns
read_filepathThe file's full text contents.
read_text_filepath, optional head or tail (line counts, mutually exclusive)The file text, or just its first/last lines.
read_media_filepathBase64 image, audio, or blob content chosen by extension.
read_multiple_filespathsEach file's contents; a failure for one file is reported in-band and does not stop the others.
write_filepath, contentWrites the text, creating parent folders as needed.
edit_filepath, edits (oldText/newText pairs), optional dryRunApplies each exact-match replacement, or returns a diff-like preview when dryRun is set. Errors if an oldText is not found.
create_directorypathCreates the directory and any missing parents.
list_directorypathEntries as [FILE] name / [DIR] name lines.
list_directory_with_sizespath, optional sortBy (name or size)Entries with sizes; directories report their recursive total.
directory_treepath, optional excludePatternsA nested JSON tree of {name, type, children?} nodes.
move_filesource, destinationMoves or renames within the sandbox.
search_filespath, pattern, optional excludePatternsRecursive glob search over file names (**, *, ?).
get_file_infopathSize, created/modified/accessed times, type, and permissions.
list_allowed_directories—The roots currently in force.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no networknpm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

來源:README.md,提交 dacc9d0

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0最新Oct 29, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分