For the complete documentation index, see llms.txt. This page is also available as Markdown.

config export

Exports current configuration, generating a pair of safe and portable configuration files

Synopsis

Exports current configuration, generating a pair of safe and portable configuration files.

Using a project's required configuration (e.g. .mcpd.toml) and the locally configured runtime values from the execution context file (e.g. ~/.config/mcpd/secrets.dev.toml), the export command outputs two files:

Environment Contract:

Lists all required and configured environment variables as secure, namespaced placeholders:

MCPD__{SERVER_NAME}__{VAR_NAME} - Creates placeholders for both environment variables and command line arguments to be populated with env vars

This file is intended for the platform operator or CI/CD system

Portable Execution Context:

  • A new secrets .toml file that defines sanitized runtime args and env sections for each server using the placeholders aligned with the environment contract

  • These files are safe to check into version control if required.

This allows running an mcpd project in any environment, cleanly separating the configuration structure from the secret values

mcpd config export [flags]

Options

      --context-output string    Optional, specify the output path for the templated execution context config file (default "secrets.prod.toml")
      --contract-output string   Optional, specify the output path for the templated environment file (default ".env")
      --format format            Specify the format of the contract output file (one of: dotenv) (default dotenv)

Options inherited from parent commands

SEE ALSO

  • mcpd config - Manages configuration for MCP servers

Auto generated by spf13/cobra on 14-Aug-2026

Last updated