Files
davidandClaude Opus 5.5 da2d56f8d2 Phase 11, part 1: agents and their keys
Agents are users of kind agent, each given modules to read, or to read
and act on, and the CRM scope. Admins make them under Settings → Agents,
on every edition; keys (sm_…) are shown once and kept as hashes, can
expire, be rotated (the old one works a day) or revoked, and record their
last use. /mcp takes agent keys and offers each agent only the tools its
scopes allow. On the local edition, mcp-token is the key of a built-in
Hermes agent with the CRM and the Market.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 10:26:31 -07:00

18 lines
1.3 KiB
HTML

{{define "content"}}{{template "settings-start" .}}{{with .Data}}
<p><a href="/settings/agents/{{.Agent.ID}}">← {{.Agent.Name}}</a></p>
<h2>{{if eq .Why "rotated"}}{{.Agent.Name}}'s new key{{else}}{{.Agent.Name}}'s key{{end}}</h2>
<section class="card">
<p><strong>Copy it now: it isn't shown again.</strong> Only a hash of it is kept.</p>
<pre id="key">{{.Key}}</pre>
<button type="button" class="secondary" data-copy="key">Copy</button>
{{if eq .Why "rotated"}}<p class="help">The old key keeps working for another day; switch whatever uses it to this one.</p>{{end}}
{{if .Hermes}}<p class="help">It's also in <code>mcp-token</code> in the data folder now. Hermes itself uses the socket and needs nothing; Claude Code's setup needs the new key: <code>claude mcp remove supermarket</code>, then add it again as below.</p>{{end}}
</section>
<section class="card">
<h2>Using it</h2>
<p>An MCP client reaches <code>{{.MCPURL}}</code> (streamable HTTP) with the header <code>Authorization: Bearer &lt;key&gt;</code>. For Claude Code:</p>
<pre id="claude">claude mcp add --transport http supermarket {{.MCPURL}} --header "Authorization: Bearer {{.Key}}"</pre>
<button type="button" class="secondary small" data-copy="claude">Copy</button>
</section>
{{end}}{{template "settings-end"}}{{end}}