# feat\(server\): /mcp narrows a client's modes from T3-Mode-Limit · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/76d6c7cd8f8ed3aa31e0ab389ad3716ce4e87297)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 76d6c7cd8f8ed3aa31e0ab389ad3716ce4e87297

Requested commit: 76d6c7cd8f8ed3aa31e0ab389ad3716ce4e87297

Commit: 76d6c7cd8f8ed3aa31e0ab389ad3716ce4e87297

Tree: 1365a18ffed03e9aae3cc50b6f9e75c234e3a3f2

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
feat(server): /mcp narrows a client's modes from T3-Mode-Limit

An OAuth client on /mcp is capped by the access it was approved with.
When another environment calls on behalf of one of its agents, that agent
may run under narrower modes, and the target has no way to know.

/mcp now reads `T3-Mode-Limit: <runtimeMode>/<interactionMode>` from OAuth
clients and caps the request at the narrower of the two. The header can
only narrow: a broader one changes nothing, and a malformed one is
refused with 400. The client's interaction mode can now be capped too;
before, it was always default.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

```

## Parents

- [5d27ecd79c33a642efcdf259e89e3eba5a560247](https://git.cafe/pingdotgg/t3code/commit/5d27ecd79c33a642efcdf259e89e3eba5a560247?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/76d6c7cd8f8ed3aa31e0ab389ad3716ce4e87297?format=markdown)
