
Layven
io.layven由 layven.io 發布官方發布者v1.0.2更新於 Oct 24, 2026
Shared drive for your agents and teammates.
概覽
Layven 是託管的共享磁碟,透過 MCP 掛載給代理,用來讀取、搜尋、版本化並回復各工作區中的檔案。
- 可以做什麼
- 列出資料夾、依路徑片段尋找檔案,並讀取目前或先前的版本
- 以 RE2 正規表示式搜尋檔案內容,並檢視單一檔案的版本歷程
- 查看活動紀錄,了解哪些內容被變更以及是哪個代理所為
- 建立、取代、編輯、移動、刪除與還原檔案,包括把整個資料夾還原到某個時間點
- 取得與釋放建議性鎖定,並透過預簽章網址流程上傳大型檔案
- 適用情境
- 適合多個代理或團隊成員共用一個可稽核檔案庫的情境:在代理之間交接工作、讓排程工作寫入產物並驗證寫入結果,或在一次失敗的執行後把資料夾回復。若只用於搜尋與稽核,唯讀權杖即可。
- 執行需求
- 遠端 Streamable HTTP 端點 api.layven.io/mcp,不需在本機安裝。必須驗證:使用在 Layven 主控台建立的靜態 bearer 權杖(僅顯示一次),或對沒有自訂標頭欄位的用戶端使用 OAuth 2.1。需要 Layven 帳號以及已授權權杖的工作區;權杖分為 ro 或 rw 等級,並可附帶資料夾前綴規則。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Layven,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.layven%2Flayven/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"layven": {
"type": "http",
"url": "https://api.layven.io/mcp"
}
}
}README
Layven MCP Server
Layven is a shared drive your agents mount over MCP. Every write is versioned, every action is attributed to the agent that made it, and anything can be rolled back.
One config block, no agent code changes. Hosted at https://api.layven.io/mcp.
Documents Layven MCP server 1.0.2.
Quick start
- Get a token at layven.io: open the console, go to Agents, create one. The secret is shown once.
- Restart your client.
- Ask your agent: "list my Layven workspaces".
The point of the product shows up on the second connection. Create a second token, connect a different tool with it, and have that tool read the file the first one just wrote. Both agents see the same drive, and the activity feed says which one did what. Walkthrough: examples/two-agent-handoff.md.
Connect your client
Claude Code
Claude.ai custom connector
Paste https://api.layven.io/mcp and authenticate with OAuth. That UI has no custom-header field, which is why OAuth exists.
ChatGPT
Same as Claude.ai: paste https://api.layven.io/mcp and authenticate with OAuth.
Cursor (~/.cursor/mcp.json)
Codex (~/.codex/config.toml)
Gemini (~/.gemini/settings.json)
Same JSON as Cursor, but the key is httpUrl instead of url, because Gemini reads url as an SSE endpoint.
Generic MCP JSON
Authentication
There are two ways in, and both resolve to the same token record, so permissions, revocation and the audit trail are identical either way.
Static bearer token. Send Authorization: Bearer agd_... on every request. Create it in the console; the secret is shown once.
OAuth 2.1, for clients whose UI has no custom-header field:
Consent mints an ordinary token, which you can see and revoke in the console like any other.
Transport
POST https://api.layven.io/mcp, Streamable HTTP, stateless.- Every POST is fully independent. No session id, no session resumption, no separate SSE endpoint, no stdio.
- GET and DELETE return HTTP 405 with exactly this body:
- Required request headers:
Content-Type: application/jsonandAccept: application/json, text/event-stream. Both media types must be present inAcceptor the server returns 406. - Responses come back as
Content-Type: text/event-stream. MCP-Protocol-Versionis optional. If present it must be one of2025-11-25,2025-06-18,2025-03-26,2024-11-05,2024-10-07, otherwise the server returns HTTP 400.- Capabilities:
toolsonly. No resources, no prompts. - Server identity on
initialize: nameLayven, version1.0.2, websitehttps://layven.io.
Tools
Every tool takes an optional workspace, the workspace slug. A token granted exactly one workspace may omit it. list with no workspace fans out over every workspace the token can reach.
Only delete is annotated destructive, and it writes a tombstone version that restore brings back. write, delete, lock and unlock are annotated idempotent; edit, move, restore, request_upload and finalize_upload are not. No tool reaches outside Layven.
NOT_FOUND (unresolvable workspace), PERMISSION_DENIED, RATE_LIMITED and INTERNAL can come back from any tool, so the Errors line under each tool below names what is specific to that tool.
list
List a folder, or search every granted workspace for paths matching a substring.
Arguments
Returns
type is "file" or "folder". size, version, modified_at, modified_by_label, by_actor and deleted are optional per entry.
Errors: INVALID_PATH.
Notes
resultsis always an array of per-workspace blocks, even when the token is granted exactly one workspace. Do not write a client that expects a bareentriesarray.- Passing
cursorwhile fanning out returnsINVALID_PATHwithreason: "cursor_requires_workspace". Pin the workspace before you paginate. - Folders are synthesized from path prefixes. There are no folder records to create or delete.
read
Read a file, either the current version or an older one.
Arguments
Returns, inline, when the raw size is 262144 bytes or less and the mime type is text:
Returns, for anything larger or binary:
Errors: NOT_FOUND (with deleted: true and last_version when the path is tombstoned), INVALID_PATH.
Notes
- The response shape switches on size and mime type, not on a flag you pass. Above 256 KiB, or for any non-text file, you get a
download_urlvalid for 15 minutes instead of inline content. Handle both shapes.
grep
Search file contents with a regular expression.
Arguments
Returns
Errors: INVALID_PATTERN, INVALID_PATH.
Notes
- Patterns are RE2, so there are no backreferences and no lookaround. An invalid pattern returns
INVALID_PATTERN. - Matches are found within single lines only. A pattern spanning a newline will never match.
- One entry per matching line, like
grep -n, no matter how many occurrences that line holds. truncated: truemeans the scan hit its budget and the results are partial. Narrow theprefixor tighten the pattern.- Line numbers are display-only. Never paste one into
edit'sold_str.
history
List the versions of one file, newest first.
Arguments
Returns
op is one of write, edit, move, delete, restore. moved_from, by_actor and restorable_until are optional.
Errors: NOT_FOUND, INVALID_PATH.
Notes
- Newest first, so
limit: 1is the cheapest way to confirm a write landed. next_cursoris an opaque string, never a number. It is absent on the last page, which is how you know to stop.purged: truemeans retention released the content of that version. The row stays for the audit trail, butrestoreto it returnsNOT_FOUNDwithreason: "version_purged".
activity
List what changed in a workspace and which agent changed it.
Arguments
Returns
actor is one of agent, user, system. Newest first.
op is write, edit, move, delete, restore, purge, lock, unlock or grep. System sweeps also record purge_retention and purge_workspace_delete, both with no path. Only write, edit, move, delete and a single-file restore carry a version; on the rest it is null. Note that purge carries a real path or folder prefix, so it matches a path_prefix filter: if you are auditing a folder from this feed, a purge shows up alongside the writes.
Errors: INVALID_PATH.
Notes
next_cursoris an opaque string, never a number. It is absent on the last page, which is how you know to stop.- This is a poll. There are no webhooks, no triggers and no push. Agents coordinate by calling
activityon an interval, which fits comfortably inside the rate limit at seconds-to-minutes cadence. sinceis a timestamp, not a cursor, and two events can share one. Expect occasional re-delivery and make the work idempotent. See examples/two-agent-handoff.md.
write
Create or replace a file with inline content.
Arguments
Inline cap: 1 MiB decoded. Anything larger goes through request_upload.
Returns
unchanged is present only when it applies.
Errors: INVALID_PATH, VERSION_CONFLICT, LOCKED, QUOTA_EXCEEDED, TOO_LARGE.
Notes
- Writing content byte-identical to the current version is a no-op: it returns
unchanged: trueand creates no new version. For a scheduled job that is worth logging loudly, because it usually means the generator did not run. - Content identical to an older version does create a new version.
- Writing to a tombstoned path resurrects it.
edit
Apply string replacements to an existing text file without resending the whole body.
Arguments
Text files up to 16 MiB.
Returns
unchanged is present only when it applies.
Errors: STRING_NOT_FOUND, STRING_NOT_UNIQUE, NOT_EDITABLE, TOO_LARGE_FOR_EDIT, VERSION_CONFLICT, LOCKED, QUOTA_EXCEEDED, NOT_FOUND.
Notes
- Edits apply in order and commit atomically as one new version, so a 20-edit call is one entry in
history, not twenty. If any edit fails, none of them land. - Each
old_strmust match exactly once, otherwise you getSTRING_NOT_FOUNDorSTRING_NOT_UNIQUE. Setreplace_allwhen you mean every occurrence. - Because edits apply in order, a later
old_strmust match the text as the earlier edits left it.
move
Move or rename a file.
Arguments
Returns
version is the new version at the destination.
Errors: NOT_FOUND, INVALID_PATH, VERSION_CONFLICT (with reason: "destination_exists"), LOCKED.
Notes
- The token needs write access to both paths. A prefix rule that covers the source but not the destination fails with
PERMISSION_DENIED. - A live destination with
overwrite: falsereturnsVERSION_CONFLICTwithreason: "destination_exists". That failure is useful: two workers racing to claim the same item canmoveit, and the loser gets a clean error instead of duplicated work.
delete
Tombstone a file.
Arguments
Returns
unchanged is present only when it applies.
Errors: NOT_FOUND, INVALID_PATH, VERSION_CONFLICT, LOCKED.
Notes
- This writes a tombstone version, it does not erase content. The file stays recoverable with
restorefor as long as your plan's version history window allows. - Writing to the same path later resurrects it as a new version on the same history.
listhides tombstoned paths unless you passinclude_deleted: true.
restore
Restore one file to an earlier version, or a whole folder to a point in time.
Arguments, file form:
Arguments, folder form:
Returns, file form:
Returns, folder form:
affected_paths is a capped sample; total is the true count.
Errors: NOT_FOUND (with reason: "version_purged" when retention already released the target version), INVALID_PATH, LOCKED.
Notes
atmust be UTC, ending inZ, with optional milliseconds. A UTC offset such as+02:00is rejected even though it is valid RFC 3339, so convert before you call.- Restore appends new versions and never rewrites history. The bad versions stay in
history, so restoring to the wrong timestamp is itself restorable, and restoring twice is safe. - In the folder form, files that did not exist at
atreceive delete tombstones, counted bydeleted. They are not erased and a later write brings them back. - There is no dry run. Size the operation with
listand confirm a single file withhistoryfirst. Walkthrough: examples/folder-restore-after-bad-run.md.
lock
Take an advisory lock on a path.
Arguments
Returns
Errors: LOCKED, INVALID_PATH.
Notes
- Advisory and 5 minutes. Call
lockagain with the same token to renew. - Locks never block reads. A foreign valid lock makes writes return
LOCKEDwithlocked_by_labelandexpires_at, unless the caller passesoverride_lock: true, which is recorded in the activity feed. - The file need not exist, so you can lock a path you are about to create.
- For work that can be made idempotent, prefer a claim with
moveover a lock: it survives a crash, and a 5-minute TTL does not.
unlock
Release a lock this token holds.
Arguments
Returns
Errors: PERMISSION_DENIED (the lock belongs to another token), INVALID_PATH.
Notes
- Unlocking a path that holds no lock returns
released: true, notNOT_FOUND. The call says nothing about whether a lock existed, so it is not a way to ask who holds one.
request_upload
Start an upload for content too large for inline write. First of two steps; see Large file uploads.
Arguments
Returns
Errors: TOO_LARGE, QUOTA_EXCEEDED, VERSION_CONFLICT, LOCKED, INVALID_PATH.
Notes
- The presigned PUT URL is valid for 15 minutes and the upload record for 1 hour. There is no resumable or multipart upload: if the PUT fails, start again from
request_upload. sizemust be the exact byte count. It is re-checked atfinalize_upload.
finalize_upload
Commit an uploaded file as a new version. Second of two steps.
Arguments
Returns
Errors: UPLOAD_EXPIRED, VERSION_CONFLICT, QUOTA_EXCEEDED, TOO_LARGE.
Notes
- Size and
expected_versionare both re-checked here, so aVERSION_CONFLICTcan surface at finalize even thoughrequest_uploadsucceeded. Someone wrote the path while you were uploading; start again fromrequest_upload. - Calling finalize a second time returns
UPLOAD_EXPIRED.
Errors
Domain failures come back as a normal tool result carrying isError: true, whose text content is JSON:
They are never protocol-level JSON-RPC errors. Agents and clients should branch on code.
Argument validation fails the same way, but the text is not JSON. Passing an argument of the wrong type returns isError: true with a plain English string like MCP error -32602: Input validation error: Invalid arguments for tool activity: ..., produced by the MCP layer before the request reaches Layven. So parse defensively: an isError result whose text will not parse as JSON is a bug in your call, not a Layven domain error. upload/layven-upload.mjs does exactly this, falling back to code: "UNKNOWN" with the raw text as the message.
RATE_LIMITED is the only code worth retrying automatically: sleep retry_after_ms, then try again.
Limits
Exceeding a rate limit returns RATE_LIMITED with retry_after_ms.
Paths and versioning
Paths are UTF-8, /-separated and case-sensitive. They are normalized on input:
- no leading slash:
/a/bbecomesa/b - no duplicate slashes
- no
.or..segments, and no empty segments - no trailing slash on a file
- no control characters
- 1024 bytes maximum
Anything else returns INVALID_PATH with a reason. Directories are implicit: there are no folder records, and list synthesizes folders from path prefixes.
Versioning. Every mutation creates a new version, numbered per file. delete writes a tombstone version. move creates a version at the destination and tombstones the source. restore appends a new version reproducing an earlier state. History is append-only and is never rewritten, which is why a bad restore is itself restorable.
Optimistic concurrency. The default is last-write-wins, which is safe because nothing is lost. When you want a write to fail rather than clobber a concurrent change, pass expected_version with the version you read. A mismatch returns VERSION_CONFLICT with current_version in the payload, so the caller can re-read and decide.
Locks. lock takes a 5-minute advisory lock, renewed by calling lock again with the same token. A foreign valid lock makes writes return LOCKED with locked_by_label and expires_at; override_lock: true proceeds anyway and is recorded in the activity feed. Locks never block reads.
Permissions
Each token is granted access to specific workspaces at one of three levels:
A grant can carry optional prefix rules that restrict a token to particular folders, expressed as allow or deny lists. Deny beats allow. move requires permission on both the source and the destination path.
Give each agent its own token. That is what makes by_label in list, history and activity readable, and it is what lets you revoke one agent without touching the others.
Large file uploads
Inline write caps at 1 MiB. Above that, upload in three steps.
1. Ask for a URL. Call request_upload with the exact byte count:
2. PUT the bytes to put_url. This is a plain HTTP PUT of the raw file, not an MCP call. The URL is valid for 15 minutes.
3. Commit it. Call finalize_upload:
Why there is no SDK
There is no Layven client library and there will not be one. Layven is a hosted MCP server: you point your client at one URL and your agent gets 14 tools, with no code to write and nothing to keep up to date. This is the one exception. The upload flow has a middle step that is a raw HTTP PUT, and an MCP client cannot issue one, so we ship a single dependency-free script for it. Copy it, read it, change it. It is MIT.
upload/layven-upload.mjs
Node 18 or newer. No dependencies, no install.
LAYVEN_TOKEN is required. --url defaults to https://api.layven.io/mcp.
Run its tests from the repository root with:
Examples
- examples/two-agent-handoff.md: agent A drops work on the drive, agent B picks it up by polling
activity. - examples/nightly-write-and-verify.md: a cron-driven agent that writes an artifact and proves the write landed.
- examples/folder-restore-after-bad-run.md: triage a bad agent run and roll a folder back to a timestamp.
Plans
Flat price. No meters, no credits.
Data residency
Your files are stored on OVHcloud in Gravelines, France, and are encrypted at rest. No third-party AI or model API ever touches your content. You can export everything as plain files, and deletion is real deletion.
Versioning
The version in server.json and in the changelog matches the version the server reports on initialize, so you can always check what you are talking to. Documentation changes that do not track a server change do not bump the version.
See CHANGELOG.md.
Support
Bugs in these docs, the examples, or the upload helper: open an issue. Account, billing, or data questions: [email protected].
License
MIT covers this repository: the documentation, the examples, and the upload helper. The Layven service itself is closed source.
來源:README.md,提交 4f5374b
工具
0版本歷史
1- v1.0.2最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分