sebastienrousseau

noyalib-mcp

Community sebastienrousseau
Updated

Model Context Protocol server exposing noyalib's lossless YAML editing to AI agents - Claude Desktop, Cursor, Continue.dev, Zed

noyalib-mcp

Model Context Protocol server exposing noyalib's lossless YAML editing to AI agents (Claude Desktop, Claude Code, Cursor, Zed, Continue.dev, …).

Contents

  • Install — Cargo, npx, Docker
  • Quick Start — JSON-RPC handshake
  • Why this approach? — design rationale
  • Connect — per-client configuration
  • Tools exposed — MCP tool reference
  • Examples — runnable scripts
  • Verification — cosign + npm provenance
  • When not to use noyalib-mcp
  • Documentation
  • License

Install

cargo install noyalib-mcp

For environments without a Rust toolchain (the typical AI-agentdeployment shape):

# npm wrapper — auto-downloads the matching binary on first run,
# caches under ~/.cache/noyalib-mcp/<version>/.
npx @sebastienrousseau/noyalib-mcp

# Container — multi-arch (linux/amd64, linux/arm64).
docker run --rm -i ghcr.io/sebastienrousseau/noyalib-mcp:latest

Split from the monorepo since v0.0.13. Prior versionsshipped from sebastienrousseau/noyalib/crates/noyalib-mcp/under the workspace-lockstep release cadence. From v0.0.13onward noyalib-mcp lives here as its own crate, stillreleased in strict lockstep with the parentnoyalib atthe same version. SeeADR-0005for the rationale and rollback recipe.

Both consume the same signed binary attached to every GitHubRelease. See Verification for the verifycommands.

Quick Start

The server speaks JSON-RPC 2.0 over stdio with newline-delimitedframes, per theMCP specification. A typicalagent launches the binary as a child process, sendsinitialize, then dispatches tool calls:

{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"agent","version":"0.0.1"}}}
{"jsonrpc":"2.0","method":"notifications/initialized"}
{"jsonrpc":"2.0","id":2,"method":"tools/list"}
{"jsonrpc":"2.0","id":3,"method":"tools/call",
 "params":{"name":"format","arguments":{"yaml":"a:1\nb:2\n"}}}

Why this approach?

AI agents that edit YAML configuration today regex-replace andcorrupt comments, indentation, and document structure. The sameagent fixing a port number in a Kubernetes manifest can shiftevery comment by a line, reorder sibling keys, or striptrailing 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; thesurrounding comments and indentation pass through untouched.This server is the protocol shim that lets MCP-aware clientsdrive that engine safely:

  • Lossless mutation. tools/call set returns a documentbyte-identical to the input outside the touched span.
  • Surgical reads. tools/call get walks the dotted pathand returns just the value, not the whole tree.
  • Schema validation. tools/call validate --schema runsthe same JSON Schema 2020-12 engine noyavalidate ships.
  • Stdio transport. Standard MCP. Works with everyspec-compliant client.

Connect

Claude Desktop / Claude Code

claude mcp add noyalib $(which noyalib-mcp)

Cursor

~/.cursor/mcp.json:

{
  "mcpServers": {
    "noyalib": {
      "command": "noyalib-mcp"
    }
  }
}

Zed

~/.config/zed/settings.json:

{
  "context_servers": {
    "noyalib": {
      "command": { "path": "noyalib-mcp" }
    }
  }
}

Continue.dev

~/.continue/config.json:

{
  "experimental": {
    "modelContextProtocolServers": [
      { "transport": { "type": "stdio", "command": "noyalib-mcp" } }
    ]
  }
}

Any other MCP-aware client

Point at the binary; the transport is stdio with newline-delimited JSON-RPC 2.0.

Tools exposed

The v0.0.1 server registers two file-oriented tools — bothoperate on a YAML file at file: <path>, not on inline sourcestrings, so an agent's edits land on disk losslessly:

Tool Arguments Returns
noyalib_get { file: string, path: string } The raw source fragment at the dotted/indexed path (e.g. server.host, items[0].name). No re-quoting; no canonicalisation.
noyalib_set { file: string, path: string, value: string } 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.

Each tool's full input schema lives in the response totools/list. The server also handles the standardinitialize / initialized / notifications/cancelledlifecycle.

Format / parse / validate are not exposed as MCP tools today —they're available via the noya-clibinaries (noyafmt, noyavalidate) and thenoyalib library API. Promotion tofirst-class MCP tools is on the v0.0.2+ roadmap.

Examples

Agent-driving demos undercrates/noyalib-mcp/examples/:

Script What it shows
handshake.sh initializetools/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.
chmod +x crates/noyalib-mcp/examples/*.sh
crates/noyalib-mcp/examples/handshake.sh | jq -c .

POSIX-shell only — no jq, no node dependencies. Pipethrough jq -c . if you want pretty-printed JSON responses.

Verification

The npm wrapper and the GHCR image both consume the signedbinary attached to every GitHub Release. To verify theunderlying binary before trusting it:

COSIGN_EXPERIMENTAL=1 cosign verify-blob \
  --certificate-identity-regexp 'https://github.com/sebastienrousseau/noyalib-mcp/' \
  --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \
  --certificate <artefact>.pem \
  --signature   <artefact>.sig \
  <artefact>

The npm wrapper additionally carries annpm provenance attestation:

npm view noyalib-mcp provenance

Full cookbook: pkg/VERIFY.md.

When not to use noyalib-mcp

  • You don't trust your AI agent with filesystem access atall. noyalib-mcp doesn't read or write files itself —every operation takes the YAML document as a string argumentand returns the result as a string. The agent decides whatto do with the result. If the agent has filesystem access,it can persist the response wherever it wants.
  • You need a sandboxed schema registry. noyalib-mcp acceptsschemas as inline strings in tools/call validate; it doesnot fetch schemas from URLs. If your workflow needsnetwork-resolved schemas, the agent is responsible forfetching the schema first and passing the bytes.

Compatibility

MSRV: Rust 1.75.0 stable — same floor as the corenoyalib library. The MCP wire surface is text-only JSON-RPCand pulls no nightly-only deps. CI verifies the floor on everyPR via the Per-crate MSRV workflow job. The bump policylives indoc/POLICIES.md.

Tier-1 platforms (CI-verified each PR): aarch64-apple-darwin,x86_64-unknown-linux-gnu, x86_64-pc-windows-msvc. Thebinary writes via atomic file replacement on every platform —on Windows via MoveFileExW(MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH) semantics.

Documentation

Related MCP Servers

Sibling MCP servers by the same author — open-source, Apache-2.0 licensed, targeting banking and financial-services AI agents. noyalib-mcp complements them by giving agents lossless YAML editing for structured configuration files:

Server Purpose
pain001-mcp Generate & validate ISO 20022 pain.001 payment initiation files (Customer Credit Transfer)
bankstatementparser-mcp Parse bank statements (BAI2, MT940/MT942, CAMT.053, OFX, CSV) into structured transactions
camt053-mcp Parse & reconcile ISO 20022 camt.053 bank-to-customer statements — CBPR+/HVPS+ ready
acmt001-mcp Generate & validate ISO 20022 acmt.001 account management messages

MCP Registry

mcp-name: io.github.sebastienrousseau/noyalib-mcp

License

Dual-licensed under Apache 2.0or MIT, at your option.

MCP Server · Populars

MCP Server · New

    ROCTUP

    1C Metacode MCP Server

    MCP сервер с встроенным AI агентом для поиска по графу метаданных и кода конфигураций 1С

    Community ROCTUP
    nhevers

    r0x-os

    Official SDK, Claude Code plugin and facilitator docs for r0x, the x402 facilitator for Robinhood Chain.

    Community nhevers
    scarletkc

    Vexor

    A semantic search engine for files and code.

    Community scarletkc
    marmutapp

    SuperBased Observer

    Local-first cost & token tracking for Claude Code, Cursor, Codex & 23 more AI coding agents — proxy-accurate per-model spend, an MCP server your agent can query, and an opt-in team rollup. 100% local, no telemetry.

    Community marmutapp
    Intuition-Lab

    Persome

    Local-first macOS Runtime that turns cross-app activity into an inspectable personal model for MCP agents.

    Community Intuition-Lab