> For the complete documentation index, see [llms.txt](https://docs.mozilla.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mozilla.ai/mcpd/configuration/execution-context.md).

# Execution Context

## Global Configuration

{% hint style="info" %}
**Precedence**

The order of precedence for these options is:\
`CLI flag > environment variable > default value`
{% endhint %}

## Runtime File Path

All commands support an optional parameter to specify the location of the `mcpd` runtime file which provides the execution context.

You can provide this path in multiple ways:

* CLI flag: `--runtime-file <path>`
* Environment variable: `MCPD_RUNTIME_FILE=<path>`
* Default: `~/.config/mcpd/secrets.dev.toml`

{% hint style="info" %}
**XDG\_CONFIG\_HOME environment variable**

mcpd honors the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/latest/), respecting the `XDG_CONFIG_HOME` environment variable. This forms the base directory where `mcpd` will create an application folder.
{% endhint %}

***

The runtime file is modified using the following commands:

* `mcpd config args set`
* `mcpd config env set`

These values apply at runtime and are separate from your **project-specific** `.mcpd.toml`.

***

## Sample Configuration File

```toml
[servers]
  [servers.fetch]
    args = ["--ignore-robots-txt", "--user-agent=mcpd/1.0.0"]
    [servers.fetch.env]
      foo = "bar"
  [servers.time]
    args = ["--local-timezone=Europe/London"]
    [servers.time.env]
      baz = "123"
      qwerty = "xyz"
```

{% hint style="warning" %}
**Manual Changes**

The Execution Context Configuration file is automatically updated by `mcpd config` commands, you shouldn't edit it by hand unless absolutely necessary.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mozilla.ai/mcpd/configuration/execution-context.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
