
Scripthold
io.github.zoster81由 GitHub 帳號 zoster81 發布v4.0.1更新於 Oct 26, 2026
Secure encoding-aware local workspace runtime for AI agents
概覽
本機 MCP 伺服器,讓 AI 助理在明確授權的目錄內安全讀寫檔案,並正確處理文字編碼、備份與原始碼導覽。
- 可以做什麼
- 讀取、寫入、編輯與搜尋文字檔案,支援多檔案修補包與一次性確認已備妥的操作
- 列出目錄、建立目錄樹、搜尋路徑、計算指紋並驗證檔案狀態
- 偵測與轉換文字編碼、換行字元與 BOM,涵蓋 168 種已註冊編碼
- 不需編譯器或語言伺服器即可結構化瀏覽原始碼並執行結構查詢
- 透過先預覽再確認的流程讀取、建立與編輯 Markdown 文件
- 執行持久化背景任務、管理備份存放區,並查詢允許目錄與更新
- 適用情境
- 適合需要讓助理只在指定本機專案資料夾內工作,且重視文字編碼正確性、可預覽的安全修改、備份或原始碼導覽的情境。也適合希望檔案變更必須經明確核准、而非任意寫入的桌面或命令列環境。
- 執行需求
- 以本機程序透過 stdio(或帶驗證的 Streamable HTTP)執行,可使用已發佈的執行檔或從 Go 原始碼建置;每個授權目錄需作為啟動參數傳入。HTTP 模式需透過 MCP_HTTP_TOKEN_FILE 或 MCP_HTTP_TOKEN 提供 bearer 權杖。備份、任務與延遲操作等選用功能需設定 MCP_BACKUP_STORE_DIR、MCP_TASK_STORE_DIR 或 MCP_DEFERRED_STORE_DIR。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Scripthold,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Scripthold — Secure MCP Server for Local Workspaces
[Test Suite] [CodeQL] [OpenSSF Scorecard] [GitHub Release] [Release downloads] [Go] [License: GPL-3.0] [MCP Registry] [AgentHub 已收录:Scripthold] [Glama]
Code from the web. Work locally. Recover safely.
Scripthold is a Model Context Protocol (MCP) server that gives web, desktop, and CLI agents controlled access to explicitly authorized local workspaces. It safely handles legacy text encodings, deterministic file changes, source navigation, backups, and optional durable local execution over stdio or authenticated Streamable HTTP.
AI clients see Настройки — not ???? or Íàñòðîéêè.
Start here: Quick start · Find a tool · All documentation · Security policy.
What Scripthold provides
Scripthold 4.x provides 36 tools and 3 guided prompts; see GitHub Releases for the latest published version. Clients upgrading from 3.x should follow the 4.0 migration guide for the unified confirmation tool. In 4.0.1, the source_symbols outline response defaults to a compact tree; pass presentation: "detailed" to retain the earlier files and symbols fields.
- 168 registered text encodings with content-based detection, UTF-32 LE/BE support, and conservative ambiguity handling.
- 100 active Source Intelligence providers for bounded declaration navigation, structural search, selected project relations, and verified context assembly.
- Secure workspace boundaries with canonical-root containment, Windows reparse/junction handling, deterministic traversal, and missing-path validation.
- Approval-bound mutations using preview/apply capabilities, exact fingerprints, conflict checks, staged writes, and truthful partial-state reporting.
- Optional persistent backups with history, compare, audit, restore, explicit garbage collection, pinning, and exact-ID deletion.
- Durable asynchronous tasks with idempotency, persistent state, bounded logs, recovery, locks, and cancellation.
- Reliable long-running read-only calls through optional deferred-operation storage and bounded retained-result retrieval.
- Authenticated Streamable HTTP with loopback defaults, bearer authentication, Host/Origin validation, resource limits, and explicit TLS/proxy requirements for non-loopback exposure.
Scripthold originated from the original mcp-file-tools project, created by Dimitar Grigorov, and retains its GPL-3.0 lineage. See Project Direction.
Quick start
Choose a published binary or build from source, then configure your MCP client to grant access only to the directories you intend to share. HTTP and container deployments have additional setup below.
Use a published release
Download the asset for your platform from the latest release and verify it against checksums.txt. Releases also attach a signed Sigstore build-provenance bundle for the normal GoReleaser assets.
Build from source
The module path is github.com/zoster81/scripthold.
Local stdio client
Pass each authorized directory as a startup argument:
Startup roots are authoritative. A roots-capable stdio client may supply dynamic roots only when the process starts without directory arguments.
Verified self-update
Supported standalone installations can opt in to self-update. Stop other Scripthold processes using the same binary before running scripthold update --adopt. Adoption prepares local state without downloading or replacing the executable.
After adoption, run scripthold update to verify and dispatch an available release. Use scripthold update status to confirm completion; only run scripthold update recover when status offers recovery. These actions have different safety and verification requirements.
See the Verified Self-update Guide for supported installations, exact commands, failure handling, and recovery rules.
Streamable HTTP
HTTP requires exactly one bearer-token source. A minimal loopback PowerShell launch is:
The MCP endpoint is http://127.0.0.1:8765/mcp; /healthz and /readyz expose liveness/readiness. Send the token as Authorization: Bearer <token> on every MCP request.
Do not expose HTTP beyond loopback without reading HTTP Security. Non-loopback use requires explicit opt-in and TLS or a trusted proxy boundary.
OpenAI Secure MCP Tunnel
Sanitized PowerShell examples are available under examples/:
start-local-stdio.ps1start-local-http.ps1start-openai-tunnel-stdio-plus-local-http.ps1start-openai-tunnel-http-plus-local-stdio.ps1
Copy an example outside the checkout before replacing placeholders. Never commit Runtime API keys, Tunnel IDs, bearer tokens, or private state paths.
Container
The image runs as unprivileged UID/GID 10001.
Tool groups
TOOLS.md is the detailed public reference for schemas, parameters, examples, limits, and error behavior. The table below describes the 4.x catalog (36 tools). Clients upgrading from 3.3.6 must migrate the eight former apply commands to confirm_verified_operation.
Source Intelligence
Source Intelligence helps agents navigate source code without running it or requiring an external compiler, parser, or language server. Use source_symbols to map project files with digest presentation: "compact", browse a tree-structured file outline by default (or request presentation: "detailed" for the previous outline JSON structure), and inspect a selected symbol; use source_query for structural search, supported project relationships, dependency graphs, and verified context. Use grep_text_files when looking for arbitrary text or code behavior that is not represented by structural symbols.
Unsupported or ambiguous relationships are rejected rather than guessed. Markdown files have their own document tools. Check the generated Language Capabilities matrix for available source providers and analysis coverage.
Markdown documents
Markdown files use dedicated tools rather than Source Intelligence providers. Read a document with markdown_read, or inspect links and relationships across files with the read-only markdown_workspace tool.
To change a document, prepare a preview with markdown_edit (or markdown_create for a new file), review the proposed content, and pass its previewId to confirm_verified_operation. Unsafe, conflicting, or stale changes are rejected instead of being silently rewritten.
For examples and the exact operation forms, see the Markdown tool reference. For Markdown semantics, supported encodings, and the Marksplice integration boundary, see Markdown Intelligence.
Safety model
- File access is limited to explicitly authorized roots after canonical path validation.
- Symlink, junction, reparse-point, alias, and missing-path escapes fail closed.
- Encoding detection uses bytes and decoded-content evidence, never filenames or extensions.
- Mutations stage and revalidate before commit; initially missing destinations use no-replace semantics.
- Preview/apply workflows bind the approved operation to a one-shot capability so mutation parameters cannot be changed at apply time.
- Multi-file mutations do not claim transactional rollback; failures report committed/unchanged/unknown state where applicable.
- The optional backup store is a separate protected authority outside public roots.
task_runexecution is disabled by default. Shell and script execution require explicit authorization; HTTP requires an additional HTTP execution opt-in.- HTTP is authenticated and loopback-only by default.
Current architectural boundaries are summarized in Architecture.
Key configuration
Most installations need only a small subset of environment variables:
Detailed limits and subsystem-specific options are documented where they are used: TOOLS.md, Durable Tasks, and HTTP Security.
Documentation
Use the Documentation Guide to find instructions by task, whether you are configuring a client, choosing a tool, securing a deployment, or contributing to the project.
- Using the server: Tool Reference, HTTP Security, and Durable Tasks.
- Understanding and changing the project: Architecture, Contributing, and Roadmap.
- Release history: Changelog, with version-specific steps in the migration guides.
Development
The required Go version is declared by go.mod.
See CONTRIBUTING.md before proposing changes.
License
GPL-3.0 — see LICENSE.
來源:README.md,提交 f8029dd
工具
0版本歷史
8- v4.0.1最新Oct 26, 2026
- v4.0.0Oct 26, 2026
- v3.3.6Oct 25, 2026
- v3.3.5Oct 25, 2026
- v3.3.3Oct 23, 2026
- v3.3.0Sep 29, 2026
- v3.2.1Sep 16, 2026
- v3.2.0Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分