Skip to content

Json To Typescript MCP tool

MCP findutils:json_to_typescript

Generate TypeScript interfaces or type aliases from a JSON sample. Nested objects become named declarations (or inline object types), arrays infer element unions, and identical shapes are declared once.

Arguments

application/json
  • json

    string required

    JSON sample (an object, or an array of objects).

  • root_name

    string optional

    Name of the root type. Default: "Root". Default "Root".

  • output_type

    string optional

    "interface" or "type" (type alias). Default: "interface". One of interface · type. Default "interface".

  • naming_convention

    string optional

    Type-name casing: "pascal" or "camel". Default: "pascal". One of pascal · camel. Default "pascal".

  • make_optional

    boolean optional

    Mark every property optional with "?". Default: false. Default false.

  • add_export

    boolean optional

    Prefix declarations with "export". Default: true. Default true.

  • inline_nested_objects

    boolean optional

    Write nested objects inline instead of as separate declarations. Default: false. Default false.

Example arguments

Verified
{
  "json": {
    "id": 1,
    "user": {
      "name": "A"
    }
  }
}