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

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

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

Visibility: public

Requested revision: d868b6296c8a24bbc150ebb4d96d264316206099

Requested commit: d868b6296c8a24bbc150ebb4d96d264316206099

Commit: d868b6296c8a24bbc150ebb4d96d264316206099

Tree: 26d11749cb2d254a3048f18815d3b290525dab19

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

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

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