Skip to main content
Glama
carve-mcp

carve-mcp

Official
by markup-carve

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

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

Related MCP server: deliverable-mcp

Usage

carve-mcp --help

Documentation

License

MIT

Available Tools

15 tools
carve_apply_ast_patchApply structured AST patchA
Read-only

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

Inputs: ast (required), operations (required). Returns: ast, source

carve_apply_reversible_ast_patchPreview reversible AST patch as source editsA
Read-only

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

Inputs: patch (required), source (required), inverse, includeAst. Returns: ast, sha256, source, direction, +1 more

carve_check_targetsCheck Carve publishing targetsA
Read-only

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

Inputs: source (required), targets. Returns: source, summary, targets, versions, +3 more

carve_create_ast_patchCreate structured AST patchA
Read-only

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

Inputs: after (required), before (required). Returns: changes, operations, changeCount, operationCount

carve_create_reversible_ast_patchCreate reversible AST patchA
Read-only

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

Inputs: after (required), before (required). Returns: changes, forward, inverse, version, +2 more

carve_diagnose_and_fixDiagnose and fix CarveB
Read-only

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.

Inputs: source (required), platforms, applyFixIds. Returns: fixes, patch, valid, value, +6 more

carve_formatFormat CarveA
Read-only

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

Inputs: source (required), alignTables. Returns: value, losses, truncated, totalLosses

carve_get_blockGet Carve source blocksA
Read-only

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.

Inputs: source (required), selector (required), scope, includeAst. Returns: blocks, sha256, truncated, matchCount, +1 more

carve_lintLint CarveA
Read-only

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

Inputs: source (required), platforms. Returns: valid, warnings, warningCount

carve_migrateMigrate to CarveA
Read-only

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

Inputs: format (required), source (required), markdownDialect. Returns: value, report

carve_parseParse CarveB
Read-only

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

Inputs: source (required), positions. Returns: type, children, srcByteLength

carve_plan_ast_editPlan a semantic AST editA
Read-only

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

Inputs: edit (required), source (required), selector (required), then. Returns: edit, match, steps, sha256, +5 more

carve_renderRender CarveB
Read-only

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

Inputs: source (required), target (required), preset, extensions, +7 more. Returns: value, losses, truncated, totalLosses

carve_replace_sourceReplace Carve source of one nodeA
Read-only

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.

Inputs: text (required), source (required), selector (required), scope, +2 more. Returns: end, lint, match, patch, +6 more

carve_select_ast_nodesFind AST nodes by semantic selectorA
Read-only

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.

Inputs: ast (required), selector (required). Returns: matches, selector, truncated, matchCount

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 15 tools

    Disambiguation2/5

    The patch/edit cluster has unclear boundaries: carve_plan_ast_edit, carve_create_ast_patch, and carve_create_reversible_ast_patch all produce patches, while carve_apply_ast_patch and carve_apply_reversible_ast_patch both apply them, and carve_replace_source provides yet another source-editing path. An agent must reason carefully about reversible vs. non-reversible and AST-level vs. source-level before selecting, and carve_diagnose_and_fix partially overlaps with lint/format plus plan-and-apply flows.

    Naming Consistency4/5

    All names use the carve_ prefix with snake_case and a dominant verb_noun convention (create_ast_patch, apply_ast_patch, select_ast_nodes, get_block, replace_source). The only minor deviation is that several tools are verb-only (format, lint, render, parse, migrate), but the pattern remains predictable and readable.

    Tool Count4/5

    Fifteen tools is at the upper edge of a reasonable scope for a markup-language toolchain spanning parsing, formatting, linting, rendering, migration, and editing. However, the count is inflated by the redundant reversible/non-reversible patch pairs, so not every tool clearly earns an independent place.

    Completeness4/5

    The surface covers the full lifecycle well: parse, format, lint, render across multiple targets, migrate, diagnose/fix, inspect blocks, and create/apply patches with undo. Minor gaps exist around direct document persistence (tools explicitly avoid writing files) and general insertion/append operations outside the patch model, but agents can work around these.

    Maintenance

    ActivityActive
    ResponsivenessUsually handled

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to inspect and export OpenPencil .fig and .pen files directly from disk, supporting operations like info, tree traversal, XPath queries, linting, and conversion to various formats without the desktop app or CLI.
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables MCP clients to render Markdown to HTML, estimate page counts, verify document delivery constraints, and atomically ship documents through a zero-dependency JSON-RPC stdio server.
      4
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables creating, reading, editing, and verifying PDF, Word, Excel, and PowerPoint documents through MCP tools that return structured results. It preserves source files by default for edits and supports local stdio operation without network requests.
      MIT