MCP server for lossless YAML 1.2 parsing, formatting, and validation (pure Rust).
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Model Context Protocol server exposing noyalib's lossless YAML editing to AI agents (Claude Desktop, Claude Code, Cursor, Zed, Continue.dev, β¦).
For environments without a Rust toolchain (the typical AI-agent deployment shape):
Split from the monorepo since v0.0.13. Prior versions shipped from
sebastienrousseau/noyalib/crates/noyalib-mcp/under the workspace-lockstep release cadence. From v0.0.13 onwardnoyalib-mcplives here as its own crate, still released in strict lockstep with the parentnoyalibat the same version. See ADR-0005 for the rationale and rollback recipe.
Both consume the same signed binary attached to every GitHub Release. See Verification for the verify commands.
rust-version in
the manifest, enforced by the msrv-core CI job on every push.noyalib at the identical
=0.0.X and releases in lockstep with it; Cargo resolves that pin
for you.The server speaks JSON-RPC 2.0 over stdio with newline-delimited
frames, per the
MCP specification. A typical
agent launches the binary as a child process, sends
initialize, then dispatches tool calls:
AI agents that edit YAML configuration today regex-replace and corrupt comments, indentation, and document structure. The same agent fixing a port number in a Kubernetes manifest can shift every comment by a line, reorder sibling keys, or strip trailing whitespace that a downstream linter cared about.
noyalib's CST does the edits losslessly β a set("server.port", "9090") rewrites only the byte span of the 8080 scalar; the
surrounding comments and indentation pass through untouched.
This server is the protocol shim that lets MCP-aware clients
drive that engine safely:
tools/call set returns a document
byte-identical to the input outside the touched span.tools/call get walks the dotted path
and returns just the value, not the whole tree.tools/call validate --schema runs
the same JSON Schema 2020-12 engine noyavalidate ships.~/.cursor/mcp.json:
~/.config/zed/settings.json:
~/.continue/config.json:
Point at the binary; the transport is stdio with newline- delimited JSON-RPC 2.0.
The v0.0.1 server registers two file-oriented tools β both
operate on a YAML file at file: <path>, not on inline source
strings, so an agent's edits land on disk losslessly:
noyalib_get β Takes { file: string, path: string }; returns the raw source fragment at the dotted/indexed path (e.g. server.host, items[0].name). No re-quoting; no canonicalisation.noyalib_set β Takes { file: string, path: string, value: string }; returns the file rewritten via the lossless CST so only the touched span changes; comments, blank lines, and sibling formatting survive byte-for-byte. The value is a YAML fragment (0.0.2, "hello", [1, 2, 3]); a parse failure leaves the file unchanged.noyalib_parse β Takes { yaml: string }; returns the JSON data model of the text (tags stripped, a stream as an array). Stateless: nothing on disk is touched.noyalib_edit β Takes { yaml: string, path: string, value: string }; returns the whole text with that one value replaced losslessly. Stateless.noyalib_validate β Takes { yaml: string, schema?: string }; returns valid with either the parse error (line and column) or every JSON Schema violation with its path. Stateless.Each tool's full input schema lives in the response to
tools/list. The server also handles the standard
initialize / initialized / notifications/cancelled
lifecycle.
Format / parse / validate are not exposed as MCP tools today β
they're available via the noya-cli
binaries (noyafmt, noyavalidate) and the
noyalib library API. Promotion to
first-class MCP tools is on the v0.0.2+ roadmap.
Agent-driving demos under
crates/noyalib-mcp/examples/:
| Script | What it shows |
|---|---|
handshake.sh | initialize β tools/list smoke test. Confirms the binary speaks the protocol and announces the expected tools. |
format-call.sh | tools/call format on a poorly-spaced document. Demonstrates that comments + indentation pass through the CST formatter unchanged. |
set-then-get.sh | Round-trip the mutation surface: set rewrites server.port, get reads it back. Surgical edit; surrounding bytes untouched. |
POSIX-shell only β no jq, no node dependencies. Pipe
through jq -c . if you want pretty-printed JSON responses.
GitHub Releases ship the crate archive and a CycloneDX SBOM, each with a sigstore bundle and checksums; the GHCR image is built from the tagged source. Pre-built binaries are not attached to releases yet. To verify a release artefact:
The npm wrapper additionally carries an npm provenance attestation:
Full cookbook: pkg/VERIFY.md.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/noyalib-mcp)<a href="https://allmcps.com/mcp/noyalib-mcp"><img src="https://allmcps.com/api/badge/noyalib-mcp?style=directory" alt="Noyalib MCP on AllMCPs" /></a>