Skip to content

json

Query, merge, and validate JSON. Pure compute, no I/O — auto-registered by the installer.

Usage

bash
native-mcp json

No flags.

Tools

query

Extract a value from JSON using a simple path expression.

FieldTypeRequiredDescription
inputstringyesJSON document.
pathstringyesPath expression.

Path syntax

  • $ — root
  • .field — object field
  • [N] — array index (0-based)
  • ["weird key"] or ['weird key'] — object key with non-identifier characters

Example: $.users[0].name, $["my-key"][3].

The result is pretty-printed JSON.

merge

FieldTypeRequiredDescription
astringyesFirst JSON document.
bstringyesSecond JSON document; its keys win on conflict.
deepboolnoIf true, recursively merge nested objects (RFC 7396-ish).

Non-object inputs cause b to win wholesale.

validate

FieldTypeRequiredDescription
inputstringyesJSON document.

Returns valid JSON plus the top-level type and a one-level-deep shape summary on success, an error otherwise.

Register in Claude Code

bash
claude mcp add native-json native-mcp json

Released under the MIT License.