{{define "content"}} {{with .Data}}

An assistant or a script can read this router's state and logs and edit its settings through an MCP endpoint at {{.URL}} and, with the same features, a REST API described by OpenAPI (/api/v1/…). It needs a token, sent as Authorization: Bearer …. A read token reads state and settings; a change token can also edit the settings. Edits are saved but never applied: you review them under Changes and apply them yourself. Secrets are never sent, and every call is logged below.

{{if .Secret}}

Token for {{.Name}}:

{{.Secret}}

For Claude Code: claude mcp add --transport http router {{.URL}} --header "Authorization: Bearer {{.Secret}}". The web UI's certificate is self-signed unless you set up a certificate: the client must trust it.

{{end}}
Tokens {{if .Tokens}}
{{range .Tokens}}{{end}}
NameAccessCreatedExpiresLast used
{{.Name}}{{.Scope}}{{.Created.Format "2006-01-02"}} {{if .Expires.IsZero}}never{{else if .Expired}}expired {{.Expires.Format "2006-01-02"}}{{else}}{{.Expires.Format "2006-01-02"}}{{end}} {{if .LastUsed.IsZero}}never{{else}}{{.LastUsed.Format "2006-01-02 15:04"}}{{end}}
{{else}}

No tokens yet.

{{end}}
New token
Recent calls {{if .Audit}}
{{range .Audit}}{{end}}
TimeTokenToolArgumentsResult
{{.Time.Format "2006-01-02 15:04:05"}}{{.Token}}{{.Tool}} {{.Args}}{{if .Error}}{{.Error}}{{else}}ok{{end}}
{{else}}

Nothing yet.

{{end}}
{{end}} {{end}}