Skip to main content
Glama

Quarto MCP

CI CodeQL npm version npm downloads node-current license Contributor Covenant DOI

A thin Model Context Protocol server that wraps the Quarto CLI.

The server creates temporary Quarto projects, writes files into them, renders them, and inspects them. It does not copy Quarto configuration logic. Quarto stays the source of truth for configuration, formats, render behavior, and inspect output.

Tools

Tool

Purpose

quarto_create_project

Create a temporary Quarto project and write initial files.

quarto_render

Render the project or one input file.

quarto_inspect

Return Quarto's inspect JSON for the project or one input file.

quarto_defaults_get

Read the stored metadata defaults and the path of their file.

quarto_defaults_set

Store the metadata defaults for every new project.

Read SPECS.md for the full contract.

Related MCP server: overleaf-mcp-server

Requirements

  • Node.js 22 or later

  • Quarto on PATH

Use

The server speaks MCP over stdio. Add it to a client configuration:

{
  "mcpServers": {
    "quarto": {
      "command": "npx",
      "args": ["-y", "quarto-cli-mcp"]
    }
  }
}

To pin a version, write quarto-cli-mcp@0.2.0.

Develop

pnpm install
pnpm run build

Run the server from the clone with node /absolute/path/to/quarto-cli-mcp/dist/index.js.

A projectId is valid only while the server process runs. The server removes every temporary project when it stops.

Remember your author details

Store your name, your affiliation, and your ORCID one time. Call quarto_defaults_set:

{
  "metadata": {
    "author": [
      {
        "name": "Ada Lovelace",
        "orcid": "0000-0002-1825-0097",
        "affiliations": [{ "name": "University of Basel" }]
      }
    ],
    "lang": "en",
    "license": "CC BY 4.0"
  }
}

The server writes the value to ~/.config/quarto-cli-mcp/defaults.yml:

# Managed by quarto-cli-mcp. Written into new projects as _metadata.yml.
author:
  - name: Ada Lovelace
    orcid: 0000-0002-1825-0097
    affiliations:
      - name: University of Basel
lang: en
license: CC BY 4.0

Every later quarto_create_project call copies that file into the new project as _metadata.yml. Quarto merges _metadata.yml over _quarto.yml, so the author reaches each document.

The defaults survive a server restart. You can edit the file by hand.

To use other metadata for one project, pass metadata to quarto_create_project. The value replaces the defaults. To skip the defaults, pass useDefaults: false. To clear the defaults, call quarto_defaults_set with an empty metadata object.

Know these three limits

Quarto owns the merge. The server writes one file and changes nothing else.

  1. Keep format out of the defaults. A format key in the defaults drops the formats of the project. A project that asks for pdf then renders html only.

  2. An author in the defaults is additive. A project that names one other author still carries the author from the defaults. To get one author list, set useDefaults: false, or pass an explicit metadata. An author key in a document front matter does replace the inherited list, but the authors spelling does not.

  3. The defaults reach the project root only. A document in chapters/ gets nothing from them. This limits their value for a book or for a manuscript.

Read the Limits section of SPECS.md for the measured table.

Server limits

Set these environment variables to change the process limits. They are server configuration, never tool parameters.

Variable

Default

Meaning

QUARTO_MCP_RENDER_TIMEOUT_MS

120000

Stop a Quarto run after this time.

QUARTO_MCP_MAX_OUTPUT_BYTES

1048576

Cap stdout and stderr per run.

QUARTO_MCP_MAX_PROJECT_BYTES

268435456

Temporary storage budget.

QUARTO_MCP_LOG_LEVEL

info

Pino log level. Logs go to stderr.

QUARTO_MCP_DEFAULTS_FILE

see below

The metadata defaults file.

The server resolves the defaults file in this order. The first match wins: QUARTO_MCP_DEFAULTS_FILE, then $XDG_CONFIG_HOME/quarto-cli-mcp/defaults.yml, then ~/.config/quarto-cli-mcp/defaults.yml.

Status

Version 0.2.0 is released. Read CHANGELOG.md for the history.

Security

Document code execution is off by default. --no-execute is not a sandbox. Quarto configuration can start other programs, for example through render hooks or filters. Version 0.2 assumes trusted project input. Use an OS or container sandbox when project input is untrusted.

Read SECURITY.md to report a vulnerability.

License

AGPL-3.0-only

Available Tools

5 tools
quarto_create_projectCreate a Quarto projectA

Create a temporary Quarto project and write initial files into it. Returns an opaque projectId that is valid only while this server process runs.

Inputs: type, files, config, metadata, +1 more.

quarto_defaults_getRead the stored metadata defaultsA

Return the Quarto metadata that every new project receives as _metadata.yml, and the path of the file that holds it. An absent file returns empty metadata.

Inputs: no named parameters.

quarto_defaults_setStore the metadata defaultsA

Store Quarto metadata, such as author, affiliation, and ORCID, for every new project. The call replaces the whole file. Send empty metadata to clear the defaults.

Inputs: metadata (required).

quarto_inspectInspect a Quarto projectA

Return Quarto's inspect JSON for the project, or for one input file. The output is passed through without field changes.

Inputs: projectId (required), input.

quarto_renderRender a Quarto projectA

Render the project, or one input file. Code execution is off unless execute is true. A Quarto failure is reported as success: false, with stdout and stderr preserved.

Inputs: projectId (required), to, input, output, +1 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: default metadata retrieval/set, project creation, rendering, and inspecting Quarto metadata. There is no overlap or ambiguity between the tools.

    Naming Consistency3/5

    The naming pattern is mixed: defaults_get/defaults_set use noun_verb order, while create_project, render, and inspect use verb or verb_noun order. Despite the inconsistency, the names are still readable and somewhat predictable.

    Tool Count5/5

    With 5 tools, the server is well-scoped for Quarto project management. Each tool covers a distinct necessary action without redundancy or excessive surface area.

    Completeness4/5

    The tool surface covers the core workflows: creating projects, rendering, inspecting metadata, and managing defaults. Minor gaps exist, such as no way to list or delete projects, but projects are temporary and the main workflow is supported.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      Enables MCP clients to inspect, validate, test, export, and query Godot projects, including live state from an open editor via a bridge addon.
      20
      11 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides any MCP-capable coding agent with shared, warm language-server intelligence and project-local configuration, so diagnostics, definitions, references, hover, symbols, code actions, formatting, rename, and sync behave consistently across harnesses and sessions. This lets users switch agent tools without reconfiguring LSP integrations or falling back to CLI verification.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables clients to create, query and edit QGIS projects and vector data in an isolated, new headless PyQGIS process, exporting GeoJSON/GeoPackage, saving and reopening editable QGZ bundles, and rendering PNG maps through typed MCP tools. All operations are workspace-relative with strict path and geometry validation, and never attach to or modify a running QGIS desktop session.
      MIT