LucidLink

com.lucidlink由 lucidlink.com 發布v1.0.1更新於 Oct 29, 2026

Read, write, search, lock and audit files in LucidLink filespaces, plus workspace admin tools.

發布方自己的服務:lucid.page

已驗證STDIO僅桌面效率與工作流檔案與儲存

概覽

AI 產生的概覽

LucidLink MCP 讓助理在 LucidLink 檔案空間中讀取、寫入、搜尋、鎖定與稽核檔案,並可選擇提供工作區管理工具。

可以做什麼
在 LucidLink 檔案空間中讀取、寫入、搜尋、鎖定與稽核檔案,並可選擇提供工作區管理工具。
適用情境
當助理需要處理存放在 LucidLink 檔案空間中的檔案,或工作區管理員希望助理協助管理工作區、成員、群組與權限時使用。
執行需求
以 Python 套件形式透過 uvx 在本機執行(stdio)。需要 LucidLink 服務帳號權杖,放在 LUCIDLINK_TOKEN 中。LUCIDLINK_FILESPACE 指定首次使用時自動連結的檔案空間;若帳號只看到一個檔案空間可留空。管理類寫入工具需要 Node.js 22 以上。
安裝前請注意
LUCIDLINK_TOKEN 中的服務帳號權杖是可存取檔案空間資料的有效憑證,須妥善保密。寫入、鎖定與管理工具可能變更或刪除資料與權限。可將 LUCIDLINK_MCP_READ_ONLY 設為 1 只暴露讀取、搜尋與檢查工具,並用 LUCIDLINK_MCP_TOOLSETS 限制載入的工具集。

安裝

在 SourceWeft 中

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

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

工具

47

list_filespaces

List Filespaces

List filespaces visible to a service account. Returns a newline-separated list of ``name (id)`` entries, marking the ones currently linked. Call this first if you don't know which filespace to operate on. ``account`` selects a configured account (default: the current one; see ``list_accounts``).

輸入參數account

current_filespace

Current Filespace

Return the current account's linked filespaces (current one first), or a hint if none is linked.

無需輸入參數。

list_accounts

List Accounts

List the configured named accounts (service-account identities). Marks the current account (the one tools use when no ``account`` argument is given) and shows each account's login state and linked filespaces. Switch with ``use_account(name)``. Single-token setups have exactly one account named "default".

無需輸入參數。

use_account

Use Account

Switch the current account for subsequent tool calls. Filespace links (and their locks/subscriptions) are PER ACCOUNT and stay live across switches — switching back restores that account's context as you left it. Authentication happens lazily on the first filespace operation.

輸入參數name必填

register_account

Register Account

Register a minted credential as a named account for THIS session. Reads the bearer token from a credential file that ``mint_service_account_admin`` / ``create_identity_admin`` wrote (``~/.lucidlink/sa-<frag>.id-<frag>.token`` — the mint output prints the exact path); the token itself never appears in tool output. Session-scoped: gone on server restart — persist an account with ``lucidlink-mcp-setup --account NAME`` instead. Switch to it with ``use_account(name)``; authentication happens lazily on first use.

輸入參數name必填token_path必填

unregister_account

Unregister Account

Drop a session-registered account (the inverse of ``register_account``). Unlinks its filespaces and closes its client. Only accounts added via ``register_account`` can be dropped — configured accounts can't (they would come back on restart), and neither can the CURRENT account (switch away with ``use_account`` first). Typical teardown order: switch home → revoke/delete the credential → unregister.

輸入參數name必填

whoami

Whoami

Return the current agent's identity and session state. Includes service account name + id, workspace id, token status/expiry, and the currently-linked filespace (if any). Use it at the start of a multi-agent session so each agent knows which identity it is acting as.

無需輸入參數。

read_file

Read File

Read file content from the linked filespace. ``offset``/``length`` are byte counts (use ``read_lines`` for line ranges). With no ``length``, a file over the read cap is refused — pass a ``length`` slice; a ``length`` over the cap is clipped and the result says so. The cap is the ``readSizeCap`` config key. ``encoding``: ``auto`` (default) returns plain UTF-8 text for text content (``OK text N bytes:``) and base64 for binary (``OK base64 N bytes:``); ``text`` forces text (errors on binary); ``base64`` forces base64 (binary-safe round-trips).

輸入參數path必填lengthoffsetencoding

write_file

Write File

Write file content to the linked filespace. ``content`` is plain UTF-8 text by default; pass ``encoding='base64'`` with base64-encoded content to write binary bytes. Missing parent directories are created automatically; pass ``create_parents=false`` to error on a missing parent instead. ``exclusive=true`` holds a whole-file exclusive lock for the write (released on close) to coordinate with other clients writing the same file. ``sync=true`` (default) flushes to the hub immediately, so the write is durable and visible to other clients. ``sync=false`` skips that flush for fast bulk writes; you MUST call ``sync_filespace`` afterward or the unsynced writes are LOST when the session ends.

輸入參數path必填synccontent必填encodingexclusivecreate_parents

write_at

Write At

Overwrite bytes at a byte ``offset`` in an existing file, preserving the rest. Unlike ``write_file`` (which replaces the whole file), this patches in place: it writes the given bytes starting at ``offset`` and leaves every other byte untouched. It never truncates and never creates the file. Use it for fixed-layout edits — a header, a fixed-width record, a reserved placeholder. To coordinate the same range with other writers, take a ``lock_byte_range`` first, or pass ``exclusive=true`` for a one-call whole-file-locked patch. ``content`` is plain UTF-8 text by default; pass ``encoding='base64'`` with base64-encoded content to write binary bytes. Mirrors POSIX ``pwrite``: an ``offset`` past the end of the file zero-fills the gap, so a large ``offset`` grows the file with zero bytes. When a write grows the file the result says ``GREW file old->new bytes`` — for a fixed-layout patch that usually means the ``offset`` was wrong. ``sync=true`` (default) flushes to the hub immediately; ``sync=false`` skips the flush for bulk writes — you MUST call ``sync_filespace`` afterward or the unsynced writes are LOST when the session ends.

輸入參數path必填syncoffset必填content必填encodingexclusive

sync_filespace

Sync Filespace

Flush all pending writes to the hub, making them durable and visible to other clients. Call this after ``write_file(sync=false)`` batches; unsynced writes are lost if the session ends before a sync.

無需輸入參數。

list_files

List Files

List entries in a directory of the linked filespace. ``pattern`` is an fnmatch glob applied to entry names.

輸入參數pathpattern

get_entry

Get Entry

Return metadata for a single file or directory. ``ctime``/``mtime`` are epoch nanoseconds; the ``*_iso`` twins are the same instants in ISO 8601 UTC — paste them straight into ``read_audit_trail``'s ``time_range`` (e.g. ``'<ctime_iso>/'``) to scope an audit query to the entry's lifetime.

輸入參數path必填

create_directory

Create Directory

Create a directory, including any missing parent directories (``mkdir -p``). Succeeds if the directory already exists.

輸入參數path必填

delete_path

Delete Path

Delete a file or directory. For directories, pass ``recursive=true`` to delete non-empty ones. Hosts that honor tool annotations prompt before this fires.

輸入參數path必填recursive

truncate_file

Truncate File

Truncate or extend an existing file to exactly ``size`` bytes. ``size=0`` clears the file in place (keeps the path); a smaller size drops the tail; a larger size pads with zero bytes. Moves no file data, so it is cheap on large files. Use it to roll back an append, repair a partial write, or empty a file. Syncs to the hub after.

輸入參數path必填size必填

move_path

Move Path

Move/rename within the same filespace (atomic where possible).

輸入參數dst必填src必填

find_files

Find Files

Find files / directories by name (fnmatch glob). ``name_pattern``: shell-style glob, e.g. ``'*.py'``, ``'*report*'``. ``limit``: max paths returned (clamped to 1000). Walks the filespace tree under ``path_prefix``. Stops at the configured walk budget (default 5000 entries / 30s) and reports partial results.

輸入參數limitpath_prefixtype_filtername_pattern必填

grep_files

Grep Files

Search file CONTENTS via Python regex (re.search). ``pattern`` is a Python regex applied per line. ``include_pattern`` / ``exclude_pattern`` are fnmatch globs filtering filenames before reading; an excluded directory is skipped whole (``exclude_pattern='node_modules'`` never enters one). ``path_prefix`` itself is never excluded. Files larger than ``max_file_size_bytes`` are skipped. ``limit`` is clamped to 1000; the walk stops at the global budget and reports partial results. Walking the tree via the SDK is slower than native grep on a local FS — prefer narrow ``path_prefix`` and ``include_pattern`` for large filespaces.

輸入參數limitpattern必填path_prefixcase_sensitiveexclude_patterninclude_patternmax_file_size_bytes

tree

Tree

Map the directory hierarchy, grouped under full directory paths. ``ls -R`` style: every directory is named in full once, with its entries beneath it and a blank line between directories, so each path in the output is usable as-is — nothing has to be rebuilt from indentation. A directory shown with a trailing ``…`` was not expanded because ``max_depth`` stopped there; a header with nothing beneath it is an empty directory. ``max_entries_per_dir`` caps each listing; out-of-range arguments are clamped and the clamp is reported. ``exclude_pattern`` (fnmatch on entry names) hides matching entries and skips their subtrees entirely, so they cost nothing against the walk budget. The default hides the audit trail — query that with ``read_audit_trail``, or map it via ``tree(path="/.lucid_audit")``, which works because exclusion never applies to ``path`` itself. Pass null to map everything.

輸入參數pathmax_depthexclude_patternmax_entries_per_dir

read_lines

Read Lines

Read a line-range from a text file. Lines are 1-indexed and inclusive. Omit ``end_line`` to read to EOF. Useful for inspecting a specific section of a large file without pulling the whole thing across the wire.

輸入參數path必填end_linestart_line

edit_lines

Edit Lines

Replace lines [start_line, end_line] (inclusive, 1-indexed) with ``new_content``. ``new_content`` may be empty (deletes those lines) or contain newlines (multi-line replacement). A trailing newline is added to the file body if missing. Pass ``dry_run=true`` for a preview without writing. ``expected_content`` (recommended): the text you believe lines [start_line, end_line] currently contain. If the file has changed since you read it, the edit is refused and the actual content is shown — so you never clobber lines that drifted under you. In multi-agent filespaces, pair this with ``claim_file``. NOTE: the file is rewritten with LF line endings — CRLF (and unicode line separators) are normalized to ``\n`` across the whole file. Use ``search_replace`` to edit a CRLF file without changing its endings.

輸入參數path必填dry_runend_line必填start_line必填new_content必填expected_content

append_file

Append to File

Append to a file (creates if missing). ``content`` is plain UTF-8 text by default; pass ``encoding='base64'`` with base64-encoded content to append binary bytes. Use for log-style writes where you don't want to read-modify-write the whole file. Syncs to the hub after the append.

輸入參數path必填content必填encoding

search_replace

Search & Replace

sed-style find-and-replace within a single text file. ``regex=false`` does literal substring replace. ``regex=true`` treats ``find`` as a Python regex; ``\1`` etc. in ``replace`` reference groups. ``dry_run=true`` reports what would change without writing. Omit ``max_replacements`` to replace every match.

輸入參數find必填path必填regexdry_runreplace必填case_sensitivemax_replacements

copy_file

Copy File

Copy/duplicate/back up a file within the filespace. Streams ``src`` to ``dst`` in chunks through the daemon's encryption layer (ZK preserved end-to-end; memory stays bounded, so large media files are fine). Set ``overwrite=true`` to replace an existing destination.

輸入參數dst必填src必填overwrite

filespace_stats

Filespace Stats

Summarize the linked filespace: entry count, stored size, and external-file totals. For a files-vs-directories breakdown, use ``count_files`` (a tree walk).

無需輸入參數。

count_files

Count Files

Count files and directories under a path, optionally filtered by name pattern. Walks the tree like ``tree`` / ``find_files`` but only returns totals — useful for quick "how big is this directory?" checks before deciding to grep through it. Honors the global walk budgets. ``include_pattern``/``exclude_pattern`` are fnmatch globs on the entry NAME (``*.mp4``), not the path; exclude wins, and an excluded directory is skipped whole: nothing below it is counted or visited. ``path_prefix`` itself is never excluded.

輸入參數path_prefixexclude_patterninclude_pattern

lock_byte_range

Lock Byte Range

Acquire a byte-range lock on a file in the current filespace. ``mode``: ``exclusive`` excludes every other lock taker; ``shared``/ ``read`` (synonyms) admit other shared takers; ``write`` is a protected write lock. Locks are advisory: they exclude other lock takers (``lock_byte_range``, ``claim_file``, ``exclusive=true`` writes), never plain reads or writes, so every writer to be kept out must take the lock too. ``blocking=true`` waits until acquired, up to the daemon's IO timeout (then errors — call again to keep waiting); ``false`` returns immediately with ``BLOCKED`` when the range is held. Returns an opaque handle_id token. Pass it to ``unlock_byte_range`` to release (works even after switching filespace or account — the handle remembers where it lives). To modify the locked range, use ``write_at(path, offset, ...)`` for a positional patch (or ``write_file`` to replace the whole file).

輸入參數modepath必填length必填offset必填blocking

unlock_byte_range

Unlock Byte Range

Release a byte-range lock and close the underlying handle. Pass both ``offset`` and ``length`` to unlock that range, or neither to unlock every range on the handle — one without the other is rejected.

輸入參數lengthoffsethandle_id必填

claim_file

Claim File

Acquire an exclusive (or shared) lock over an ENTIRE file. Convenience over ``lock_byte_range`` — gets the file's current size and locks from offset 0. Useful when an agent just wants "let me edit this file safely without worrying about byte ranges." Returns an opaque handle_id; pass it to ``release_file`` when done. ``blocking=false`` returns ``BLOCKED`` instead of waiting. Advisory, like ``lock_byte_range``: it excludes other lock takers, not plain writes. Note: if the file grows after you claim it, the new bytes are NOT covered by your lock. For files that may grow during your edit, use ``lock_byte_range`` with an explicit, conservative length.

輸入參數modepath必填blocking

release_file

Release File

Release a previously claimed file (companion to ``claim_file``). Releases all byte-range locks held on the handle and closes it. Equivalent to ``unlock_byte_range(handle_id)`` with no offset/length.

輸入參數handle_id必填

list_locks_held

List Locks Held

List byte-range locks currently held by THIS MCP process. Shows handle_id, filespace, path, byte range, mode, and how long held — across every linked filespace and account. Process-local — locks held by other agents (other MCP servers / other clients) won't appear here, and no API exists to enumerate them. To probe whether someone else holds a lock, attempt a non-blocking acquire (``blocking=false``): a ``BLOCKED`` answer means it's held. The audit trail records file operations, not lock events.

無需輸入參數。

read_audit_trail

Read Audit Trail

Query the linked filespace's audit trail (NDJSON under .lucid_audit/). Events are returned NEWEST FIRST; ``limit`` keeps the newest N, so "what changed last?" is one call: mode=search, a small limit, and optionally action=FileWritten / FileCreate to exclude reads. Note a recording-to-readable LAG: an event can take a short while to appear here after the operation. Don't treat a just-made change being absent as "not recorded" — re-read after a moment. Mode extras: user_activity needs user, file_history needs path_prefix, aggregate needs group_by — and ignores limit (top 50 groups). path_prefix scopes to one entry: the exact path or anything under it as a directory (/reports does not match /reports-archive). time_range accepts '24h' / '7d' / '30m' or an ISO range 'from/to' with either side omittable ('2026-01-01/2026-02-01', '2026-07-01/'); range ends are midnight-UTC of the named day, so an inclusive "through June" range ends at 07-01. Epoch seconds/millis/ micros/nanos also work as range endpoints. Pass time_range=None for no time filter — '' is rejected, as is path_prefix=''. SCOPING FOR SPEED: logs are month-partitioned and pruned by time_range BEFORE any I/O — a tight range skips whole months of reading. For one existing file's history, call get_entry(path) first and start the range at creation: time_range='<ctime_iso>/'. Its mtime_iso is a safe UPPER bound only for content-write history (moves/renames do not bump mtime; reads never do) — for move/delete/read history leave the range open-ended. Deleted files have no get_entry: fall back to path_prefix (or action=FileDelete) over an explicit wider range. Renames change entry_path, so path_prefix misses pre-rename history regardless of time scoping.

輸入參數modeuserlimitactiongroup_bytime_rangepath_prefix

verify_token

Verify Token

Check whether the CURRENT account's LucidLink token is accepted. Follows use_account switches. Does NOT require the daemon. Single HTTPS round-trip (~0.5s). Returns a one-line status; a missing or rejected token is an error carrying a hint to fix it.

無需輸入參數。

subscribe_changes

Subscribe to Changes

Open a cursor on audit events under a path prefix of the CURRENT filespace. Returns a ``subscription_id``. Call ``poll_changes(subscription_id=...)`` to retrieve events newer than the last poll — the cursor stays bound to this filespace even if you switch to another one. Call ``unsubscribe_changes`` to stop; unlinking the filespace drops it. PULL-based: nothing arrives between your ``poll_changes`` calls, and the FIRST poll replays up to an hour of pre-subscribe history rather than starting empty. ``poll_interval`` is an advisory pacing hint only.

輸入參數path_prefixpoll_interval

poll_changes

Poll Changes

Return audit events newer than the last poll, oldest-first. Rows are raw audit records: ONE user-visible action can fan out to many (a macOS safe-save of a single file emits create/write/move/move/delete across a temp sibling). Read the sequence, don't count it. ``limit`` clamps to 200; anything over stays queued for the next poll.

輸入參數limitsubscription_id必填

unsubscribe_changes

Unsubscribe from Changes

Close a subscription's cursor (on whichever filespace it lives).

輸入參數subscription_id必填

list_data_stores

List Data Stores

List data stores registered on the linked filespace, with their kind.

無需輸入參數。

update_external_url

Update External URL

Repoint an existing HTTP/HTTPS external-file link to a new URL. ``path`` is an existing link created by ``link_external_url``. The new URL must serve the same content (the daemon refuses a different size): this refreshes an expired or moved URL, it does not swap the content.

輸入參數path必填new_url必填

list_external_files

List External Files

Paginated listing of files linked from a data store. Pass the ``cursor`` from the output's "more available" note to fetch the next page.

輸入參數limitcursordata_store_name必填

register_data_store

Register Data Store

Register a data store on the linked filespace. ``kind="s3"`` links S3 objects (link_external_file). Its credentials are NOT passed to this tool: an operator stores them in ~/.lucidlink/data-stores.json (mode 0600), keyed by store name, and this reads the entry for ``name``, so S3 keys never enter the conversation. ``kind="http_link"`` groups URL links (link_external_url) on filespace format 3.8 and newer and needs nothing. Returns identity only, never credentials.

輸入參數kind必填name必填

unregister_data_store

Unregister Data Store

Remove (unregister) a data store from the linked filespace. Inverse of ``register_data_store``, either kind. Refused while any external file is still linked from the store: list them with list_external_files and remove them with unlink_external_file first. The S3 objects and URL targets themselves are never touched.

輸入參數name必填

版本歷史

2
  1. v1.0.1最新Oct 25, 2026
  2. v1.0.0Oct 20, 2026

評分

已滿足適用檢查項的 65%

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

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分

    請宣告包含 README 的 GitHub 儲存庫,或在 OAuth 受保護資源後設資料中提供 resource_documentation。

  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Lucid 整合