Skip to content

Env Yaml Converter MCP tool

MCP findutils:env_yaml_converter

Convert a dotenv .env file to a flat YAML map, or YAML back to KEY=value lines. The shape option wraps the map as a pasteable Docker Compose (services.app.environment) or GitHub Actions (jobs.app.env) snippet rather than a whole file. Comments, blank lines and an "export " prefix are handled, and a duplicate key keeps the last value and is reported. Values stay strings unless infer_types is on, matching what process.env returns. The reverse direction accepts a flat mapping or one of those snippet shapes and rejects nested values instead of inventing nested names. Not a Kubernetes Secret generator and not a shell parser.

Arguments

application/json
  • input

    string required

    The .env text or the YAML document to convert.

  • mode

    string optional

    Conversion direction. Default: env-to-yaml. One of env-to-yaml · yaml-to-env. Default "env-to-yaml".

  • shape

    string optional

    env-to-yaml: "plain" is a flat map (default); "compose" wraps it under services.app.environment; "actions" wraps it under jobs.app.env. One of plain · compose · actions. Default "plain".

  • indent

    integer optional

    env-to-yaml: YAML indentation width (1-8). Default: 2. Default 2.

  • infer_types

    boolean optional

    env-to-yaml: turn unquoted numbers, true, false and null into YAML types. Default: false (every value stays a string, as process.env returns it). Default false.

  • skip_empty

    boolean optional

    Leave out keys whose value is empty. Default: false. Default false.

  • export_prefix

    boolean optional

    yaml-to-env: prefix every line with "export ". Default: false. Default false.

Example arguments

Verified
{
  "input": "API_URL=https://example.com\nDEBUG=true"
}