# Goose email extension: add an MCP inbox

> Add Trotta Mail to goose as a Streamable HTTP extension: the config.yaml block, the goose configure path, and how to stop it sending without asking.

Source: https://trotta.email/integrations/goose

Add a streamable_http extension to goose's config.yaml with the URI https://api.trotta.email/mcp, an Authorization header and TROTTA_MAIL_API_KEY listed in env_keys. goose runs autonomously by default, so switch to approve mode, or load only the read and draft tools, before it handles mail.

Updated December 3, 2026

## Add the extension in config.yaml

You need a key. If you have none, sign the agent up and export the `api_key` as `TROTTA_MAIL_API_KEY`.

Sign up:

```bash
curl -X POST https://api.trotta.email/v1/agents/signup \
  -H "Content-Type: application/json" \
  -d '{"display_name": "Riley"}'
```

Then merge this into `~/.config/goose/config.yaml`. On Windows the file is `%APPDATA%\Block\goose\config\config.yaml`.

`config.yaml`:

```text
extensions:
  trotta:
    type: streamable_http
    name: trotta
    enabled: true
    uri: https://api.trotta.email/mcp
    env_keys:
      - TROTTA_MAIL_API_KEY
    headers:
      Authorization: "Bearer ${TROTTA_MAIL_API_KEY}"
    timeout: 300
```

`env_keys` is the line to get right. goose fills `${TROTTA_MAIL_API_KEY}` only from names listed there or under `envs`. It looks in your environment, then in its secret store. A name it does not find is sent as written.

## Or add it with goose configure

1. Run `goose configure` and choose **Add Extension**.
2. Choose **Remote Extension (Streamable HTTP)** and name it `trotta`.
3. Enter `https://api.trotta.email/mcp`, then a timeout and a description.
4. Add a custom header: `Authorization`, with the value `Bearer` followed by your key.

This path writes the key into the config as typed. You can also skip the key: leave `env_keys` and `headers` out, and goose opens a browser sign-in when the server asks for one.

## Will goose send email without asking?

Yes, by default. goose starts in Autonomous mode and uses extensions without approval. Change that before it touches mail.

| Mode | `GOOSE_MODE` | With this inbox |
| --- | --- | --- |
| Autonomous (default) | `auto` | Sends without asking |
| Smart Approval | `smart_approve` | Asks for what it judges to be a write |
| Manual Approval | `approve` | Asks before every tool call |

Set `GOOSE_MODE: "approve"` in `config.yaml`, or type `/mode approve` in a session. Smart Approval leaves the read or write call to the model, so it is the weaker choice for mail.

## Load only the tools the job needs

`available_tools` limits what goose loads from an extension. Added to the entry above, this list lets goose read and draft, with no way to send:

Under extensions.trotta:

```text
    available_tools:
      - list_inboxes
      - get_inbox_updates
      - wait_for_message
      - read_message
      - thread_context
      - create_draft
```

It also saves room: goose's docs advise fewer than 25 enabled tools across all extensions, and the full inbox is 15 of them.

## What goose reads from the inbox

- Delivered mail in the safe view: hidden text removed, instructions aimed at a model marked, risky links defanged.
- Held mail as a reason with no content. A human releases it.
- Verification codes in its own inbox, by `wait_for_message` with `has_code`.

No filter catches everything, and goose can run commands on your computer. See [agent hijacking](https://trotta.email/threats/agent-hijacking). Before a human claims the agent it only replies, up to 50 sends a day, and writes to its own organization's inboxes. There is no IMAP or SMTP.

These steps follow the goose docs and source code at version 1.61.1, checked on 2026-12-03.

## Questions

### Does goose support a remote MCP server with a bearer header?

Yes. Use a `streamable_http` extension with a `headers` map. goose no longer supports SSE.

### Why did goose send the variable name instead of the key?

The name is missing from `env_keys`, or no value was found for it, so goose left the `${...}` text as it was.

### Can goose get an email address with no account?

Yes. The signup call returns an inbox and a key. A human claims the agent later so it can write to new addresses.

### Can I add the server for one session only?

Yes, with `goose session --with-streamable-http-extension "https://api.trotta.email/mcp"`, signing in through the browser when asked.

## Sources

- [goose docs: Configuration files](https://goose-docs.ai/docs/guides/config-files)
- [goose docs: Extensions](https://goose-docs.ai/docs/getting-started/using-extensions)
- [goose docs: Permission modes](https://goose-docs.ai/docs/guides/managing-tools/goose-permissions)
- [goose docs: Tool permissions](https://goose-docs.ai/docs/guides/managing-tools/tool-permissions)
- [goose source: extension config](https://github.com/aaif-goose/goose/blob/v1.61.1/crates/oi-kit-agent/src/extension.rs)
- [Trotta Mail guide for agents (llms.txt)](https://api.trotta.email/llms.txt)

## Related

- [Give OpenCode an email inbox over MCP](https://trotta.email/integrations/opencode) Integrations
- [Give Claude Code an email inbox over MCP](https://trotta.email/integrations/claude-code) Integrations
- [MCP](https://trotta.email/docs/mcp) Docs
- [An email MCP server for any MCP client](https://trotta.email/integrations/mcp) Integrations
- [Human in the loop email](https://trotta.email/learn/human-in-the-loop-email) Guides
- [Agent hijacking](https://trotta.email/threats/agent-hijacking) Threat library

Give your agent an inbox of its own. One call, or one minute in the console.

[Get an inbox](https://trotta.email/signup) [Read the docs](https://trotta.email/docs)
