Carve

io.github.markup-carve由 GitHub 帳號 markup-carve 發布v0.1.12更新於 Oct 29, 2026

Parse, lint, format, render, and migrate Carve documents through MCP.

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

概覽

AI 產生的概覽

針對 Carve 標記語言的 MCP 伺服器,讓助理解析、檢查、格式化、渲染、遷移並安全修改 Carve 文件。

可以做什麼
  • 檢查、診斷並格式化 Carve 原始碼,僅套用選定的安全修正
  • 將 Carve 渲染為 HTML、Markdown、純文字或 ANSI 文字,並比較不同目標設定的輸出
  • 把 Carve 解析為帶位置資訊的 AST,並依 ID、標題、註腳或路徑選取節點
  • 讀取節點或標題章節的精确原始碼文字,附上位元組位移與原始碼雜湊
  • 規劃、產生並套用可逆 AST 修補,或在精确的原始碼位元組上拼接替換文字
  • 將 HTML、Markdown、Djot 或 BBCode 遷移為 Carve 並提供保真度診斷
適用情境
適合在編輯 Carve 文件時讓助理檢查、格式化、轉換或修改內容,而不必重寫整個檔案。特別適用於需要精確、可審閱的局部修改,且要求文件其餘部分保持位元組不變的情境。
執行需求
以 npm 套件(@markup-carve/carve-mcp)透過 stdio 在本機執行,需全域安裝或使用 npx,並需要 Node.js。檔案存取僅限已設定的根目錄。未宣告驗證、環境變數或標頭。
安裝前請注意
部分工具會產生原始碼修改與修補;伺服器說明本身不寫入檔案,回傳的修補需由用戶端套用。標示為需作者複核的修正不會自動套用。檔案存取受設定根目錄限制,請確認授權的目錄範圍。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

Carve MCP server

MCP server for the Carve parser, linter, formatter, and renderers, using @markup-carve/carve 0.1.15 or later. File access is enabled only for configured roots. Read the Carve documentation for the language syntax.

Install

sh
npm install -g @markup-carve/carve-mcp

Usage

sh
carve-mcp --help

Documentation

License

MIT

來源:README.md,提交 cdf92a2

工具

15

carve_lint

Lint Carve

Check Carve source for author-facing problems and silent degradation.

輸入參數source必填platforms

carve_diagnose_and_fix

Diagnose and fix Carve

Diagnose Carve source, propose bounded fixes, and optionally apply selected safe fix IDs with forward and undo patches. Writer-review fixes are never applied automatically.

輸入參數source必填platformsapplyFixIds

carve_format

Format Carve

Format Carve source canonically and report any lossy raw-format nodes.

輸入參數source必填alignTables

carve_render

Render Carve

Render Carve to HTML, Markdown, plain text, or ANSI terminal text, with loss reporting.

輸入參數presetsource必填target必填extensionsallowRawHtmlsanitizeUrlsstrictLossesasciiHeadingIdsmaxRenderLossessmartTypographylowercaseHeadingIds

carve_check_targets

Check Carve publishing targets

Compare one Carve document across HTML, Markdown, plain text, ANSI, GitHub, WordPress, and PDF-stage profiles, returning target-specific warnings, losses, and fallbacks.

輸入參數source必填targets

carve_parse

Parse Carve

Parse and resolve Carve into its position-aware interchange AST.

輸入參數source必填positions

carve_create_ast_patch

Create structured AST patch

Compare two PART 12 Carve ASTs and return position-independent add, replace, and remove operations.

輸入參數after必填before必填

carve_apply_ast_patch

Apply structured AST patch

Validate and apply structured operations to a PART 12 Carve AST, returning the patched AST and canonical Carve source.

輸入參數ast必填operations必填

carve_select_ast_nodes

Find AST nodes by semantic selector

Resolve an element ID on any node, a heading ID, footnote label, node type, or current AST path to reviewable PART 12 AST paths without silently choosing among multiple matches.

輸入參數ast必填selector必填

carve_get_block

Get Carve source blocks

Return the exact source text of the nodes a selector matches, or a heading's section, with UTF-8 byte offsets and the source sha256. No AST unless includeAst.

輸入參數scopesource必填selector必填includeAst

carve_replace_source

Replace Carve source of one node

Splice Carve text over the exact source bytes of one selected node or heading section, leaving every other byte untouched. Refuses if the node kind changes, the rest of the document parses differently, or new lint findings appear. Returns forward and undo patches.

輸入參數text必填scopesource必填selector必填includeSourceexpectedSha256

carve_plan_ast_edit

Plan a semantic AST edit

Plan one or more atomic semantic AST edits and return a human-readable, reversible, stale-guarded source patch without writing the document.

輸入參數edit必填thensource必填selector必填

carve_create_reversible_ast_patch

Create reversible AST patch

Compare two PART 12 ASTs and return forward and inverse operations with semantic stale-edit fingerprints.

輸入參數after必填before必填

carve_apply_reversible_ast_patch

Preview reversible AST patch as source edits

Verify a reversible AST patch against source, apply or undo it, and return a minimal stale-guarded UTF-8 source edit without writing files.

輸入參數patch必填source必填inverseincludeAst

carve_migrate

Migrate to Carve

Migrate HTML, Markdown, Djot, or BBCode source to Carve with version 2 fidelity diagnostics.

輸入參數format必填source必填markdownDialect

版本歷史

8
  1. v0.1.12最新Oct 26, 2026
  2. v0.1.11Oct 25, 2026
  3. v0.1.10Oct 23, 2026
  4. v0.1.9Oct 18, 2026
  5. v0.1.8Oct 15, 2026
  6. v0.1.7Oct 8, 2026
  7. v0.1.6Oct 2, 2026
  8. v0.1.4Sep 16, 2026

評分

已滿足適用檢查項的 90%

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

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

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

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