Claude Messages
AI
Puts the Anthropic Messages API behind a gateway that authenticates the caller, pins the model, caps the output and writes an audit record — so a shared model endpoint is a governed one rather than a shared API key.
What you get
claude.message— one Messages API call, with the model fixed andmax_tokenscapped.claude.models.list— which models this key can reach.
What you need
- Anthropic API key — from console.anthropic.com. Spend lands on whichever workspace the key belongs to, so prefer a workspace key over an organisation-wide one.
- Model — optional; already set to a current model. It is fixed here rather than left to the caller, because the model is most of the cost.
- Maximum output tokens — optional; the ceiling on a single response, which is the cap that actually binds a bill.
- JWKS endpoint — the host where your identity provider publishes its signing keys, without a scheme.
- Token audience — the
audclaim your callers' tokens carry.
How it works
The HTTP backend sends a tool's arguments verbatim as the JSON request body. It has no way to add a field the caller did not send, which means "pin the model in the config" cannot be done by injecting one.
So the schema does it instead. model is a required argument whose enum has exactly one member — the value you filled in — and max_tokens carries a maximum taken from the same manifest. A caller must send both, and only the values this gateway allows will validate. Anything else is refused before a request is made, which is the difference between a cap and a suggestion.
The key itself never reaches the caller. On a managed gateway it is a dev.mcpg.credential.static target resolved per request; self-hosted, it stays in ${env.ANTHROPIC_API_KEY}.
Audit is on and fail_closed: if the sink is not accepting writes, the gateway refuses to serve rather than spending money it cannot account for.
Notes
claude.message allows two minutes. Long completions are normal, and a 30-second default would turn a working call into a timeout.
Changing the model later is a config edit, not a caller change — which is the point, but it does mean an agent cannot fall back to a cheaper model on its own. If you want that, add a second binding with its own pinned model rather than widening the enum.