set_agent_key
Store a bearer agent key for the current MCP session to authenticate subsequent agent operations without exposing the key in conversation history.
Instructions
Store a bearer agent key for the duration of this MCP session.
Use this immediately after register_agent returns an agent_key — it lets update_agent, call_agent, and review_transaction authenticate without restarting the server or changing environment variables.
Why not pass the key on each individual tool call? Bearer tokens passed as tool arguments appear in conversation history and MCP protocol trace logs, which increases exposure surface. Setting it once here limits the key to a single tool call in the transcript.
The key is held in memory only and does not survive a server restart. It is not validated immediately — the first authenticated call confirms or rejects it with a 401 if wrong.
AGENT_KEY env var always takes precedence over a key set here. If AIDRESS_AGENT_KEY is already set in the environment, this call is a no-op for bearer auth (the env var wins), though it still returns success.
agent_key — the aidress-agent-sk-... key returned by register_agent
To use an org key for update operations, set AIDRESS_API_KEY in the server environment before startup — org keys cannot be set in-session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_key | Yes |