---
url: /mcp-servers/allowing.md
---
# Allowing servers

On a terminal, a run that finds a required input without a value asks for it before anything starts. Pandra first shows the server, where its values go (`URL:`, or `Command:` and `Args:`), and its inputs, then asks for each input in turn:

```text
MCP server "slack" of ghcr.io/acme/notifier
  Server:  com.slack/slack-mcp 2.0.0 (MCP Registry, registry.modelcontextprotocol.io)
  URL:     https://mcp.slack.com/mcp
  Input:   tenant-id: Slack workspace ID
  Input:   token (secret): Slack bot token
✓ tenant-id: Value: T0123
✓ tenant-id: Keep it? For this run only
? token: How do you want to provide it? (arrows move, enter chooses, esc goes back, q cancels)
> Use a saved secret
  Type or paste the value
  Give its source
```

A saved secret, or a source given as [`pandra config secret set`](/secrets/stores.md) takes it, is read at once. A typed value is hidden. For an input that is a whole header value, such as GitHub's `Authorization`, Pandra then asks whether to send it as it is, as `Bearer <value>`, or with another template. After each value, `Keep it?` offers `For this run only` and `Save for next time`, which reads as follows for a typed value:

```text
? token: Keep it? (arrows move, enter chooses, esc goes back, q cancels)
> For this run only
  Save in the OS keychain for next time
```

With `--no-config`, Pandra uses every answer for this run only and does not ask. A typed value is saved only in the OS keychain; where there is no keychain, Pandra uses it for this run only and does not ask either. A typed value or a source you save becomes a new [logical secret](/secrets.md), and Pandra asks its name, such as `token: Secret name (notifier-slack-token):`, where Enter takes the name in parentheses. Escape goes back to the question before, and at the first question it cancels the run.

Once every input is answered, saving writes an MCP configuration, its assignment, and the allowed server to your configuration file, with the new logical secret when an answer defines one, and prints the lines it added. Ctrl-C cancels the run and saves no input value. [`--yes`](/automate.md#what---yes-does) never answers these questions.

## Inputs

An input is a value a server needs from you, such as a token, a workspace ID, or an endpoint. Each input has a name and a description, says whether it is required or secret, and can have a default or a list of allowed values. To see an agent's inputs, and which ones your configuration sets:

```sh
pandra agent inspect github.com/acme/reviewer@v1.2.0
pandra config show --agent github.com/acme/reviewer
```

`pandra config show --agent` lists, for each server, its MCP configuration, where each input comes from, whether the server is allowed, and the commands for anything missing, without reading secret values. Inputs get values only from your configuration or the agent's defaults: a shell variable that shares an input's name is never used. To use one, register it as a secret with `pandra config secret set NAME --env VAR`.

## Supplying values

### With commands

`pandra config mcp set` creates an MCP configuration, assigns it to an agent's server, and allows the server, with one option per input:

```sh
pandra config secret set slack-token --1password op://Work/Slack/token
pandra config mcp set slack-work --agent github.com/acme/notifier \
    --server slack --secret token=slack-token --value tenant-id=T0123
```

```text
Allowed MCP server "slack" of github.com/acme/notifier to receive its inputs
  Server:  com.slack/slack-mcp 2.0.0 (MCP Registry, registry.modelcontextprotocol.io)
  URL:     https://mcp.slack.com/mcp
  Inputs:  tenant-id  <- "T0123"
           token      <- secret slack-token (1Password op://Work/Slack/token)
```

`--secret INPUT=SECRET` takes a [logical secret](/secrets.md), and only for an input the server declares secret. `--value INPUT=TEXT` takes a literal, and not for a secret input. The command is your consent, so it asks nothing.

Some servers expect a whole header value as the input. GitHub's server takes `Authorization` as `Bearer ghp_...`, so `--format` adds a template and the secret holds the token as GitHub issued it:

```sh
pandra config secret set github-token --command "gh auth token"
pandra config mcp set github --agent github.com/acme/reviewer \
    --server github --secret Authorization=github-token \
    --format Authorization='Bearer {}'
```

To reuse an MCP configuration for another agent's server, which is then shown and allowed in its own right:

```sh
pandra config mcp use slack-work --agent github.com/acme/reporter --server slack
```

The configuration file then holds these tables, beside the `[allowed-servers]` records of what you allowed:

```toml
[mcp.slack-work]
inputs.tenant-id = "T0123"
inputs.token = { secret = "slack-token" }

[mcp.github]
inputs.Authorization = { secret = "github-token", format = "Bearer {}" }

[agents."github.com/acme/notifier"]
mcp.slack = "slack-work"

[agents."github.com/acme/reporter"]
mcp.slack = "slack-work"

[agents."github.com/acme/reviewer"]
mcp.github = "github"
```

`pandra config mcp list` lists MCP configurations with the agents that use them, and `pandra config mcp remove NAME` removes one that nothing uses. The keys of `[mcp.<name>]` are in the [`config.toml` reference](/reference/config-toml.md#mcpname).

### In one guided step

`pandra config setup AGENT` walks through every server of an agent, asks for its required and then its optional inputs, and allows the servers. `--template` and `--file` do the same without a terminal ([setting up an agent](/configure/setup.md)).

### Without a terminal

A run without a terminal that finds a missing input fails before anything starts. The error gives the `pandra config setup` commands that print a template of the agent's inputs and apply it once you fill it in ([setting up an agent](/configure/setup.md)). A run of `github.com/acme/notifier` whose `slack` server has no token prints:

```text
error: github.com/acme/notifier@v1.2.0 cannot start: 1 problem
  MCP server "slack" of github.com/acme/notifier needs input "token" (secret), which is not configured.
    Server:  com.slack/slack-mcp 2.0.0 (MCP Registry, registry.modelcontextprotocol.io)
    URL:     https://mcp.slack.com/mcp
    Input:   token (secret): Slack bot token
  To print a template to fill in:
    pandra config setup github.com/acme/notifier@82e4bb23c92b5f84820a42e9ad5f75716ce0519d --template
  To apply the filled-in template:
    pandra config setup github.com/acme/notifier@82e4bb23c92b5f84820a42e9ad5f75716ce0519d --file FILE
```

## When Pandra asks again

Pandra records what you allowed in the `[allowed-servers]` table of your configuration file: which value goes to which input, and where the values go (a remote server's URL, or a local server's package or command with its fixed arguments). An assignment you wrote by hand is recorded the first time it runs. Before reading any secret, every run compares each server with its record:

| Situation | On a terminal | Without a terminal |
| --- | --- | --- |
| Allowed and unchanged, or not yet recorded | Runs | Runs |
| Changed since you allowed it | Asks, showing what changed | Fails, showing what changed |

A new version of the same package or registry entry keeps the permission, and so does a new value behind a logical secret, so updates and secret rotation need no new approval. A change in where the values go, or in which value goes to which input, withholds them:

```text
error: github.com/acme/notifier@v1.0.0 cannot start: 1 problem
  MCP server "slack" of github.com/acme/notifier has changed since it was allowed.
    Allowed URL: https://mcp.slack.com/mcp
    Current URL: https://collector.example/mcp
    Withheld:    tenant-id <- "T0123"; token <- secret slack-token
  To allow the new server:
    pandra config mcp use slack-work --agent github.com/acme/notifier --server slack
  To run exactly the checked package:
    pandra run github.com/acme/notifier@82e4bb23c92b5f84820a42e9ad5f75716ce0519d --headless --prompt 'Post the summary.'
```

Run `pandra config mcp use` to allow the current server.

When `pandra config mcp set` changes an MCP configuration that other agents also use, each of them must allow it again. The command's output ends with them, with the command for each:

```text
Also used by github.com/acme/reporter:slack; each must allow it again:
  pandra config mcp use slack-work --agent github.com/acme/reporter --server slack
```

A run that an agent starts records nothing: it fails with `mcp_server_not_allowed` and the command for you to run.

## How values reach servers

The generated harness configuration holds only placeholders or names of environment variables ([how a value reaches the harness](/secrets/using.md#how-a-value-reaches-the-harness)):

* **Remote servers.** A secret header reaches the harness as a placeholder, and Pandra's proxy puts the real value in its place only in requests to the server's origin (scheme, host, and port). After a redirect to another origin, the placeholder arrives there instead of the secret, and Pandra warns.
* **Local servers.** A package server or a `command` replacement receives its values as environment variables. It starts with a small baseline of environment variables plus its own `env`, so no server sees another server's values, except on Pi, which gives each local server all of its own environment variables. Other variables of your shell do not reach it either, so configure a runner with a file such as `.npmrc` or `uv.toml`, not with a variable such as `NPM_CONFIG_REGISTRY`. The values pass through the harness's own environment variables, so the agent can read them.
* **Your own logins.** Runs never use the logins you made for your own harness, such as with `claude mcp login`. On Pi, a login made during a run stays in that run's harness home.

Some values a harness cannot pass to a server as written stop the run before the harness starts, and `pandra run --dry-run` shows them. The harness pages list the cases: [Claude Code](/harnesses/claude-code.md#mcp-servers), [Codex](/harnesses/codex.md#mcp-servers), and [Pi](/harnesses/pi.md#mcp-servers).
