Invantive MCP Server is started from a shell, from a service manager or from a container. Almost everything it needs is configured in `appsettings.json` and in the [[Environment Variables]]; the command line carries what differs from one run to the next: the addresses it listens on, the environment it runs as, and the folder it reads its configuration from.
The program has no options of its own. It hands the command line to the .NET host on which it runs, so it accepts the options of that host and no usage is available: `--help` starts the server like any other run.
An option is written as `--name=value`. `/name=value` works as well, and the value may also follow as a separate argument, as in `--urls http://*:8080`. Options are not case sensitive and may be given in any order. The colon is not a separator between name and value, since it separates the section from the key: `--urls:http://*:8080` is read as a name without a value and has no effect. A single dash is not accepted: `-urls=http://*:8080` stops the start with exit code 6.
## Options
The following options are accepted:
- `--urls=<urls>`: listen on these addresses, separated by semicolons, for example `http://*:8080`. Defaults to the addresses in the configuration.
- `--environment=<name>`: run as this environment, which selects `appsettings.<name>.json` next to `appsettings.json`. Defaults to `Production`.
- `--contentRoot=<folder>`: read the configuration files from this folder. Defaults to the current folder of the process, which is not necessarily the folder the program is in.
## Overruling a Setting of the Configuration File
Every setting of `appsettings.json` can be overruled by naming its section and its key:
```
Invantive.Mcp.Server --Mcp:RedirectHttps=false
```
The command line is read last and therefore wins: a value given there overrules the environment variables, which in turn overrule `appsettings.<environment>.json` and `appsettings.json`. The section of the product is `Mcp`. A setting overruled this way is not remembered; a value which is to hold for every run belongs in the configuration file.
## See Also
The following topics are related:
- [[Invantive MCP Server/Configuration|Configuration]]
- [[Environment Variables]]
## Exit Code
The program ends with an exit code which a batch file or a scheduler reads to decide whether the next step may run. It returns 0 and 6; the meaning of every code is listed in [[Exit Codes/Exit Codes|Exit Codes]].