Skip to main content
Glama
markup-carve

carve-mcp

Official
by markup-carve

Carve MCP server

Give MCP-compatible assistants the same Carve parser, linter, formatter, and renderers used by the JavaScript implementation. Filesystem access is absent by default and can be enabled for explicitly configured document roots.

Tools

  • carve_lint checks a document and returns precise, structured warnings.

  • carve_format produces canonical Carve and reports rendering losses.

  • carve_render renders HTML, Markdown, plain text, or ANSI.

  • carve_parse returns the resolved, position-aware interchange AST.

  • carve_migrate converts HTML, Markdown, or Djot and reports migration fidelity.

carve_render supports default, portable, and HTML-only static-html presets. The portable preset lowercases heading IDs and transliterates where it can. Advanced callers can choose heading-ID behavior, loss policy, smart typography, and the autolink, semantic-spans, or wikilinks extensions. carve_migrate exposes Markdown dialect switches explicitly, so migration does not invent constructs the source format did not enable.

Raw HTML passthrough is disabled by default because MCP inputs are untrusted. Callers handling trusted documents can opt in with allowRawHtml; dangerous URL sanitization remains enabled unless explicitly disabled.

All tools accept source text directly. Inputs are limited to 1 MB, and no tool reads or writes files unless a workspace root is configured at startup.

By default the server has no filesystem access. To opt into workspace reads, configure one or more roots at startup:

node dist/index.js --root /absolute/project/path

carve_workspace_info lists the root indexes used by carve_read_file without exposing host paths. Reads are limited to common text-document extensions and exclude hidden paths and dependency directories.

Add --allow-write to register carve_write_file. Writes default to dry runs, stay inside canonicalized roots, preserve existing file modes, and require the previously read SHA-256 when overwriting a file. This detects concurrent changes. MCP's newer protocol no longer asks clients for roots, so startup configuration keeps the permission boundary explicit across protocol versions.

Related MCP server: mcp-server-markdown

Resources

  • carve://guide is a concise authoring quick start.

  • carve://rules explains the normative rule categories.

  • carve://rules/{ruleId} looks up a stable normative CARVE-* rule ID, such as carve://rules/CARVE-P0-001.

  • carve://lint-rules/{ruleName} explains a stable diagnostic name returned by carve_lint.

The resources identify the Carve version and link to the complete documentation when a reader needs normative detail. Lint diagnostic names are a separate namespace and are returned with their explanations directly by carve_lint.

Run locally

Node.js 20 or newer is required.

npm install
npm run build
node dist/index.js

Configure an MCP client to launch the server over stdio:

{
  "mcpServers": {
    "carve": {
      "command": "node",
      "args": ["/absolute/path/to/carve-mcp/dist/index.js"]
    }
  }
}

The intended published command is npx -y @markup-carve/carve-mcp; use the local command until the package has been released.

Native Rust preview

The Rust server is intended for native distribution and embedding. It uses carve-lang directly and currently exposes the five source-based tool names over stdio:

cargo run --manifest-path rust/Cargo.toml

Choose the TypeScript server for the complete, stable contract, HTTP transport, resources, and guarded workspace operations. The Rust binary is a preview until the shared conformance fixtures cover every option and result shape. It disables raw HTML by default, but advanced render options, loss reports, migration reports, platform-specific linting, and offset normalization are not yet at parity.

HTTP deployment

Stdio remains the default. For local HTTP development:

node dist/index.js --http --port=3000

The default bind is 127.0.0.1:3000; --host value and --port value forms are also accepted.

The MCP endpoint is /mcp and the health endpoint is /health. Non-loopback binds require a bearer token supplied through the environment, never a command line argument:

CARVE_MCP_TOKEN='replace-with-a-long-random-secret' \
CARVE_MCP_ALLOWED_HOSTS='mcp.example.com' \
  node dist/index.js --http --host=0.0.0.0 --port=3000

CARVE_MCP_ALLOWED_HOSTS is a comma-separated hostname allowlist (without ports). HTTP mode validates host and origin headers, limits request bodies to 7 MB, allows 60 MCP requests per minute per socket peer, caps concurrent MCP requests at 32, and applies request, header, and keep-alive timeouts. The health endpoint is intentionally unauthenticated for deployment probes. Workspace writes over HTTP require a token even on loopback. Put public deployments behind TLS; the built-in listener is plain HTTP. When a reverse proxy terminates TLS, configure equivalent client-aware rate limits there because the built-in listener sees the proxy as the socket peer.

Development

npm run check
npm test
npm run build

This project is licensed under the MIT License.

Available Tools

5 tools
carve_formatFormat CarveA
Read-only

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

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesDocument source (maximum 1000000 UTF-8 bytes)

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the agent knows the operation is safe and non-mutating. The description adds that it reports lossy raw-format nodes, which is useful, but it doesn't clarify what constitutes a lossy node or what the report looks like. This is acceptable given the annotations but not richly detailed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, front-loaded with the action, and free of redundant wording. Every component earns its place: the verb, the resource, the mode ('canonically'), and the reporting behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter, read-only tool this is mostly sufficient: it names the action and the report. However, there is no output schema, so the description should more explicitly define the 'report' output format. It also doesn't mention error behavior or what 'canonical' means in practice, leaving some ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage with a description for the single 'source' parameter, so the description doesn't need to repeat it. The tool description adds no extra parameter meaning beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: 'Format Carve source canonically.' It also indicates a distinct outcome—reporting lossy raw-format nodes—which separates it from parsing, linting, rendering, or migrating. It doesn't explicitly name sibling tools, but the verb 'Format' and the unique report clause make the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for canonical formatting of Carve source, so an agent could infer when it applies. However, there is no explicit guidance on when to choose this over carve_lint, carve_render, or carve_migrate, nor any 'when not to use' conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

carve_lintLint CarveA
Read-only

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

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesDocument source (maximum 1000000 UTF-8 bytes)
platformsNo

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds useful context about what the linter detects ('author-facing problems and silent degradation'), but it does not disclose return format, error behavior, or whether any action is taken. The read-only annotation mitigates the need for mutation details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short sentence that is front-loaded with the action ('Check') and the resource ('Carve source'). Every word contributes to the purpose; there is no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given two parameters, no output schema, and read-only annotations, the description is mostly sufficient for a simple linting operation. The main gaps are the unexplained `platforms` parameter and the fact that the return value (e.g., diagnostics list) is not specified. An agent could infer behavior from the verb 'Check', but it is not fully explicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool description adds no parameter-level meaning. The `source` parameter is described in the schema, but `platforms` has no schema description and the tool description also does not explain what `platforms` controls. With 50% schema coverage, the description should compensate for the undocumented `platforms` parameter, but it does not.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'Check' with the resource 'Carve source' and specifies the goal: detecting 'author-facing problems and silent degradation.' This clearly distinguishes it from siblings carve_format, carve_render, carve_parse, and carve_migrate, each implying a different operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this is the linting/validation tool for Carve source, but it does not explicitly state when to use it over siblings or when not to use it. There are no exclusions or alternative routing; the agent must infer from the name and the verb 'Check' that this is the validation tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

carve_migrateMigrate to CarveA
Read-only

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

ParametersJSON Schema
NameRequiredDescriptionDefault
formatYes
sourceYesDocument source (maximum 1000000 UTF-8 bytes)

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the read-only, non-destructive safety profile. The description adds value by disclosing that conversion produces 'fidelity diagnostics', which tells the agent to expect quality/compatibility feedback beyond the converted output. This is meaningful behavioral context beyond the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The entire description is one front-loaded, information-dense sentence. Every phrase earns its place: the migration action, the supported formats, the target, and the diagnostics behavior. There is no filler or repetition of schema details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with read-only annotations, the description is mostly sufficient, but with no output schema it does not clarify what the result looks like beyond 'fidelity diagnostics'. It also does not mention edge cases, formatting details, or whether output is returned as text or a structured object. A bit more return-shape context would help.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%: 'source' has a description with size limits, and 'format' has an enum but no description. The description restates the format options in prose but does not add new parameter meaning, such as format detection, normalization behavior, or how source content is interpreted. This is adequate but not compensatory.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific action ('Migrate'), a clear resource ('HTML, Markdown, or Djot source'), and a target format ('Carve'). It also adds a distinctive behavioral detail ('with fidelity diagnostics') that separates it from obvious siblings like carve_parse or carve_render.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The context is clear: use this tool when you have HTML, Markdown, or Djot source and want to convert it to Carve. It does not explicitly name sibling tools or exclusion conditions, but the migration-focused wording sufficiently distinguishes it from lint, format, render, and parse.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

carve_parseParse CarveA
Read-only

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

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesDocument source (maximum 1000000 UTF-8 bytes)

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds useful output context by specifying that the result is a 'position-aware' AST, but it does not disclose behavior around errors, resolution failures, or performance characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single well-formed sentence that immediately states the operation, the input, and the output. There is no redundant or filler content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one required parameter and annotations covering safety, and the description tells the agent exactly what the tool produces. The lack of an output schema makes the 'position-aware interchange AST' mention valuable, though more detail about resolution behavior or error conditions would make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the single 'source' parameter is already documented as 'Document source (maximum 1000000 UTF-8 bytes)'. The description does not add meaningful parameter-level details beyond what the schema provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Parse and resolve') and a specific resource ('Carve'), and names the exact output ('position-aware interchange AST'). This clearly distinguishes it from the sibling tools carve_lint, carve_format, carve_render, and carve_migrate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly states that this tool is for parsing and resolving Carve into an AST, which gives the agent a clear context for when it should be used. It does not explicitly name alternatives or exclusions, but the operation is distinct enough from lint, format, render, and migrate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

carve_renderRender CarveA
Read-only

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

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceYesDocument source (maximum 1000000 UTF-8 bytes)
targetYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and destructiveHint=false, so the description does not need to restate safety. The phrase 'with loss reporting' adds a behavioral detail, but it is vague and does not clarify what the loss report contains, how it is returned, or whether it accompanies the rendered output.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence communicates the core purpose, output variants, and an additional behavioral note. Every word earns its place; there is no repetition of schema properties or annotation information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with only two parameters, and annotations cover safety, but there is no output schema. The description does not explain the expected return value or the semantics of the loss report, leaving an agent uncertain about what the invocation will actually produce beyond the chosen format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50%, so the description carries some of the burden. It repeats the target enum values and clarifies that the source is a Carve document, but it does not add meaningful detail beyond the schema for 'source' or explain constraints/pitfalls of each target format. The description is adequate but not compensatory.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Render Carve') and enumerates the exact output formats: HTML, Markdown, plain text, and ANSI terminal text. This clearly distinguishes the tool from its siblings (carve_lint, carve_format, carve_parse, carve_migrate) by focusing on conversion/rendering rather than analysis or mutation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no explicit guidance on when to use this tool versus alternatives like carve_parse or carve_format. The usage is only implied by the tool's name and the listed output formats; there is no mention of when rendering is appropriate or inappropriate, nor any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.0
    • First observedcarve_format
    • First observedcarve_lint
    • First observedcarve_migrate
    • First observedcarve_parse
    • First observedcarve_render

TDQS

A4/5.0
Disambiguation5/5

Each tool targets a distinct stage of Carve processing: linting for problems, canonical formatting, rendering to output formats, parsing to an AST, and migrating from other formats. No two tools have overlapping purposes.

Naming Consistency5/5

All tool names follow a consistent carve_<verb> pattern, with the verbs clearly communicating the operation. This is a strong, predictable naming convention.

Tool Count5/5

Five tools is well-scoped for a language-processing server. Each tool earns its place and covers a distinct operation without redundancy or bloat.

Completeness5/5

The tool set covers the core Carve workflow: migrate source in, parse to an AST, lint for issues, format canonically, and render to output formats. There are no obvious dead ends or missing essential operations.

Maintenance

ActivityMaintained
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    IntentText MCP server lets AI agents parse, validate, query, diff, and render IntentText (.it) documents. It exposes 9 tools for safe parsing, workflow validation, HTML/print rendering, template merging, and round-trip source generation.
    42
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides a standardized interface for interacting with Markitdown's tools and services through a unified API, compatible with MCP-compliant services.
    MIT
  • A
    license
    A
    quality
    F
    maintenance
    An MCP server that exposes documents.js's document conversion, .odb, metadata, and font tooling as MCP tools, enabling agents to convert, inspect, and edit a wide range of document formats over stdio.
    18
    2,276
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/markup-carve/carve-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server