> 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
