Skip to content

Plist Json Converter MCP tool

MCP findutils:plist_json_converter

Convert an Apple property list (Info.plist, preferences, .mobileconfig, entitlements) to JSON, or JSON to an XML plist. Reads XML plists and binary bplist00 files; binary input is passed as base64 with input_encoding "base64". plist-to-json maps dict to object, array to array, integer and real to numbers, true/false to booleans, <date> to an ISO 8601 string and <data> to a base64 string, and lists every date and data path in warnings so the conversion is explainable. Integers beyond JavaScript's safe range are kept as strings. json-to-plist writes an XML plist 1.0 with the Apple DOCTYPE and tab indentation (binary output is not produced): whole numbers become <integer> unless written with a decimal point, ISO 8601 UTC strings become <date> (iso_strings_as_dates), strings starting with data_prefix become <data>, and null is refused because plists have no null. mode is detected when omitted: a leading "{" or "[" is JSON, "<" is an XML plist, and "bplist" bytes are binary. Signed profiles and OpenStep-style plists are refused with a reason.

Arguments

application/json
  • input

    string required

    The XML plist or JSON text, or the base64 of a binary plist when input_encoding is "base64".

  • mode

    string optional

    Direction: "plist-to-json" or "json-to-plist". Detected from the input when omitted. One of plist-to-json · json-to-plist.

  • input_encoding

    string optional

    How input is encoded: "text" (default) or "base64" for binary plists and any file bytes. One of text · base64. Default "text".

  • indent

    integer optional

    JSON indentation in spaces, 0-8. Default 2; 0 writes compact JSON. Ignored for json-to-plist, which indents with tabs like Apple tools. Default 2.

  • data_output

    string optional

    plist-to-json only: "base64" (default) writes <data> as base64 strings; "summary" writes a byte count instead, which cannot be converted back. One of base64 · summary. Default "base64".

  • iso_strings_as_dates

    boolean optional

    json-to-plist only: write strings shaped like 2024-01-31T12:00:00Z as <date>. Default true. Default true.

  • data_prefix

    string optional

    json-to-plist only: strings starting with this prefix are decoded from base64 and written as <data>. Default "base64:"; an empty string turns it off. Default "base64:".

Example arguments

Verified
{
  "input": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleName</key>\n\t<string>Demo</string>\n\t<key>CFBundleVersion</key>\n\t<integer>42</integer>\n</dict>\n</plist>\n"
}