Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configure Rustybin from an AI agent

Every Rustybin instance runs a management MCP server at /_rustybin/mcp, so an agent such as Claude Code can configure it for you: create and deploy OpenAPI mocks, change their responses, rules and security, send test requests, mint tokens, and read what your gateway sent. Ask in plain words ("mock openapi/orders.yaml, secure it with JWT and tell me which token the gateway needs") and the agent picks the tools.

This is not the mock MCP server at /mcp, which serves fake tools for MCP gateway demos. Both speak the same protocol versions and transports; the management server sits on the control plane, so control-plane authentication protects it, and its tools call the same code as the REST routes under /_rustybin/*: permissions, redaction, size caps and error messages are identical.

Connect an agent

The server is at https://<host>/_rustybin/mcp (streamable HTTP), with the credential as Authorization: Bearer <token>. In Claude Code:

claude mcp add --transport http rustybin https://<host>/_rustybin/mcp \
  --header "Authorization: Bearer <token>"

Connect your coding agent has the configuration for Claude Code, Codex CLI, Cursor, OpenCode, VS Code, Windsurf, Gemini CLI and Zed (with the token in an environment variable), how to get a credential, the rights to give, each client's tool limits and a walkthrough of building a test platform.

The web console fills the command in for you: "Connect an agent" in the AI agents view and "Connect an AI agent" in the Mock APIs view show it, and the mcpServers JSON, with this instance's URL and the credential the console already holds (the token of your password sign-in, a control token, the admin token or a visit's manage token). The token stays masked until you ask to see it; the copy buttons copy the real value. A script gets the same token from POST /_rustybin/login (see User name and password).

Clients that only speak stdio use the bridge built into the binary. It reads one JSON-RPC message per line on stdin, posts it to the server and writes the answers to stdout:

rustybin mcp-stdio --server https://<host>/_rustybin/mcp --token <token>
# a visitor on a self-service demo
rustybin mcp-stdio --server https://<host> --header 'X-Rustybin-Mock-Token: rbm_...'
# a profile of `rustybin login`: its URL and its agent sign-in, else its token
rustybin mcp-stdio --profile mocks.example.com
# the instance's URL: the token of the profile kept for it
rustybin mcp-stdio --url https://mocks.example.com

--server falls back to RUSTYBIN_MCP_URL (a bare base URL gets /_rustybin/mcp appended) and --token to RUSTYBIN_TOKEN or RUSTYBIN_ADMIN_TOKEN. --profile and --url read the command line's profiles.json, so a local agent manages a remote instance with the sign-in rustybin login already did; without any of them the default profile is used.

A sign-in of the agent's own, from the terminal. A stdio client has no browser flow of its own, so the command line does it once:

rustybin login --agent --url https://mocks.example.com
rustybin mcp-stdio --profile mocks.example.com

rustybin login --agent walks the instance's own OAuth sign-in: it registers as the client Rustybin CLI, opens your browser on the console's consent page (--no-browser prints the address instead), you sign in there if asked, choose what to grant and approve, and a loopback address on this machine takes the answer (PKCE; only the callback carrying this sign-in's state is accepted; --wait is how long it waits, 300 seconds by default). --scope admin | console | inspector | harness caps what may be granted. The access token (an hour), the refresh token (thirty days) and the client id are kept in the profile under agent, in profiles.json (mode 0600), beside your own token when the profile has one. rustybin mcp-stdio uses a profile's agent sign-in before its token, renews the access token with the refresh token shortly before it expires (and once after a 401) and writes the new pair back; when the renewal is refused (the agent was revoked, you signed out everywhere, your user was disabled, thirty days passed) it says to sign in again.

The agent acts for you: it is listed in AI agents with you as its owner, limited and revoked like any other, and a new rustybin login --agent is the same agent (the same registration), so its rights and a revocation stay. This credential is for rustybin mcp-stdio only: the instance accepts these tokens on /_rustybin/mcp and nowhere else, so no other command sends them. A profile that holds only an agent sign-in, and an agent token given as --token or RUSTYBIN_TOKEN, are refused by the other commands before any call, with a message that says so (exit 3); sign in with rustybin login for those. rustybin logout forgets the profile's agent sign-in too; rustybin agents revoke <id> ends it on the instance. Not offered where the built-in sign-in is off (an open control plane, shared mode, a self-service instance, RUSTYBIN_CONTROL_OAUTH=off, an external authorization server): give mcp-stdio a token there.

The bridge handles one request at a time and does not relay requests the server sends while a call runs. Clients on protocol 2026-07-28 get confirmation questions inside the call's own response, so they work. An older client that declares elicitation never sees the question through the bridge, and destructive tools fail after the server's wait: there, leave elicitation out and let the model pass "confirm": true after the user agreed (see Confirmations).

On an instance whose control plane asks for credentials you can also leave the header out and sign in through the browser.

Sign in with OAuth

Where the control plane asks for credentials (RUSTYBIN_CONTROL_AUTH=password, the default, token or jwt), an agent can sign in instead of you pasting a token:

claude mcp add --transport http rustybin https://<host>/_rustybin/mcp

The first call answers 401 with an RFC 9728 resource_metadata pointer. The client reads the metadata, finds Rustybin's own authorization server at /_rustybin/oauth, registers itself and opens your browser on the console's consent page (/ui/#/authorize/<id>). Sign in to the console there if it asks (with the admin token or a control JWT, as usual), check the agent's name and where the browser will be sent back to (a warning shows when that is not your own machine), choose what to grant and approve. The agent gets a token and carries on.

POST {{secured_url}}/_rustybin/mcp
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 401
[Asserts]
header "WWW-Authenticate" contains "resource_metadata=\"{{secured_url}}/.well-known/oauth-protected-resource/_rustybin/mcp\""
GET {{secured_url}}/.well-known/oauth-protected-resource/_rustybin/mcp
HTTP 200
[Asserts]
jsonpath "$.resource" == "{{secured_url}}/_rustybin/mcp"
jsonpath "$.authorization_servers[0]" == "{{secured_url}}/_rustybin/oauth"
jsonpath "$.scopes_supported" contains "admin"
jsonpath "$.scopes_supported" contains "console"
jsonpath "$.scopes_supported" contains "inspector"

GET {{secured_url}}/.well-known/oauth-authorization-server/_rustybin/oauth
HTTP 200
[Asserts]
jsonpath "$.issuer" == "{{secured_url}}/_rustybin/oauth"
jsonpath "$.authorization_endpoint" == "{{secured_url}}/_rustybin/oauth/authorize"
jsonpath "$.token_endpoint" == "{{secured_url}}/_rustybin/oauth/token"
jsonpath "$.registration_endpoint" == "{{secured_url}}/_rustybin/oauth/register"
jsonpath "$.code_challenge_methods_supported" contains "S256"
jsonpath "$.token_endpoint_auth_methods_supported" contains "none"

What you can grant. The consent page offers full access (admin), read only (console) and traffic only (inspector), the same scopes as control JWTs, and lists the permissions the agent will hold. When a user approves (the console signed in with a user name and password), the agent acts for that user: it holds the user's permissions within the scope, resolved again at every call, never more than the user; a scope is offered when it gives at least one permission the user holds. Approved with a credential that is no user (the admin token, a control JWT), the scopes are capped by that credential as before: a console signed in with a console scope token can let an agent read, not change anything, and an admin grant is admin on the management server, like the admin token there.

What the token opens. Only /_rustybin/mcp on this instance and host: the token is bound to that URL (RFC 8707), and every other control-plane route, the data plane's admin checks and other instances refuse it. Access tokens last an hour; the agent renews them with a refresh token (30 days) without asking you again, and a refresh can narrow the scopes, never widen them. A user's tokens carry the user and the user's sign-in generation, so the user's sign out everywhere, password change, disable or removal ends them, refresh tokens included.

The key. Client registrations and tokens are signed with a key, so no client or token is stored and nothing grows on the server. The key comes from RUSTYBIN_CONTROL_OAUTH_KEY (32 characters or more), else it is a random key kept in <state>/control-oauth.key with a state directory, else it is random per process; it is never derived from the admin token. Rotating it signs every agent out. With a key per process a restart signs agents out too, and several replicas behind one URL need RUSTYBIN_CONTROL_OAUTH_KEY set to the same value (or one state directory). Single tokens cannot be revoked. Sign-in requests are limited per client address (an IPv6 /64) and for every address together, and one client keeps at most three pending consents (a new one replaces its oldest).

Clients. Registration is open (RFC 7591), for public clients with PKCE (S256) only. Redirect URIs are https, http on a loopback address (any port when the agent signs in, as native apps pick a free one) or an app's own scheme (cursor://...). A failed request goes back to the agent only when it waits on a loopback address; for any other redirect URI the browser shows the error, so the server never redirects anywhere on someone else's behalf.

Client ID metadata documents (off by default). Current MCP clients can name themselves with the https URL of a document that describes them instead of registering. To honour one the instance has to fetch that URL, a call out on the word of a caller who has not signed in yet, so it does that only when you turn it on and only to hosts you named:

  • The setting oauth.client_metadata_documents (the AI agents view's settings, rustybin settings set oauth.client_metadata_documents true, update_settings, or settings: of your own rustybin.yaml; no environment variable). A document pulled from git never changes it. While it is off the metadata says client_id_metadata_document_supported: false and a URL as client_id is no client.
  • The fetch goes through the outbound policy under the purpose client_metadata, which has no default: name the hosts of the clients you expect in egress.allow. A host outside it is refused before any call.
  • https only (plain http only for a document on a loopback address, which the policy refuses unless egress.allow_loopback is on), no redirect followed, at most 5 KiB, five seconds. The URL has a path, no fragment, no credentials and no . or .. segments.
  • The document's client_id must be the URL it was fetched from, it describes a public client (no secret, token_endpoint_auth_method none or absent), and its redirect URIs follow the rules of registration (at most 10).
  • A document is kept for five minutes and a refusal for 30 seconds (at most 64), so a loop of sign-in requests is not a loop of calls, and a sign-in request counts against its address's allowance before the instance calls out.
  • The consent page shows the host the document came from and says that the name is the client's own claim: nothing verifies it beyond that address.
GET {{secured_url}}/.well-known/oauth-authorization-server/_rustybin/oauth
HTTP 200
[Asserts]
jsonpath "$.client_id_metadata_document_supported" == false

# A client id that is a URL is no client while the setting is off, and
# nothing is fetched.
GET {{secured_url}}/_rustybin/oauth/authorize
[Query]
response_type: code
client_id: {{secured_url}}/mock/docs-agent-site/client.json
redirect_uri: http://127.0.0.1:40123/callback
code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
code_challenge_method: S256
HTTP 400
[Asserts]
header "Content-Type" contains "text/html"
body contains "oauth.client_metadata_documents"
PATCH {{secured_url}}/_rustybin/settings
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{
  "values": {
    "oauth.client_metadata_documents": true,
    "egress.allow": ["127.0.0.1"],
    "egress.allow_loopback": true
  }
}
HTTP 200
[Asserts]
jsonpath "$.changed" contains "oauth.client_metadata_documents"

GET {{secured_url}}/.well-known/oauth-authorization-server/_rustybin/oauth
HTTP 200
[Asserts]
jsonpath "$.client_id_metadata_document_supported" == true
# No registration: the client id is the document's URL. The instance fetches
# it (once; it is kept for five minutes) and checks it before anyone is asked.
GET {{secured_url}}/_rustybin/oauth/authorize
[Query]
response_type: code
client_id: {{secured_url}}/mock/docs-agent-site/client.json
redirect_uri: http://127.0.0.1:40123/callback
code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
code_challenge_method: S256
scope: console
state: docs-state
HTTP 302
[Captures]
document_request: header "Location" regex "^/ui/#/authorize/(.+)$"

# The consent page is told where the name comes from: the client's own claim.
GET {{secured_url}}/_rustybin/oauth/requests/{{document_request}}
Authorization: Bearer {{admin_token}}
HTTP 200
[Asserts]
jsonpath "$.client_name" == "Docs agent"
jsonpath "$.client_document.url" == "{{secured_url}}/mock/docs-agent-site/client.json"
jsonpath "$.client_document.host" matches "^127\\.0\\.0\\.1:\\d+$"

POST {{secured_url}}/_rustybin/oauth/requests/{{document_request}}
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{"decision": "approve", "scope": "console"}
HTTP 200
[Captures]
document_code: jsonpath "$.redirect_to" regex "[?&]code=([^&]+)"

# The token is issued to the document's URL as the client.
POST {{secured_url}}/_rustybin/oauth/token
[Form]
grant_type: authorization_code
client_id: {{secured_url}}/mock/docs-agent-site/client.json
code: {{document_code}}
code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
redirect_uri: http://127.0.0.1:40123/callback
HTTP 200
[Asserts]
jsonpath "$.scope" == "console"
jsonpath "$.access_token" exists
# A host the operator did not name is refused before any call.
GET {{secured_url}}/_rustybin/oauth/authorize
[Query]
response_type: code
client_id: https://192.0.2.10/client.json
redirect_uri: http://127.0.0.1:40123/callback
code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
code_challenge_method: S256
HTTP 400
[Asserts]
body contains "outbound policy"

# Plain http is for a document on this computer only.
GET {{secured_url}}/_rustybin/oauth/authorize
[Query]
response_type: code
client_id: http://agent.example/client.json
redirect_uri: http://127.0.0.1:40123/callback
code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
code_challenge_method: S256
HTTP 400
[Asserts]
body contains "must be an https URL"

The MCP inspector of another Rustybin is such a client: its document is at /.well-known/rustybin-inspector-client.json of that instance, outside its control plane, so naming that instance's host in egress.allow is all it takes. The address 0.7.0 served the document at, /_rustybin/oauth/inspector-client.json, is refused here whatever the allowlist says, because the outbound policy never calls a /_rustybin path on any host (an inspector of 0.7.0 registers instead, as before). Here the instance takes its own inspector's document:

# The inspector of a Rustybin as the client: its document's address outside
# the control plane, and the console's callback as the redirect URI.
GET {{secured_url}}/_rustybin/oauth/authorize
[Query]
response_type: code
client_id: {{secured_url}}/.well-known/rustybin-inspector-client.json
redirect_uri: {{secured_url}}/ui/callback
code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
code_challenge_method: S256
scope: console
HTTP 302
[Captures]
inspector_request: header "Location" regex "^/ui/#/authorize/(.+)$"

GET {{secured_url}}/_rustybin/oauth/requests/{{inspector_request}}
Authorization: Bearer {{admin_token}}
HTTP 200
[Asserts]
jsonpath "$.client_name" == "Rustybin MCP inspector"
jsonpath "$.client_document.url" == "{{secured_url}}/.well-known/rustybin-inspector-client.json"

POST {{secured_url}}/_rustybin/oauth/requests/{{inspector_request}}
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{"decision": "deny"}
HTTP 200

# The address 0.7.0 served it at is under a control plane: the outbound
# policy never calls one, whatever the allowlist says.
GET {{secured_url}}/_rustybin/oauth/authorize
[Query]
response_type: code
client_id: {{secured_url}}/_rustybin/oauth/inspector-client.json
redirect_uri: {{secured_url}}/ui/callback
code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
code_challenge_method: S256
HTTP 400
[Asserts]
body contains "outbound policy"
body contains "control plane"

With the setting on and no host named, every document is refused before any call. The diagnostics warn about it (the check client_documents, quiet while the setting is off):

# The hosts named for it: the check is content.
GET {{secured_url}}/_rustybin/diagnostics
Authorization: Bearer {{admin_token}}
HTTP 200
[Asserts]
jsonpath "$.checks[?(@.id == 'client_documents')].status" contains "ok"

# On with no host named: every document is refused, and the check says so.
DELETE {{secured_url}}/_rustybin/settings/egress.allow
Authorization: Bearer {{admin_token}}
HTTP 200

GET {{secured_url}}/_rustybin/diagnostics
Authorization: Bearer {{admin_token}}
HTTP 200
[Asserts]
jsonpath "$.checks[?(@.id == 'client_documents')].status" contains "warn"
jsonpath "$.checks[?(@.id == 'client_documents')].message" contains "permits no host"
jsonpath "$.checks[?(@.id == 'client_documents')].fix" contains "egress.allow"

The mock authorization server behind /mcp/protected (the data plane's demo identity provider) never fetches a client's URL: it knows its demo clients and the ones registered with it. To test a client's document flow, point the client at /_rustybin/mcp with the setting on, or use the inspector to test a server's.

These are the requests an agent makes, step by step. The console's part is the consent API, called with its credential:

POST {{secured_url}}/_rustybin/oauth/register
Content-Type: application/json
{"client_name": "Docs agent", "redirect_uris": ["http://127.0.0.1:33418/callback"]}
HTTP 201
[Captures]
client_id: jsonpath "$.client_id"
[Asserts]
jsonpath "$.client_id" startsWith "rbc."
jsonpath "$.token_endpoint_auth_method" == "none"
jsonpath "$.grant_types" contains "refresh_token"

# Plain http only for loopback addresses.
POST {{secured_url}}/_rustybin/oauth/register
Content-Type: application/json
{"client_name": "Somewhere", "redirect_uris": ["http://agent.example/callback"]}
HTTP 400
[Asserts]
jsonpath "$.error" == "invalid_redirect_uri"
GET {{secured_url}}/_rustybin/oauth/authorize
[Query]
response_type: code
client_id: {{client_id}}
redirect_uri: http://127.0.0.1:40123/callback
code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
code_challenge_method: S256
scope: admin console inspector
state: docs-state
resource: {{secured_url}}/_rustybin/mcp
HTTP 302
[Captures]
request_id: header "Location" regex "^/ui/#/authorize/(.+)$"
[Asserts]
header "Location" startsWith "/ui/#/authorize/"
GET {{secured_url}}/_rustybin/oauth/requests/{{request_id}}
Authorization: Bearer {{admin_token}}
HTTP 200
[Asserts]
jsonpath "$.client_name" == "Docs agent"
jsonpath "$.redirect_kind" == "loopback"
jsonpath "$.scopes_requested" count == 3
jsonpath "$.scopes_grantable" count == 3

POST {{secured_url}}/_rustybin/oauth/requests/{{request_id}}
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{"decision": "approve", "scope": "console"}
HTTP 200
[Captures]
code: jsonpath "$.redirect_to" regex "[?&]code=([^&]+)"
[Asserts]
jsonpath "$.redirect_to" startsWith "http://127.0.0.1:40123/callback?code="
jsonpath "$.redirect_to" contains "state=docs-state"
POST {{secured_url}}/_rustybin/oauth/token
[Form]
grant_type: authorization_code
client_id: {{client_id}}
code: {{code}}
code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
redirect_uri: http://127.0.0.1:40123/callback
HTTP 200
[Captures]
access_token: jsonpath "$.access_token"
refresh_token: jsonpath "$.refresh_token"
[Asserts]
header "Cache-Control" == "no-store"
jsonpath "$.token_type" == "Bearer"
jsonpath "$.scope" == "console"
jsonpath "$.expires_in" == 3600

# A code works once.
POST {{secured_url}}/_rustybin/oauth/token
[Form]
grant_type: authorization_code
client_id: {{client_id}}
code: {{code}}
code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
HTTP 400
[Asserts]
jsonpath "$.error" == "invalid_grant"
POST {{secured_url}}/_rustybin/mcp
Authorization: Bearer {{access_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.tools[*].name" contains "list_mocks"
jsonpath "$.result.tools[*].name" not contains "create_mock"

# The token opens the management MCP server only.
GET {{secured_url}}/_rustybin/config
Authorization: Bearer {{access_token}}
HTTP 401
POST {{secured_url}}/_rustybin/oauth/token
[Form]
grant_type: refresh_token
client_id: {{client_id}}
refresh_token: {{refresh_token}}
HTTP 200
[Asserts]
jsonpath "$.scope" == "console"
jsonpath "$.access_token" exists

# A refresh can narrow the scopes, never widen them.
POST {{secured_url}}/_rustybin/oauth/token
[Form]
grant_type: refresh_token
client_id: {{client_id}}
refresh_token: {{refresh_token}}
scope: admin
HTTP 400
[Asserts]
jsonpath "$.error" == "invalid_scope"
# Without PKCE the request goes back to a loopback client with an error.
GET {{secured_url}}/_rustybin/oauth/authorize
[Query]
response_type: code
client_id: {{client_id}}
redirect_uri: http://127.0.0.1:40123/callback
state: docs-state
HTTP 302
[Asserts]
header "Location" startsWith "http://127.0.0.1:40123/callback?error=invalid_request"

# An unknown client never gets a redirect: a page explains the error.
GET {{secured_url}}/_rustybin/oauth/authorize
[Query]
response_type: code
client_id: rbc.not-a-client.x
redirect_uri: http://127.0.0.1:40123/callback
HTTP 400
[Asserts]
header "Content-Type" contains "text/html"
body contains "Unknown client"

An external issuer. With RUSTYBIN_CONTROL_OAUTH_ISSUER=https://... the metadata names that authorization server instead and the built-in one answers 404. The tokens it issues must be the control JWTs the instance already accepts (RUSTYBIN_CONTROL_JWT_PUBLIC_KEY, aud equal to RUSTYBIN_CONTROL_JWT_AUDIENCE): the way for a hosting platform to sign agents in with its own accounts.

When it is off. On an open control plane (nothing asks for credentials, so no 401 starts the flow), in shared mode (API keys authenticate there), and with RUSTYBIN_CONTROL_OAUTH=off. The metadata documents need no API key even with RUSTYBIN_REQUIRE_KEY, since an agent reads them before it holds anything. Self-service visitors keep sending their visit's manage token as a header.

Credentials and what they allow

The agent gets the permissions its credential has, no more: every tool declares the permission it needs (the tables below). tools/list shows only the tools the caller may use; a tool called anyway answers a tool error saying which permission is missing (permission_required: mocks.write), never a protocol error.

InstanceCredentialTools
Open control plane, no admin tokennoneAll
Open control plane with RUSTYBIN_ADMIN_TOKENnoneReads, tests and traffic; no changes
the admin token (Authorization: Bearer, or X-Rustybin-Admin-Token)All
password control auth (the default)the token of a sign-in with the console's user name and password (POST /_rustybin/login)All
password / token / jwt control authno token401, like the rest of the control plane
a sign-in of another user, or a control JWT with rb_roles / rb_permsWhat its roles' permissions allow
control JWT, console scopeReads (settings, saved tests, source control and agents included), tests and traffic
control JWT, inspector scopeTraffic only
control JWT, harness scopeThe harness tools
the admin token, or a control JWT with the admin scopeAll
Public modenoneReads, tests and traffic (the inspector needs a session); changes are forbidden
Self-service demononeReads and tests, plus create_mock (the first one starts a visit)
the visit's manage token (X-Rustybin-Mock-Token)The above, changes to the visit's own mocks, get_visit, extend_visit
Shared modean API key (X-Rustybin-Key)The key's own mocks, inspector entries and usage

get_instance reports what the caller is (caller.admin, caller.user, the user it acts for, caller.via, caller.scopes, caller.roles, caller.permissions), so an agent can explain why a tool is missing. On a secured instance:

POST {{secured_url}}/_rustybin/mcp
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 401
[Asserts]
header "WWW-Authenticate" == "Bearer realm=\"rustybin-control\", resource_metadata=\"{{secured_url}}/.well-known/oauth-protected-resource/_rustybin/mcp\""
POST {{secured_url}}/_rustybin/mcp
Authorization: Bearer {{console_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.tools[*].name" contains "list_mocks"
jsonpath "$.result.tools[*].name" contains "try_request"
jsonpath "$.result.tools[*].name" not contains "create_mock"
jsonpath "$.result.tools[*].name" not contains "apply_config"

# A tool the scope does not allow answers a tool error, never a protocol error.
POST {{secured_url}}/_rustybin/mcp
Authorization: Bearer {{console_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: set_health
{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "set_health", "arguments": {"healthy": false}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == true
jsonpath "$.result.content[0].text" contains "not allowed"
POST {{secured_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_instance
{"jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": {"name": "get_instance", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.structuredContent.caller.admin" == true
jsonpath "$.result.structuredContent.control_auth" == "jwt"
jsonpath "$.result.structuredContent.caller.permissions" contains "settings.write"
jsonpath "$.result.structuredContent.caller.roles" contains "admin"

Managing agents

Every client that calls the server is an agent: its credential plus the name it gives in clientInfo (sent with initialize, or in _meta of a 2026-07-28 call). Two clients on the same token are two agents; a client that sends no name is unknown. The identity rule: the name only tells agents apart in the list. A revocation, and the rights you set on an agent, follow its credential: every agent of the same credential (the same admin token, API key, visit, user's sign-in, JWT subject or OAuth client) is refused while one is revoked, and must also pass the limits set on the others, so a new client name never starts over. Rules of rustybin.yaml still match by name. On an open control plane an agent is known only by its session label, which it can change: turn the sign-in on to control agents for real. The console's AI agents view (under AI and agents) lists them with the user each acts for (the Owner column, with a filter), their credential, first and last seen, calls today and in total, open sessions and status (active, idle, revoked), and opens one to show its calls per tool with their outcomes (ok, error, denied, asked to confirm), its last errors and its sessions. The live feed shows calls as they happen. The same data is at GET /_rustybin/agents (agents.read for everyone's; a user's own without it):

POST {{secured_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_instance
{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_instance", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}, "io.modelcontextprotocol/clientInfo": {"name": "docs-agent", "version": "1.0.0"}}}}
HTTP 200
GET {{secured_url}}/_rustybin/agents
Authorization: Bearer {{admin_token}}
HTTP 200
[Captures]
agent_id: jsonpath "$.agents[?(@.name == 'docs-agent')].id"
[Asserts]
jsonpath "$.agents[?(@.name == 'docs-agent')].credential.kind" == "admin"
jsonpath "$.agents[?(@.name == 'docs-agent')].version" == "1.0.0"
jsonpath "$.agents[?(@.name == 'docs-agent')].calls.ok" >= 1
jsonpath "$.agents[?(@.name == 'docs-agent')].rights.ceiling" == "full"
jsonpath "$.policy.default_ceiling" == "full"

Rights. An agent never gets more than its credential allows (a user's agent, more than its user); the operator can give it less. A ceiling caps its tools: a role, built-in or custom (viewer, editor, a role of your own: the tools whose permission the role grants), or one of the four 0.3 ceilings, which keep exactly the tools they had: read-only (read tools, no captured traffic; nearest to viewer), traffic (every read tool; viewer plus traffic.read), manage (reads and mock changes; nothing instance-wide, no visit operator tools, no harness; nearest to editor) or full (whatever the credential allows: a user's own). A 0.3 name wins over a custom role of the same name, and a ceiling naming a role that does not exist (any more) allows nothing. An allow list narrows it to the tools named; a deny list removes tools. A tool outside its rights is not in its tools/list, and calling it anyway answers a tool error that says the operator limited the agent. Rights come from, field by field: the agent's own (set in the console or with PATCH /_rustybin/agents/{id}), else the first matching rule of rustybin.yaml's agents: section, else (for the ceiling) the default for a role of its user (the agents.default_ceiling_for setting, entries role=ceiling such as admin=editor; the first entry whose role the user holds), else the default ceiling (the agents.default_ceiling setting, RUSTYBIN_AGENTS_DEFAULT_CEILING, full by default).

PATCH {{secured_url}}/_rustybin/agents/{{agent_id}}
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{"rights": {"ceiling": "read-only", "deny": ["try_request"]}, "note": "documentation example"}
HTTP 200
[Asserts]
jsonpath "$.rights.ceiling" == "read-only"
jsonpath "$.rights.source" == "agent"
jsonpath "$.note" == "documentation example"

# The same token under the same client name now sees read tools only.
POST {{secured_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}, "io.modelcontextprotocol/clientInfo": {"name": "docs-agent", "version": "1.0.0"}}}}
HTTP 200
[Asserts]
jsonpath "$.result.tools[*].name" contains "list_mocks"
jsonpath "$.result.tools[*].name" not contains "create_mock"
jsonpath "$.result.tools[*].name" not contains "try_request"
agents:
  default_ceiling: traffic
  rules:
    - match: { name: "claude-*", credential: oauth }
      ceiling: manage
      deny: [delete_mock, apply_config]
      note: Team assistants sign in with OAuth
    - match: { credential: admin }
      ceiling: full
    - match: { role: admin }
      ceiling: editor
      note: An admin's agents build, they do not administer
    - match: { user: "ci-*" }
      ceiling: viewer

match.name is the client's name, case insensitive, with * as a wildcard; match.credential is admin, user (any user's agent), console (a user's agent on a sign-in token), jwt, oauth (a token of the built-in OAuth server, a user's or not), key, visit or open; match.user is the user the agent acts for (a sign-in name, with *, or a user id) and match.role a role that user holds (neither matches an agent that acts for nobody). A saved or environment default ceiling wins over the file's default_ceiling. Whatever a document says, a document pulled from git included, an agent acting for a user never holds more than the user: a ceiling only takes away.

Revoke refuses every call of the agent (a tool error saying it was revoked), ends its sessions (their next request answers 403), and revokes its tokens for their remaining life: the console sign-in tokens and OAuth access tokens it used, and an OAuth client's refresh tokens. An OAuth client is shared by every user who registers the same metadata (registration is open and the client id follows from it), so the revocation of a user's OAuth agent refuses that user's tokens of the client only, never another user's. Revoking an agent that is revoked already changes nothing: who revoked it, and when, stay (the answer says already_revoked). Restore undoes all of it. The admin token cannot be revoked per agent (rotate RUSTYBIN_ADMIN_TOKEN; meanwhile every agent on the admin token is refused, whatever name it sends); API keys are revoked in the key registry. If you gave an agent your own console token, revoking it signs your console out too. End sessions closes the agent's handshake-era sessions without revoking it.

POST {{secured_url}}/_rustybin/agents/{{agent_id}}/revoke
Authorization: Bearer {{admin_token}}
HTTP 200
[Asserts]
jsonpath "$.revoked" == true
jsonpath "$.note" contains "RUSTYBIN_ADMIN_TOKEN"

POST {{secured_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: list_mocks
{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "list_mocks", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}, "io.modelcontextprotocol/clientInfo": {"name": "docs-agent", "version": "1.0.0"}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == true
jsonpath "$.result.content[0].text" contains "revoked"
POST {{secured_url}}/_rustybin/agents/{{agent_id}}/restore
Authorization: Bearer {{admin_token}}
HTTP 200
[Asserts]
jsonpath "$.restored" == true

PATCH {{secured_url}}/_rustybin/agents/{{agent_id}}
Authorization: Bearer {{admin_token}}
Content-Type: application/json
{"rights": null, "note": null}
HTTP 200
[Asserts]
jsonpath "$.rights.source" == "default"
# End the agent's sessions without revoking it (a stateless 2026-07-28 client
# holds none, so nothing is ended here; a 2025 session client would reconnect).
DELETE {{secured_url}}/_rustybin/agents/{{agent_id}}/sessions
Authorization: Bearer {{admin_token}}
HTTP 200
[Asserts]
jsonpath "$.id" == "{{agent_id}}"
jsonpath "$.sessions_ended" isInteger

The live feed is Server-Sent Events, one call event per tool call (the agent, the tool, the outcome and the latency) and an agent event on revoke and restore:

curl -sN --max-time 2 -H "Authorization: Bearer $ADMIN_TOKEN" "$BASE/_rustybin/agents/events"
Route
GET /_rustybin/agentsThe agents (each with owner, the user it acts for, and owner_label) and the policy (default ceiling, the defaults per role, rules); ?owner=<user> keeps one user's
GET /_rustybin/agents/eventsServer-Sent Events: a call per tool call, an agent event on revoke and restore (at most 16 listeners)
GET /_rustybin/agents/{id}One agent: its user, calls per tool, last errors, sessions, the tools and whether its rights allow each
PATCH /_rustybin/agents/{id}{"rights": {"ceiling", "allow", "deny"} | null, "note": "..." | null}; a ceiling is a role or a 0.3 ceiling
POST /_rustybin/agents/{id}/revoke, /restoreRevoke or restore
DELETE /_rustybin/agents/{id}/sessionsEnd its sessions

Everyone's agents need agents.read to see and agents.manage to change; a user without them sees, limits, revokes and ends the sessions of their own (see below). The registry keeps at most 512 agents (the least recently seen goes first, agents with rights, a note or a revocation last), 20 errors, 32 sessions and 16 token ids per agent. With RUSTYBIN_STATE_DIR, rights, notes, revocations and the call totals are kept in <state>/agents.json; sessions and errors are not. On an open control plane anyone may connect under any name, so rights there are advisory: turn on the console sign-in to control agents for real. Explain what this agent did (with an AI key) summarises an agent's calls, errors and rights.

Agents act for a user

With the password sign-in, an agent that signs in as a user works on that user's behalf and never does more than they may: an agent on a user's sign-in token (pasted as a bearer, or the token of rustybin login), and an agent whose OAuth sign-in a user approved on the consent page. Its permissions are the user's, resolved at every call (a role change of the user applies to the agent's next call), within the scope it was given, then its ceiling, its allow and deny lists, the rules and the defaults take away from that. The admin token and control JWTs stay credentials of their own: their agents act for nobody, and the list says so (owner is null, owner_label names the credential).

# Dana's agent on his own sign-in token: the tools of his role, never more.
POST {{password_url}}/_rustybin/mcp
Authorization: Bearer {{dana_agent}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}, "io.modelcontextprotocol/clientInfo": {"name": "docs-dana-agent", "version": "1.0"}}}}
HTTP 200
[Asserts]
jsonpath "$.result.tools[*].name" contains "create_mock"
jsonpath "$.result.tools[*].name" contains "list_agents"
jsonpath "$.result.tools[*].name" not contains "apply_config"
jsonpath "$.result.tools[*].name" not contains "list_users"
# The admin sees whose agent it is; ?owner= keeps one user's.
GET {{password_url}}/_rustybin/agents?owner=docs-dana
Authorization: Bearer {{admin}}
HTTP 200
[Captures]
agent_id: jsonpath "$.agents[?(@.name == 'docs-dana-agent')].id"
[Asserts]
jsonpath "$.owner" == "{{dana_id}}"
jsonpath "$.agents[?(@.name == 'docs-dana-agent')].credential.kind" == "user"
jsonpath "$.agents[?(@.name == 'docs-dana-agent')].credential.via" == "sign-in"
jsonpath "$.agents[?(@.name == 'docs-dana-agent')].owner.name" == "docs-dana"
jsonpath "$.agents[?(@.name == 'docs-dana-agent')].owner_label" == "docs-dana"

# Dana holds no agents.read: he sees his own agents, nobody else's.
GET {{password_url}}/_rustybin/agents
Authorization: Bearer {{dana}}
HTTP 200
[Asserts]
jsonpath "$.owner" == "{{dana_id}}"
jsonpath "$.agents" count == 1

GET {{password_url}}/_rustybin/agents?owner=rustybin
Authorization: Bearer {{dana}}
HTTP 403
[Asserts]
jsonpath "$.reason" == "permission_required"
jsonpath "$.permission" == "agents.read"

Your own agents. Seeing everyone's agents needs agents.read (the viewer role and up hold it), changing them agents.manage. Without them a user sees their own agents, limits them (rights that only take tools away: a change that would let a tool through again is refused), revokes them, ends their sessions, and restores one they revoked themselves; one the operator revoked (or that was revoked when their user was disabled) is the operator's to restore, and revoking it again first does not make it theirs.

# A ceiling may name a role: the agent keeps the tools whose permission the
# role grants, within what Dana holds.
PATCH {{password_url}}/_rustybin/agents/{{agent_id}}
Authorization: Bearer {{admin}}
Content-Type: application/json
{"rights": {"ceiling": "viewer"}}
HTTP 200
[Asserts]
jsonpath "$.rights.ceiling" == "viewer"
jsonpath "$.rights.ceiling_kind" == "role"

POST {{password_url}}/_rustybin/mcp
Authorization: Bearer {{dana_agent}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}, "io.modelcontextprotocol/clientInfo": {"name": "docs-dana-agent", "version": "1.0"}}}}
HTTP 200
[Asserts]
jsonpath "$.result.tools[*].name" contains "list_mocks"
jsonpath "$.result.tools[*].name" not contains "create_mock"
# Dana may limit his own agent further, never widen it again.
PATCH {{password_url}}/_rustybin/agents/{{agent_id}}
Authorization: Bearer {{dana}}
Content-Type: application/json
{"rights": {"ceiling": "viewer", "deny": ["get_mock_spec"]}}
HTTP 200

PATCH {{password_url}}/_rustybin/agents/{{agent_id}}
Authorization: Bearer {{dana}}
Content-Type: application/json
{"rights": null}
HTTP 403
[Asserts]
jsonpath "$.permission" == "agents.manage"
jsonpath "$.error" contains "not widen it"

# He revokes it and restores it (he revoked it himself).
POST {{password_url}}/_rustybin/agents/{{agent_id}}/revoke
Authorization: Bearer {{dana}}
HTTP 200
[Asserts]
jsonpath "$.revoked" == true

POST {{password_url}}/_rustybin/agents/{{agent_id}}/restore
Authorization: Bearer {{dana}}
HTTP 200
[Asserts]
jsonpath "$.restored" == true

# An agent the admin revoked is the admin's to restore.
POST {{password_url}}/_rustybin/agents/{{agent_id}}/revoke
Authorization: Bearer {{admin}}
HTTP 200

POST {{password_url}}/_rustybin/agents/{{agent_id}}/restore
Authorization: Bearer {{dana}}
HTTP 403
[Asserts]
jsonpath "$.permission" == "agents.manage"

POST {{password_url}}/_rustybin/agents/{{agent_id}}/restore
Authorization: Bearer {{admin}}
HTTP 200

The consent page lists what the agent will hold: the approving user's permissions within the scope chosen, never more, and under projects (per scope in grants, and for the whole request) what it holds in each of the user's projects, there only. A user who holds something in a project only may grant a scope that gives them something there.

# An OAuth sign-in Dana approves: the consent page lists what the agent will
# hold, Dana's permissions within the scope, and the token acts for Dana.
POST {{password_url}}/_rustybin/oauth/register
Content-Type: application/json
{"client_name": "Dana's agent", "redirect_uris": ["http://127.0.0.1:33419/callback"]}
HTTP 201
[Captures]
client_id: jsonpath "$.client_id"

GET {{password_url}}/_rustybin/oauth/authorize
[Query]
response_type: code
client_id: {{client_id}}
redirect_uri: http://127.0.0.1:33419/callback
code_challenge: E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
code_challenge_method: S256
scope: admin
resource: {{password_url}}/_rustybin/mcp
HTTP 302
[Captures]
request_id: header "Location" regex "^/ui/#/authorize/(.+)$"

GET {{password_url}}/_rustybin/oauth/requests/{{request_id}}
Authorization: Bearer {{dana}}
HTTP 200
[Asserts]
jsonpath "$.approver.name" == "docs-dana"
jsonpath "$.acts_for_user" == true
jsonpath "$.scopes_grantable" contains "admin"
jsonpath "$.permissions" contains "mocks.write"
jsonpath "$.permissions" not contains "settings.write"
jsonpath "$.grants[0].scope" == "admin"

POST {{password_url}}/_rustybin/oauth/requests/{{request_id}}
Authorization: Bearer {{dana}}
Content-Type: application/json
{"decision": "approve", "scope": "admin"}
HTTP 200
[Captures]
code: jsonpath "$.redirect_to" regex "[?&]code=([^&]+)"

POST {{password_url}}/_rustybin/oauth/token
[Form]
grant_type: authorization_code
client_id: {{client_id}}
code: {{code}}
code_verifier: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
redirect_uri: http://127.0.0.1:33419/callback
HTTP 200
[Captures]
oauth_token: jsonpath "$.access_token"

# An admin scope, and still only what Dana may do.
POST {{password_url}}/_rustybin/mcp
Authorization: Bearer {{oauth_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 3, "method": "tools/list", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}, "io.modelcontextprotocol/clientInfo": {"name": "docs-dana-oauth", "version": "1.0"}}}}
HTTP 200
[Asserts]
jsonpath "$.result.tools[*].name" contains "create_mock"
jsonpath "$.result.tools[*].name" not contains "apply_config"

When a user goes. Disabling or deleting a user revokes every agent acting for them (their calls are refused, their sessions end, their tokens and their OAuth clients' refresh tokens are refused); enabling the user again leaves the agents revoked until someone restores them. Signing a user out everywhere, and a change of their password, ends their agents' tokens and sessions without revoking the agents. The first admin's password change signs out the first admin only (their sessions, portal sessions and agents), no longer every user; tokens the OAuth server issued before 0.5 count as the first admin's, so they end too. Only an OAuth sign-in approved with the admin token or a control JWT (an agent acting for nobody) outlives it: sign everyone out (DELETE /_rustybin/sessions) to end those.

# Disabling Dana revokes every agent acting for him and ends their sessions;
# his OAuth token is refused at once.
PATCH {{password_url}}/_rustybin/users/docs-dana
Authorization: Bearer {{admin}}
Content-Type: application/json
{ "disabled": true }
HTTP 200
[Asserts]
jsonpath "$.status" == "disabled"
jsonpath "$.agents_revoked" == 2

POST {{password_url}}/_rustybin/mcp
Authorization: Bearer {{oauth_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 4, "method": "tools/list", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 401

GET {{password_url}}/_rustybin/agents?owner={{dana_id}}
Authorization: Bearer {{admin}}
HTTP 200
[Asserts]
jsonpath "$.agents[*].status" not contains "active"
jsonpath "$.agents[*].status" contains "revoked"

Agents recorded before 0.5 (a console sign-in by user name, an OAuth client) are moved to their user at the first start with the password sign-in: a console record to the user of that name, an OAuth record to the first admin, with their rights, notes and revocations.

A secret at an agent's request

A secret is never a tool input: update_settings refuses one, and no tool returns one. So that an agent is not stuck when a job needs a provider key, a webhook token or a client secret, it can ask for the secret to be set, and a person who may set it types the value somewhere the agent is not: the console, or the command line's stdin. The agent reads only how its request stands.

It is off until someone turns it on (the agents.secret_requests setting, in the agents group, so the change needs settings.security):

# Let agents ask (a setting of the agents group: settings.security).
PATCH {{password_url}}/_rustybin/settings
Authorization: Bearer {{admin}}
Content-Type: application/json
{ "values": { "agents.secret_requests": true } }
HTTP 200
[Asserts]
jsonpath "$.changed" contains "agents.secret_requests"

The agent asks with request_secret: the setting's name (a secret setting get_settings lists) and a reason in a sentence. The answer is the request's id and state, and where a person goes; never a value.

# The agent asks: the setting's name and a reason. Never a value.
POST {{password_url}}/_rustybin/mcp
Authorization: Bearer {{agent}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: request_secret
{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "request_secret", "arguments": {"setting": "notify.webhook_token", "reason": "the nightly schedule posts its failures to the team webhook"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}, "io.modelcontextprotocol/clientInfo": {"name": "docs-secret-agent", "version": "1.0"}}}}
HTTP 200
[Captures]
request: jsonpath "$.result.structuredContent.request.id"
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.request.state" == "pending"
jsonpath "$.result.structuredContent.request.setting" == "notify.webhook_token"
jsonpath "$.result.structuredContent.request.set" == false
jsonpath "$.result.structuredContent.cli" == "rustybin settings fulfil {{request}}"
  • Asking needs settings.write (the tool's permission, as update_settings: an agent under the read-only, traffic or manage ceiling cannot ask, and a revoked agent is refused like on every tool) and what changing a setting of that group needs (settings.security for sso.*, git.write for git.*, portal.settings for portal.*): everything a person needs to set it except secrets.write.
  • Never console.password_hash (a password passes through nobody but its owner), and never a setting RUSTYBIN_SETTINGS_LOCK holds (the answer names its variable).
  • At most 3 requests of one agent wait at a time (10 asked per agent per hour, 32 waiting on the instance), each for 15 minutes. Asking again for the same setting answers the request that waits. A resolved request stays readable for an hour. Requests live in memory: none survives a restart, and none is in rustybin.yaml.
  • A client on protocol 2026-07-28 that declares the elicitation.url capability is sent the console's Management address to show the person, inside the call's own answer; it calls again and gets the request. Never a form: nothing typed at the agent could be the value.

A person fulfils or declines. In the console, Management shows a card Secrets an agent asked for above every tab while a request waits: the setting, the agent's id, the user it acts for and its credential (what the instance knows), then, set apart, the name the agent gave itself and its reason (what the agent claims, shown as text). Type the value and Set the secret, or Decline. While a request waits, the gear in the top bar shows how many do, from any view; the count goes when the last one is set, declined or expired. (The console asks the route below for it, about every 15 seconds while its tab is shown, only for a caller who may read requests, and seldom while the setting is off.) From the command line the value comes from a prompt without echo or from stdin, never an argument:

# What agents asked for: the setting, whose agent, and the agent's reason (its claim).
rustybin settings requests --state pending
request="$(rustybin settings requests --state pending --json | jq -r '.requests[] | select(.setting.key == "notify.webhook_token") | .id')"
# The value on stdin (or prompted without echo), never an argument: it goes to
# the settings store, and the agent reads only that the request was fulfilled.
rustybin settings fulfil "$request" --stdin < webhook-token.txt
rustybin settings get notify.webhook_token --json | jq -c '.value | {set, hint}'

The same over the API, for a caller with secrets.write (or a user reading their own agents' requests):

# A person with secrets.write reads what waits: the setting, the agent and the
# user it acts for, and the agent's reason as untrusted_reason (its claim).
GET {{password_url}}/_rustybin/secret-requests?state=pending
Authorization: Bearer {{admin}}
HTTP 200
[Asserts]
jsonpath "$.enabled" == true
jsonpath "$.pending" == 2
jsonpath "$.requests[?(@.id == '{{request}}')].setting.key" == "notify.webhook_token"
jsonpath "$.requests[?(@.id == '{{request}}')].setting.set" == false
jsonpath "$.requests[?(@.id == '{{request}}')].agent.untrusted_name" == "docs-secret-agent"
jsonpath "$.requests[?(@.id == '{{request}}')].agent.owner_label" == "rustybin"
jsonpath "$.requests[?(@.id == '{{request}}')].untrusted_reason" == "the nightly schedule posts its failures to the team webhook"
GET {{password_url}}/_rustybin/secret-requests/{{request}}
Authorization: Bearer {{admin}}
HTTP 200
[Asserts]
jsonpath "$.state" == "pending"
jsonpath "$.setting.needs" contains "secrets.write"
jsonpath "$.expires_in" > 0
# The person types the value: it goes to the settings store, as a PATCH of
# /_rustybin/settings would put it there, and the answer never carries it.
POST {{password_url}}/_rustybin/secret-requests/{{request}}/fulfil
Authorization: Bearer {{admin}}
Content-Type: application/json
{ "value": "whk_docs-example-value-k3Qx" }
HTTP 200
[Asserts]
jsonpath "$.state" == "fulfilled"
jsonpath "$.setting.set" == true
jsonpath "$.resolved_by" == "rustybin"
body not contains "whk_docs-example-value"

Fulfilling writes through the settings store exactly as setting that secret does, so it needs what that needs (settings.write, secrets.write and the group's permission; a 403 names the one missing), the store validates and seals the value, and RUSTYBIN_SETTINGS_LOCK answers 409. Nobody fulfils more than they could set themselves. A request that is no longer pending answers 410, and so does one whose agent was revoked since (it is declined, nothing is set).

A note on a decline. Declining takes an optional note: a few words for the agent, so it does not ask again or knows what to do instead (the field beside Decline in the console, rustybin settings decline <id> --note "...").

# Declined, with a few words for the agent (optional; never the secret):
# nothing is set.
POST {{password_url}}/_rustybin/secret-requests/{{other}}/decline
Authorization: Bearer {{admin}}
Content-Type: application/json
{ "note": "the repository is read with the deploy key that is already set" }
HTTP 200
[Asserts]
jsonpath "$.state" == "declined"
jsonpath "$.setting.set" == false
jsonpath "$.note" == "the repository is read with the deploy key that is already set"

The note is cleaned like the reason (control characters dropped, at most 300 characters) and the agent reads it as note. It is a person's text, so it is not marked untrusted_. Never type the secret there: the agent reads it. Like the reason, a note is in no audit entry and no log line.

The agent reads the state with get_secret_request: pending, fulfilled, declined or expired, whether the setting is set now, and on a declined request the note, when the person left one. Its own requests only (another agent's id does not exist for it), and never the value or a hint of it.

# The agent reads how its request stands: fulfilled, and that the setting is
# set. Never the value, and no hint of it.
POST {{password_url}}/_rustybin/mcp
Authorization: Bearer {{agent}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_secret_request
{"jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": {"name": "get_secret_request", "arguments": {"id": "{{request}}"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}, "io.modelcontextprotocol/clientInfo": {"name": "docs-secret-agent", "version": "1.0"}}}}
HTTP 200
[Asserts]
jsonpath "$.result.structuredContent.request.state" == "fulfilled"
jsonpath "$.result.structuredContent.request.set" == true
body not contains "whk_docs-example-value"
body not contains "k3Qx"
# The agent reads declined, and the note the person left.
POST {{password_url}}/_rustybin/mcp
Authorization: Bearer {{agent}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_secret_request
{"jsonrpc": "2.0", "id": 6, "method": "tools/call", "params": {"name": "get_secret_request", "arguments": {"id": "{{other}}"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}, "io.modelcontextprotocol/clientInfo": {"name": "docs-secret-agent", "version": "1.0"}}}}
HTTP 200
[Asserts]
jsonpath "$.result.structuredContent.request.state" == "declined"
jsonpath "$.result.structuredContent.request.note" == "the repository is read with the deploy key that is already set"
jsonpath "$.result.content[0].text" contains "deploy key that is already set"

Your own agents' requests

A user whose agent asked sees that request without holding secrets.write, as they see their own agents: the list and the single read answer the requests of the agents that act for them, with the same fields, and the card in Management and the count on the gear show those. They may decline one (it only takes away). They may not fulfil one by that: setting the secret needs exactly what it needs for anyone (settings.write, secrets.write and the group's permission), and the 403 names what is missing. Somebody else's request does not exist for them (404, and the list leaves it out). A caller who is not a user (a control JWT, an API key) still needs secrets.write for all of it.

# Without secrets.write, a user reads the requests of their own agents: the
# same fields, and nobody else's (pending counts what they may read).
GET {{password_url}}/_rustybin/secret-requests?state=pending
Authorization: Bearer {{tess}}
HTTP 200
[Asserts]
jsonpath "$.pending" == 1
jsonpath "$.requests" count == 1
jsonpath "$.requests[0].id" == "{{hers}}"
jsonpath "$.requests[0].agent.owner_label" == "docs-tess"
jsonpath "$.requests[0].setting.needs" contains "secrets.write"

# Another user's request does not exist for them.
GET {{password_url}}/_rustybin/secret-requests/{{not_hers}}
Authorization: Bearer {{tess}}
HTTP 404

POST {{password_url}}/_rustybin/secret-requests/{{not_hers}}/decline
Authorization: Bearer {{tess}}
HTTP 404

# Fulfilling keeps what it needs: owning the agent is not enough.
POST {{password_url}}/_rustybin/secret-requests/{{hers}}/fulfil
Authorization: Bearer {{tess}}
Content-Type: application/json
{ "value": "whk_docs-example-value-k3Qx" }
HTTP 403
[Asserts]
jsonpath "$.reason" == "permission_required"
jsonpath "$.permission" == "secrets.write"

# Declining their own agent's request only takes away, so they may.
POST {{password_url}}/_rustybin/secret-requests/{{hers}}/decline
Authorization: Bearer {{tess}}
Content-Type: application/json
{ "note": "not needed: the demo has no leads webhook" }
HTTP 200
[Asserts]
jsonpath "$.state" == "declined"
jsonpath "$.resolved_by" == "docs-tess"

The reason is the agent's claim. It is text an agent wrote, shown to a person who is about to type a secret, so it is cleaned (control characters dropped), capped at 300 characters, answered as untrusted_reason (the client's name as untrusted_name) and rendered as text everywhere. Check the setting and whose agent it is, which the instance knows, before believing the reason. The audit log records the asking (secret_request), the fulfilling (secret_fulfilled) and the declining (secret_declined) with the request, the setting and the agent; never the value, and never the reason.

SurfaceWhere
APIGET /_rustybin/secret-requests[?state=pending], GET /_rustybin/secret-requests/{id}, POST /_rustybin/secret-requests/{id}/fulfil ({"value"}), POST /_rustybin/secret-requests/{id}/decline (optionally {"note"})
ConsoleThe gear in the top bar: how many wait. Management, above every tab: Secrets an agent asked for (the value field, Set the secret, the note field, Decline); the switch is in AI agents, Defaults and rules
CLIrustybin settings requests [--state S], rustybin settings fulfil <id> [--stdin], rustybin settings decline <id> [--note TEXT] (reference)
Management MCPrequest_secret (asks), get_secret_request (the caller's own requests, with the note of a declined one); fulfilling and declining have no tool, on purpose
rustybin.yamlsettings: {agents.secret_requests: true}; a request itself is not instance state and is in no document

Talking to the server

server/discover (or initialize on the handshake versions) returns the server instructions, which tell the model how to treat captured traffic and confirmations, and the capabilities: tools, prompts and resources.

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: server/discover
{"jsonrpc": "2.0", "id": 1, "method": "server/discover", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result._meta['io.modelcontextprotocol/serverInfo'].name" == "rustybin-manage"
jsonpath "$.result.instructions" contains "untrusted_*"
jsonpath "$.result.capabilities.tools" exists
jsonpath "$.result.capabilities.prompts" exists

tools/list answers 100 tools a page, with nextCursor while more follow: the management server has more than that, so a client reads every page. Some clients read only the first (see Tool limits): for them, ?page_size=200 on the MCP URL (at most 1000) sends every tool on one page.

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.tools[*].name" contains "get_instance"
jsonpath "$.result.tools[*].name" contains "create_mock"
jsonpath "$.result.tools[*].name" contains "try_request"
jsonpath "$.result.tools[*].name" contains "wait_for_requests"
jsonpath "$.result.tools[?(@.name == 'delete_mock')].annotations.destructiveHint" == true
jsonpath "$.result.tools[?(@.name == 'get_mock')].annotations.readOnlyHint" == true
jsonpath "$.result.nextCursor" exists
[Captures]
cursor: jsonpath "$.result.nextCursor"

# The rest of the tools: the next page, from the cursor.
POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/list
{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {"cursor": "{{cursor}}", "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.tools[*].name" contains "run_tests"
jsonpath "$.result.tools[*].name" contains "restore_checkpoint"

Every result has a one-line text summary plus structuredContent, with links the user can open: the mock's URL, its console page and a curl for a sample request.

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_instance
{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "get_instance", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.instance_id" == "docs-examples"
jsonpath "$.result.structuredContent.caller.admin" == true
jsonpath "$.result.structuredContent.urls.console" == "{{base_url}}/ui/"
jsonpath "$.result.content[0].text" contains "Rustybin"

Tools

Arguments mirror the REST bodies and rustybin.yaml, so what you learn in one carries over to the other. The Permission column names what each tool needs; "or owner" means a visitor or an API key may use it on its own mocks of a self-service instance (the instance's mocks need the permission), and "the visit" a running visit's manage token. The visit operator tools are listed only with self-service on.

Instance

ToolPermission
diagnose_instancesettings.readThe diagnostics: each check with an id, a status and the fix; the summary names checks only, quoted file and remote text is under untrusted_message
get_instanceinstance.readVersion, modes, control auth, limits, the public configuration, the caller's rights, console and docs URLs. Where an agent starts
find_endpointsinstance.readSearch the route catalogue by text or category ("anthropic streaming"): path, methods, summary, an example request
get_health / set_healthinstance.read / settings.writeThe /health demo toggle
get_usageinstance.readThe plan, its limits and what is left, for the caller (their key in shared mode), so an agent can explain a 429
get_key_usagesettings.readPer-key daily totals in shared mode, paginated
reset_flakyinstance.readReset the /flaky counters of the caller's session between test runs; scope: "all" needs admin

OpenAPI mocks

ToolPermission
list_mocksmocks.readName, URL, state, security, calls, owner; filter by text or state
get_mockmocks.readOperations with hit counts, settings (secrets redacted unless the caller may change the mock), deploy report, revisions, undeployed draft changes
preview_specmocks.readParse a spec without creating anything: title, operations, security schemes, warnings, deploy checks
get_mock_specmocks.readThe spec as uploaded, to edit and send back with update_mock; or with served: true the OpenAPI document the mock serves
get_mock_revisionmocks.readA kept revision (name, revision): its spec and settings and what the draft changed since; read a 409's expected_revision to see what the other change did
create_mockmocks.write or ownerFrom spec text or an object (JSON or YAML; Swagger 2.0 is converted) with optional name, responses, security and operations; deployed unless deploy: false
update_mockmocks.write or ownerReplace the draft's spec or settings, or rename it; deploy: true publishes the revision it wrote; expected_revision refuses a draft changed meanwhile (see edit conflicts)
set_operationmocks.write or ownerOne operation's response override, rules, mode and public flag; takes expected_revision
test_rulesmocks.readWhich rule would answer a captured call, every condition explained; try new rules without saving
check_mockmocks.readThe deploy report: a valid request and response per operation
deploy_mockmocks.write or ownerPublish the draft; force only after the user accepted the check errors; expected_revision publishes only that draft revision (an error with what changed when the draft moved on)
rollback_mockmocks.write or ownerMake an earlier revision live again (confirmed)
set_mock_enabledmocks.write or ownerOn or off (off answers 503)
duplicate_mockmocks.write or ownerCopy under a new name
delete_mockmocks.delete or ownerThe mock, its revisions, stored data and traffic (confirmed)
sample_requestmocks.readA valid request for an operation, as curl and as parts, plus the response the mock would send
validate_payloadmocks.readCheck a request or response body against an operation's schema, for example after a gateway transformation
export_collectionmocks.readThe mock as a Postman collection, Hurl file, curl script, .http file, k6 script, Bruno collection or Insomnia export, optionally against a gateway's base URL (see collection exports)
get_mock_data / clear_mock_datamocks.read / mocks.data or ownerWhat a stateful mock stored; clearing is confirmed
get_mock_traffic / clear_traffictraffic.read / mocks.data or ownerThe calls a mock received: operation, status, validation and auth result, how the response was chosen; clearing is confirmed
reload_mocksconfig.applyReload the file-defined mocks (RUSTYBIN_CONFIG_FILE, RUSTYBIN_MOCKS_DIR), as SIGHUP does
list_recordingsmocks.readThe caller's recordings of a real API: upstream, proxy URL, state, counts
start_recordingmocks.writeStart a recording: answers the proxy URL to send traffic through (the upstream's host must be allowed for the purpose record); sends nothing
get_recordingtraffic.readWhat a recording kept, credentials removed, under untrusted_recorded
stop_recordingmocks.writeThe proxy refuses from now on
build_mock_from_recordingmocks.writeA mock from a recording: the inferred spec, the recorded answers as examples; dry_run answers the spec under untrusted_spec; what looked like personal data by kind and operation
delete_recordingmocks.writeThe recording and what it kept; the mock it built stays (confirmed)
check_mock_driftmocks.writeContract drift: one request per operation to the real API the mock imitates, the findings by operation (confirmed: it sends requests out)
list_drift_runsmocks.readA mock's kept drift checks
list_channelsmocks.readThe channels of an event mock (a mock made from an AsyncAPI document): messages, pattern, settings, URL, who is connected
list_channel_messagestraffic.readWhat was published and received on a channel; payloads and the issues of received messages under untrusted_*
publish_eventmocks.dataMake the mock publish on a channel now: its next message, several, or a payload given
list_event_subscribersmocks.readA mock's webhook subscribers (a URL's query is never shown)
add_event_subscribermocks.writePost a channel's messages to a URL (its host must be allowed for the purpose events); confirmed: it sends messages out
remove_event_subscribermocks.writeRemove a webhook subscriber

get_mock and check_mock carry the example coverage (which operations lack an example), the input of generate_examples.

AI assist and AI-built mocks

Every model call is an assist task with the user's own key. Keys are never tool inputs and never returned: the operator sets them in the console or with rustybin settings set-secret, or an agent asks for one to be set; assist_status shows {set, hint}.

ToolPermission
assist_statusassist.useWhether assist is on, the provider and models, the caps, each provider's key state, the tasks, the usage total
list_assist_modelsassist.useThe configured provider's models (as last loaded, merged with the curated table) and the model of every job; choose with update_settings on assist.model, assist.fast_model or assist.job.<task>
load_assist_modelssettings.writeAsk the provider for its model list with the stored key (confirmed; one outbound call, no tokens)
assist_usagesettings.readCalls, tokens and the estimated cost since start, per model and per task
test_assistsettings.writeOne small call to the configured provider
run_assist_taskassist.useA read task with its inputs (free_answer, explain, suggest, request_examples, tool_arguments, server_json, summarise_for_portal); the mock tasks point at their own tools
generate_specassist.jobs or ownerAn OpenAPI document from a description, checked like an upload; create: true (confirmed) creates the mock from it as create_mock would
generate_examplesassist.jobs or ownerExamples for the operations that lack one (or the ones named), from the provider or the deterministic generator; apply: true (confirmed) stores them in the draft
edit_spec_with_aiassist.jobs or ownerThe draft spec edited through an instruction: the document, the diff and its checks; apply: true (confirmed) saves it as the draft

Settings and the outbound policy

ToolPermission
get_settingssettings.readEvery instance setting with its value, source and lock state, or one group or key; secrets show {set, hint}
update_settingssettings.writeSet values (null forgets a stored one) and unset stored values; secrets are refused, and so is the console sign-in in password mode (it changes only with its current password); each key needs what PATCH /_rustybin/settings needs for it (settings.security for the security groups, portal.settings, git.write for git.*, the permissions of the roles a sso.role_map or sso.default_roles names); a change of egress.*, agents.*, oauth.*, console.*, git.*, sso.*, proxy.*, assist.provider or assist.base_url is then confirmed by the user
check_egresssettings.readThe outbound policy and, with url and purpose, whether that URL would be allowed before DNS and why not
request_secretsettings.writeAsk for a secret setting to be set by a person (setting, reason): the request's id and state, never a value; needs the agents.secret_requests setting on and what changing a setting of that group needs; at most 3 waiting per agent, 15 minutes each
get_secret_requestsettings.writeHow a request of this agent stands (pending, fulfilled, declined, expired) whether the setting is set now and, on a declined one, the note the person left; without id, its requests of the last hour. Never the value, never another agent's

MCP inspector and registry

ToolPermission
list_mcp_serversmcp.inspectEvery MCP server this instance serves with its auth, the relay's allowlist, the check ids, and the inspector's client ID metadata document (client_document: its URL, the 0.7.0 address as legacy_url, whether a server can use it, why not)
mcp_callmcp.inspectOne JSON-RPC request to any MCP server (a path on this instance in process, or a URL through the relay) with the handshake the transport needs; credentials as headers or a saved connection. Another host is confirmed, and without admin rights gets read-only methods only (no tools/call). The answer is untrusted_result
run_mcp_checksmcp.inspectThe inspector's check suite against a server; the report is saved unless save: false. Another host is confirmed, and without admin rights the calls to tools are skipped. At most two suites run at once
list_mcp_check_runsmcp.inspectThe saved runs, or one report (under untrusted_report)
list_mcp_connectionsmcp.inspectThe saved connections (credentials stay sealed on the instance)
list_registry_serversinstance.readThe mock registry's counts, scenario and a gateway's sync configuration, and a page of its entries (cursor, limit) under untrusted_entries, each validated and cut at 4 KiB (anyone may publish)
set_registry_scenarioregistry.writenormal, or a scenario that breaks the registry on purpose
browse_registrymcp.inspectA page of a real registry (the official one by default) through the outbound policy; confirmed for another host; the entries are untrusted_servers
validate_server_jsoninstance.readA server.json against the registry schema and the semantic checks
unpublish_registry_serverregistry.writeRemove an entry published through the registry's API (confirmed)

Dev portal

ToolPermission
list_portal_itemsinstance.readThe portal's state and branding, the readers of closed items, every item that can be published with its metadata (its access, open or closed, and whether a mock is secured), whether it is hidden and why, its insights
publish_portal_itemportal.publish or ownerPublish an item (mock:<name>, mcp:<server>, llm, a2a:<agent>, tools, registry) with a title, summary, tags, contact, order, the credentials switch and access (open or closed; secure: true turns a mock's mocked security on to close it); confirmed when the portal is on and open to anyone
unpublish_portal_itemportal.publish or ownerRemove an item
set_portal_brandingportal.settingsThe portal.* settings: enabled, title, intro, contact, auth, base_url, visitors
get_portal_insightsinstance.readViews, downloads and Try it calls per item

Configuration as code and git

ToolPermission
export_configmocks.readrustybin.yaml version 2 for an admin (the whole instance, secrets as references), the mocks the caller may see (version 1) for others, or one mock with name; format yaml or json
diff_configconfig.applyWhat applying a document would change, section by section (a dry run)
apply_configconfig.applyApply a version 1 or 2 document; dry_run reports only; prune (confirmed) makes a present section the whole truth
git_statusgit.readThe repository, the working copy, the drift, ahead and behind (fetch: true), untrusted_divergence when the branch has diverged (the commits of each side, what each way out would change), whether commits are signed, verification (verified pulls: the allowed signers, the last verified head, the last refusal), host (where git_resolve with open would open a pull request, and what is missing), the timeline and the last commits
git_initgit.writeClone the remote (git.remote, git.branch settings) or start an empty working copy
git_commitgit.writeExport the instance into the working copy and commit with a message; checkpoints names local checkpoints to commit next to the document (never by the automatic mode)
git_pushgit.writePush the branch; confirmed, since the configuration leaves the host
git_pullgit.writeFetch and fast-forward; apply: true applies the repository's document (confirmed unless dry_run). With git.verify on, a commit no allowed signer signed is refused (reason: unverified, commit, why) and nothing is applied; git_resolve with repository, git_switch_branch and the repository's checkpoints answer the same
git_resolvegit.writeThe ways out of a diverged branch (git_status shows untrusted_divergence: what differs): with: instance (this instance's copy, committed on top of the remote, never a forced push), repository (the repository's document applied here) or pull_request (this instance's side to a new branch for a pull request at the git host, nothing applied; with open: true the git host's API is asked to open it, never to merge it: opened, the address under untrusted_pull_request (with already_open: true when the host had one open for the two branches and none was opened), or not_opened with the reason while the branch stays pushed). The host's token is a setting, never an argument. Confirmed; dry_run: true previews without asking and calls nothing
git_deploy_keygit.writeThe deploy key's public half; generate: true makes one, replace: true (confirmed) replaces it
git_branchesgit.readThe remote's branches (untrusted_branches: the names are the repository's) and the one the instance is on
git_switch_branchgit.writeA branch per environment: move the instance to another branch of the remote (dry_run: true answers what applying its document would change), or start one from the instance with create: true (committed and pushed). Confirmed unless dry_run
git_signing_keygit.writeSigned commits: the signing key's public half and fingerprint to register at the git host; generate: true makes one, replace: true (confirmed) replaces it. The private half is never an input or an output

The token for an https remote is the secret git.token: an agent cannot set it (it can ask for it to be set).

Agents, users and sign-in sessions

ToolPermission
list_agents / get_agentagents.read or your ownThe agents with the user each acts for (owner keeps one user's) and the policy; one agent with its calls per tool, errors, sessions, rights and recent activity. Without agents.read, your own
set_agent_rightsagents.manage or your ownA ceiling (a role, or read-only, traffic, manage, full), allow and deny lists, a note; reset: true clears the agent's own rights. Never on the caller's own agent or an agent of the caller's credential; without agents.manage, your own agents and only to limit them
revoke_agent / restore_agentagents.manage or your ownRevoke (confirmed; an agent cannot revoke itself) and restore (never an agent of the caller's credential; without agents.manage, one of yours you revoked)
end_agent_sessionsagents.manage or your ownClose an agent's handshake-era sessions (never of an agent of the caller's credential)
list_sessionsusers.readThe console's sign-in sessions, when the password sign-in is on; user lists one user's
end_sessionusers.manageEnd one session by id; user signs one user out everywhere, all: true everyone (both confirmed)
list_usersusers.readThe users: roles, status (active, invited, disabled), last sign-in, the open invitation (never its link); user for one with its permissions
invite_userusers.manageCreate a user, invited, and answer the one-time link to send them (confirmed); reset: true sends a user who exists a new link (a password reset); sso: true adds a single sign-on user instead (no link)
update_userusers.manageRoles, display name, email, disabled, a single sign-on user's pinned_roles; confirmed when it grants a privileged role. The guard rails apply (the last enabled admin stays, nobody changes their own roles)
delete_userusers.manageDelete a user (confirmed; never the last enabled admin, never the first admin)
list_rolesusers.readThe built-in and custom roles with their permissions and holders, and the permission table; name for one
save_roleusers.manageCreate or change a custom role (confirmed when it is privileged)
delete_roleusers.manageDelete a custom role nobody holds
test_ssosettings.writeSingle sign-on: its status, and the identity provider's discovery document and keys fetched now, the redirect URI to register, the role map's unknown roles. The sso.* settings change with update_settings
list_projectsinstance.readThe projects the caller may see: the caller's roles there, what each holds, the members (with users.read); name for one
save_projectusers.manageCreate or change a project: description and members ({user, roles}, the whole list); confirmed when it gives a privileged role
delete_projectusers.manageDelete a project (confirmed); one that holds mocks, saved tests or checkpoints needs move_to (another project, or instance)
list_auditaudit.readThe audit log, newest first: who changed what, sign-ins and refusals, with the filters of GET /_rustybin/audit (actor, action, target, since, until, result) and cursor; names people typed under untrusted_actor_name, untrusted_targets and untrusted_request_id

No tool takes or returns a password or a hash: a person joins through the link invite_user answers and sets their own password in the browser, and changes it in the console or with rustybin passwd. A caller grants only roles whose permissions it holds, and manages only users whose permissions it holds.

The tools on mocks, saved tests and checkpoints take a project into account: list_mocks, list_tests and list_checkpoints take project as a filter, create_mock, save_test and save_checkpoint the project to create in, update_mock a project to move the mock to (mocks.write in both), and invite_user projects (roles in projects). A member of a project sees these tools when they hold the permission there; the call checks it on each resource, and another project's resource answers as if it did not exist.

Traffic

ToolPermission
list_requests / get_requesttraffic.readThe request inspector, newest first, with filters (path, method, status, session, since); scoped by key in shared mode
wait_for_requeststraffic.readWait up to timeout_secs (default 30, at most 60) for the next captured requests matching a filter (path prefix, method, header, session, or a mock's calls) and return them
clear_requeststraffic.clearEmpty the inspector (or one session's entries) before a test run (confirmed)
create_bin / get_bininstance.read / traffic.readA request bin owned by the caller's session, and what arrived in it
list_push_notificationstraffic.readWhat the A2A push notification sink received for a sink id

wait_for_requests is for "I'll send it through the gateway now, tell me what arrived": the agent starts the wait, you send the call, the answer lists what Rustybin received. At most 100 waits run at once (20 in public mode); more answer a tool error asking to retry.

Testing

ToolPermission
try_requestinstance.readSend a request to this instance's own data plane and return status, headers, body and timing
issue_tokeninstance.readA token from the built-in identity provider (client credentials of the demo client, with the asked scopes and audience), returned with its decoded claims and expiry

try_request runs in process through the full application, with the same middleware a real client meets (plan limits, fault injection, inspector capture), and never opens a socket: it cannot reach another host. Control-plane paths (/_rustybin/*, /ui/*) are refused, since managing the instance is what the other tools are for. The request is captured under the session mcp-<id> (or the caller's X-Rustybin-Session), so list_requests finds it. It carries the caller's API key in shared mode, never the credential the agent connected with (admin token, control token or manage token): add headers to the request when the target needs them. It comes from the caller's own address, not 127.0.0.1, so per-address limits count it as the caller's. It suits MCP clients without a shell; Claude Code may just use curl.

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: create_mock
{"jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": {"name": "create_mock", "arguments": {
  "name": "agent-orders",
  "spec": {"openapi": "3.0.3", "info": {"title": "Orders", "version": "1"}, "paths": {
    "/orders/{id}": {"get": {"operationId": "getOrder",
      "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer"}}],
      "responses": {"200": {"description": "ok", "content": {"application/json": {
        "schema": {"type": "object", "required": ["id"], "properties": {"id": {"type": "integer"}, "total": {"type": "number"}}}}}},
        "404": {"description": "missing"}}}}}},
  "operations": {"getOrder": {"rules": [{"name": "unknown order", "when": {"path.id": {"equals": "0"}}, "respond": {"status": 404}}]}}
}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.content[0].text" startsWith "Created mock \"agent-orders\""
jsonpath "$.result.structuredContent.state" == "live"
jsonpath "$.result.structuredContent.url" == "{{base_url}}/mock/agent-orders"
jsonpath "$.result.structuredContent.operations[0].rules" == 1
POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: try_request
{"jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": {"name": "try_request", "arguments": {"path": "/mock/agent-orders/orders/0"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.status" == 404
jsonpath "$.result.structuredContent.session" startsWith "mcp-"
jsonpath "$.result.structuredContent.untrusted_headers" exists
jsonpath "$.result.structuredContent.untrusted_body" exists
jsonpath "$.result.content[0].text" contains "answered 404"
POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: try_request
{"jsonrpc": "2.0", "id": 6, "method": "tools/call", "params": {"name": "try_request", "arguments": {"path": "/_rustybin/config"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == true
jsonpath "$.result.content[0].text" contains "control-plane paths"

A token from issue_token opens mocks with JWT security, the OAuth-protected mock MCP server and a gateway's JWT validation:

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: issue_token
{"jsonrpc": "2.0", "id": 10, "method": "tools/call", "params": {"name": "issue_token", "arguments": {"scope": "mcp:tools"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Captures]
agent_token: jsonpath "$.result.structuredContent.access_token"
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.claims.scope" == "mcp:tools"
jsonpath "$.result.structuredContent.expires_in" == 3600

# The token opens the OAuth-protected mock MCP server.
POST {{base_url}}/mcp/protected
Authorization: Bearer {{agent_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: server/discover
{"jsonrpc": "2.0", "id": 1, "method": "server/discover", "params": {"_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200

Saved tests, gateway scenarios and checkpoints

ToolPermission
list_teststests.readThe saved tests, one by name, or all of them as a Hurl file (format: hurl); requests are under untrusted_*
save_testtests.writeA test from a captured request (capture: its id) or a written one, with assertions; secret-looking headers and query values must be {{variables}}
import_teststests.writeAn Arazzo document, given as text, as multi-step saved tests against the instance's mocks; dry_run saves nothing; what has no counterpart is under untrusted_left_out
delete_testtests.writeDelete a saved test (confirmed)
run_teststests.runRun every saved test or the ones named, in process or through each test's gateway; confirmed when a test goes through a gateway or sends a method other than GET, HEAD or OPTIONS; one run at a time. Results under untrusted_results, JUnit with format: junit; answers the kept run's run_id and the change since the previous run
list_test_runstests.readThe history of runs, newest first (limit, cursor): when, the trigger, who, the counts, the failing tests, newly failing and newly passing
get_test_runtests.readOne kept run by id: each test's result and failures under untrusted_results, JUnit with format: junit
clear_test_runstests.writeForget every kept run, the tests stay (confirmed)
list_test_schedulestests.readThe test schedules, or one by name, with their status: next time, last result and run, skipped runs, the last notice
save_test_scheduletests.writeSave or replace a schedule: every or at, names or prefix, enabled, webhook, notify_recovery (confirmed when it names a new webhook)
delete_test_scheduletests.writeDelete a schedule, the tests and the history stay (confirmed)
run_test_scheduletests.runRun a schedule now, kept in the history as schedule:<name> (confirmed when its tests go through a gateway or change state, or it has a webhook)
list_gateway_scenarios / get_gateway_scenario_runinstance.readThe gateway scenarios and the caller's runs with their last verdicts; the credential-injection key is shown to admin callers only (key_hidden)
start_gateway_scenarioscenarios.runPrepare a run: its upstream and the steps to configure on the gateway
check_gateway_scenarioscenarios.runSend the run's test traffic through the gateway (egress purpose scenario) and compare what the client got with what reached the upstream, with the scenario's test parameters (limit, half_open_ms, size_limit, allowed_origin, refused_origin, upstream_cors, add_request_header, add_request_value, remove_request_header, add_response_header) (confirmed)
end_gateway_scenarioscenarios.runRemove what the run created, nothing else (confirmed)
list_checkpointsmocks.readThe checkpoints, or one with the mocks it holds
save_checkpointcheckpoints.writeSave the instance's API mocks (with their data) and the health toggle; replace overwrites one of that name; at most 20
restore_checkpointcheckpoints.restoreBring the mocks back to a checkpoint (API mocks it does not hold are deleted); dry_run: true answers the same without a change or a confirmation; confirmed otherwise; from: "git" restores the configuration repository's checkpoint of that name
delete_checkpointcheckpoints.writeDelete a checkpoint, not the instance's mocks (confirmed)
list_repository_checkpointsgit.readThe checkpoints committed to the configuration repository (at the working copy's HEAD), each with what it holds or why it cannot be restored, under untrusted_checkpoints

Storyboards

ToolPermission
list_storyboardstests.readThe demo storyboards, or one by name with your progress through it; what people wrote is under untrusted_*
save_storyboardtests.writeSave a storyboard: steps with a title, a talk_track, an action and a reset; replace: true overwrites one. Saving runs nothing
delete_storyboardtests.writeDelete a storyboard (confirmed)
run_storyboard_steptests.runRun one step (step, counted from 1) with your own permissions: the step's action needs its own (checkpoints.restore, scenarios.run, settings.write, mocks.write). Confirmed when the action restores a checkpoint, checks a scenario or sends through a gateway, or replays a request that changes state. The action's answer is under untrusted_detail
list_packsconfig.exportThe demo packs applied to the instance and what each holds now; what a pack's author wrote is under untrusted_*
apply_packconfig.applyApply a pack (a document with a pack: header) into a project named after it; dry_run previews after the same checks; a taken name or a problem refuses it whole. Also needs users.manage, and settings.write for a console_title
teardown_packconfig.applyRemove what the pack's project holds, its schedules, the console title it set and the project (confirmed; dry_run lists it)
export_packconfig.exportA project as a pack document, under untrusted_pack
reset_storyboardtests.runRun every step's reset action, end the scenario runs your progress started, clear your progress (confirmed as a step is)

Harness

Only when load test mode is on (RUSTYBIN_HARNESS=on). Rights: harness is the harness or admin scope, or the admin token on an open control plane.

ToolPermission
harness_statusharness.readWhether harness mode is on, the node's roles, caps, engine, allowed targets, the active run, the console URL. Where an agent starts
list_scenarios / get_scenario / save_scenarioharness.read / harness.runThe built-in scenarios to copy, one as an object and YAML (credentials redacted, as on the REST route), and saving your own by name
list_patternsharness.readThe pattern types and their parameters, from the scenario schema
validate_scenario / preview_scenarioharness.readProblems against the node's caps, the normalised scenario and its summary; the expected requests per second of every layer. Neither sends anything
create_runharness.runValidate, pin and (when configured) verify the targets and start sending load from this node, or submit to a cluster with cluster_id. Confirmed (elicitation, else confirm: true)
start_runharness.runStart a submitted cluster run on every client node at once. Confirmed
update_runharness.runTune a running run: multiplier, pause, hold, skip, set, layers, faults. Confirmed
list_runs / get_runharness.readThe node's runs, and the live view of one (progress, counts, latency, the last second, saturation, report_ready)
stop_runharness.runStop a run early (it drains and reports); with cluster_id, on every client node
get_run_reportharness.readThe final report as JSON, text or JUnit
harness_stopharness.runThe kill switch: all load on this node stops now (no confirmation)
import_trafficharness.readA HAR file or saved captures as a scenario's source, without credentials; sends nothing
import_scenarioharness.readA Postman collection (v2.1), an Artillery script or an Arazzo document (its steps against the instance's mocks), given as text, as a scenario's source: what does not map is named in left_out, nothing in the document is run, a program is refused; variables gives values for the variables the document does not define (never a credential; a name the harness has a placeholder for, such as id, is then a constant in the requests, which notes says) and environment takes the collection's Postman environment file for them (an entry marked secret is never taken); sends nothing
step_asideharness.clusterBefore maintenance: the leader hands the cluster to the first in the succession, with the run still on
create_cluster / list_cluster_nodes / export_upstreams / get_leaderharness.cluster / harness.readA cluster led by this node (the join token once), its members, the server nodes' URLs for the gateway's upstream pool, and who leads with the succession and the history of leader changes

Starting load reaches outside the instance, so create_run, start_run and update_run carry openWorldHint and ask the user to confirm; targets must be in RUSTYBIN_HARNESS_TARGETS whatever the tool. The prompt load_test_gateway walks an agent from the allowlist to a validated scenario, a dry run at a low rate and the real run, and rustybin://harness.schema.json is the scenario schema.

Self-service

Only on instances with self-service mocks.

ToolPermission
get_visitthe visitTime left, hours used today, what the next extension needs
extend_visitthe visitOne more period without the email step. When an address is needed the answer says so and links the console, where the form shows the consent choice and privacy notice
list_visits, end_visit, pause_self_service, resume_self_servicevisits.operateThe operator routes; ending a visit and pausing are confirmed

A visitor's agent needs no credential for its first mock: create_mock starts a visit and returns its manage token, which the agent then sends as X-Rustybin-Mock-Token. Other people's visitor mocks do not exist for the caller (404), exactly as on the REST routes.

POST {{ss_url}}/_rustybin/mcp
X-Rustybin-Session: docs-agent-visitor
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: create_mock
{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "create_mock", "arguments": {
  "name": "orders",
  "spec": {"openapi": "3.0.3", "info": {"title": "Orders", "version": "1"}, "paths": {
    "/orders/{id}": {"get": {"operationId": "getOrder",
      "parameters": [{"name": "id", "in": "path", "required": true, "schema": {"type": "integer"}}],
      "responses": {"200": {"description": "ok", "content": {"application/json": {
        "schema": {"type": "object", "properties": {"id": {"type": "integer"}}}}}}}}}}}
}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Captures]
agent_mock: jsonpath "$.result.structuredContent.name"
agent_mock_token: jsonpath "$.result.structuredContent.manage_token"
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.name" matches /^orders-[a-z2-7]{6}$/
jsonpath "$.result.structuredContent.owner" == "visit"
jsonpath "$.result.structuredContent.url" contains ".mocks.example"
jsonpath "$.result.content[0].text" contains "manage_token"
POST {{ss_url}}/_rustybin/mcp
X-Rustybin-Mock-Token: {{agent_mock_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_visit
{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "get_visit", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.mocks" contains "{{agent_mock}}"
jsonpath "$.result.structuredContent.next_extension" == "free"

# Without the token the mock does not exist for the caller.
POST {{ss_url}}/_rustybin/mcp
X-Rustybin-Session: docs-agent-other
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_mock
{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "get_mock", "arguments": {"name": "{{agent_mock}}"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == true
jsonpath "$.result.structuredContent.status" == 404
POST {{ss_url}}/_rustybin/mcp
X-Rustybin-Mock-Token: {{agent_mock_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: delete_mock
{"jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": {"name": "delete_mock", "arguments": {"name": "{{agent_mock}}", "confirm": true}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false

Prompts and resources

Clients that support MCP prompts offer these as commands:

PromptArguments
build_instancebrief, portalFrom a brief to a working instance: the AI provider, describe and create each API, fill the examples, publish to the portal, export the configuration, offer the git push (see the walkthrough)
mock_an_apispec_path, nameFrom a spec, or a description when there is no file, to a deployed, tested mock: preview, create, check, try a request, hand over the URL and a collection
publish_portalitemsMetadata per item, publish, switch the portal on, verify what visitors see
backup_to_gitremote, branchConnect the repository, commit with a message from the drift, push (confirmed), confirm the result
test_mcp_serverurl, authReachability through the relay, connect, the check suite, the report
onboard_agentnameThe credential model, the agent's record, a proposal of rights for the operator to confirm
debug_gateway_callpathFind the request a gateway sent and explain what arrived (headers, auth, validation) against what was expected
load_test_gatewaytarget, rateOn a harness node: check the allowed targets, build and validate a scenario, preview it, dry-run it at a low rate, then run it for real and read the report
secure_a_mockname, modePick a mocked security mode and show the credentials a gateway must present
prepare_customer_demopack_pathPreview a demo pack, apply it when the user agrees, rehearse its storyboard, say how to tear it down
rehearse_demonameReset a storyboard, run its steps in order (asking before a step that restores, sends out or changes state) and report each verdict
Resource
rustybin://config.schema.jsonThe JSON Schema of rustybin.yaml version 2, for writing configuration files
rustybin://catalogueThe route catalogue as JSON
rustybin://harness.schema.jsonThe JSON Schema of a harness scenario, with the node's caps as bounds
rustybin://portal/catalogWhat visitors of the dev portal see, as the caller's request reaches the instance
rustybin://cli.mdThe command line reference, for the commands to suggest when something is done from a shell or CI
POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: resources/read
Mcp-Name: rustybin://config.schema.json
{"jsonrpc": "2.0", "id": 11, "method": "resources/read", "params": {"uri": "rustybin://config.schema.json", "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.contents[0].mimeType" == "application/schema+json"
jsonpath "$.result.contents[0].text" contains "mocks"

Build an instance with an agent

The build_instance prompt carries an agent from a brief ("an orders API and a parcels API for the checkout team, published for the mobile developers") to a working instance. These are the calls it makes, on an instance with the mock provider; every one is a tools/call of the same server. The agent starts with the provider:

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: assist_status
{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "assist_status", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.enabled" == true
jsonpath "$.result.structuredContent.provider" == "mock"
jsonpath "$.result.structuredContent.providers[0].key.set" exists

It describes an API and shows the result to the user before anything is created:

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: generate_spec
{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "generate_spec", "arguments": {"description": "a parcel tracking API: shipments with a tracking number, status and events; list, get and create shipments, list a shipment's events"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.text" contains "openapi"
jsonpath "$.result.structuredContent.preview.operations" count > 0
jsonpath "$.result.structuredContent.preview.report.errors" == 0
jsonpath "$.result.structuredContent.mock" not exists
jsonpath "$.result.content[0].text" contains "Nothing was created"

Creating from the generated document is confirmed, like every change an AI wrote (the user confirms through elicitation, or the agent passes confirm: true once they agreed):

# Creating from the generated document is confirmed: without elicitation the
# agent passes confirm true once the user agreed.
POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: generate_spec
{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "generate_spec", "arguments": {"description": "a parcel tracking API: shipments with a tracking number, status and events", "create": true, "name": "docs-parcels"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == true
jsonpath "$.result.content[0].text" contains "confirm"

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: generate_spec
{"jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": {"name": "generate_spec", "arguments": {"description": "a parcel tracking API: shipments with a tracking number, status and events", "create": true, "name": "docs-parcels", "confirm": true}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.mock.name" == "docs-parcels"
jsonpath "$.result.structuredContent.mock.url" contains "/mock/docs-parcels"

check_mock says which operations lack examples; generate_examples fills them (from the provider, or the deterministic generator with source: generated), and deploy_mock publishes the draft:

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: check_mock
{"jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": {"name": "check_mock", "arguments": {"name": "docs-parcels"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.coverage" exists
jsonpath "$.result.structuredContent.coverage.without" exists
POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: generate_examples
{"jsonrpc": "2.0", "id": 6, "method": "tools/call", "params": {"name": "generate_examples", "arguments": {"name": "docs-parcels", "source": "generated", "operations": ["listShipments"], "apply": true, "confirm": true}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.applied" == true
jsonpath "$.result.structuredContent.source" == "generated"

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: deploy_mock
{"jsonrpc": "2.0", "id": 7, "method": "tools/call", "params": {"name": "deploy_mock", "arguments": {"name": "docs-parcels"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false

Publishing to the portal is confirmed when the portal is open to anyone:

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: publish_portal_item
{"jsonrpc": "2.0", "id": 8, "method": "tools/call", "params": {"name": "publish_portal_item", "arguments": {"id": "mock:docs-parcels", "title": "Parcels", "summary": "Track shipments and their events.", "tags": ["logistics"], "confirm": true}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.published.title" == "Parcels"

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: list_portal_items
{"jsonrpc": "2.0", "id": 9, "method": "tools/call", "params": {"name": "list_portal_items", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.enabled" == true
jsonpath "$.result.structuredContent.items[?(@.id == 'mock:docs-parcels')].published.title" contains "Parcels"

The whole instance comes back as a version 2 document, with secrets as references:

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: export_config
{"jsonrpc": "2.0", "id": 10, "method": "tools/call", "params": {"name": "export_config", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.version" == 2
jsonpath "$.result.structuredContent.yaml" contains "docs-parcels"
jsonpath "$.result.structuredContent.sections" contains "portal"
jsonpath "$.result.content[0].text" contains "never values"

Without a repository git_status says what to set, and a push is always confirmed:

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: git_status
{"jsonrpc": "2.0", "id": 11, "method": "tools/call", "params": {"name": "git_status", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.commits" exists
jsonpath "$.result.content[0].text" contains "No repository configured"

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: git_push
{"jsonrpc": "2.0", "id": 12, "method": "tools/call", "params": {"name": "git_push", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == true
jsonpath "$.result.content[0].text" contains "confirm"

The agent sees itself in the agents list, and can test the mock's own MCP server through mcp_call (the server's answer is third-party data, under untrusted_result):

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: list_agents
{"jsonrpc": "2.0", "id": 13, "method": "tools/call", "params": {"name": "list_agents", "arguments": {}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.agents" count > 0
jsonpath "$.result.structuredContent.policy.default_ceiling" exists
POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: mcp_call
{"jsonrpc": "2.0", "id": 14, "method": "tools/call", "params": {"name": "mcp_call", "arguments": {"target": "/mock/docs-parcels/_rustybin/mcp", "method": "tools/list"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.untrusted_result.tools" count > 0
jsonpath "$.result.structuredContent.result" not exists

Unpublishing and deleting are the usual tools (the delete confirmed):

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: unpublish_portal_item
{"jsonrpc": "2.0", "id": 15, "method": "tools/call", "params": {"name": "unpublish_portal_item", "arguments": {"id": "mock:docs-parcels"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: delete_mock
{"jsonrpc": "2.0", "id": 16, "method": "tools/call", "params": {"name": "delete_mock", "arguments": {"name": "docs-parcels", "confirm": true}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false

The same walk runs in the MCP conformance suite with the official Python SDK.

Safety

Confirmations

Tools that destroy something carry the MCP destructiveHint annotation (reads carry readOnlyHint) and ask before acting: rollback_mock, delete_mock, clear_mock_data, clear_traffic, apply_config with prune, clear_requests, end_visit, pause_self_service, revoke_agent, unpublish_registry_server, git_resolve and git_switch_branch (not their dry runs), git_deploy_key and git_signing_key with replace, end_session with all or user, delete_user, delete_test, restore_checkpoint (not its dry run), delete_checkpoint and end_gateway_scenario. Tools that reach outside the instance or publish something ask too: mcp_call and run_mcp_checks to another host, browse_registry, git_push, git_pull when it applies, publish_portal_item on an open portal, load_assist_models, the AI tools when they write (generate_spec with create, generate_examples and edit_spec_with_ai with apply), check_gateway_scenario, run_tests through a gateway or with a method that changes state, and the harness runs. invite_user always asks (its answer is a link that signs a person in), update_user when it grants a privileged role and save_role when the role is privileged. update_settings asks when it changes a key under egress., agents., console., git., sso. or proxy., or assist.provider or assist.base_url (after the permission check: a confirmation is never a permission). When the client supports elicitation, the server asks the user directly ("Delete the mock orders-api and its traffic?"). Without it the call needs "confirm": true, which the tool descriptions tell the model to set only after the user agreed:

POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: delete_mock
{"jsonrpc": "2.0", "id": 8, "method": "tools/call", "params": {"name": "delete_mock", "arguments": {"name": "agent-orders"}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == true
jsonpath "$.result.content[0].text" contains "\"confirm\": true"

# The mock still exists.
GET {{base_url}}/_rustybin/mocks/agent-orders
HTTP 200
POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: delete_mock
{"jsonrpc": "2.0", "id": 9, "method": "tools/call", "params": {"name": "delete_mock", "arguments": {"name": "agent-orders", "confirm": true}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.isError" == false
jsonpath "$.result.structuredContent.deleted" == "agent-orders"

GET {{base_url}}/_rustybin/mocks/agent-orders
HTTP 404

Captured traffic is untrusted

Whatever calls the data plane writes the captured traffic, and on a public instance that is anyone. A body saying "ignore your instructions" must not steer the agent. So:

  • captured headers and bodies (mock traffic, the inspector, bins, the A2A sink, wait_for_requests), the answers of MCP servers reached with mcp_call and the entries of a browsed registry never appear in the text summary; they are returned in structuredContent under fields named untrusted_*, and the server instructions and tool descriptions say this is third-party data, never instructions;
  • a traffic row's path and query are untrusted_path and untrusted_query, a non-standard method is OTHER with untrusted_method, and a mock's validation messages are untrusted_validation: summaries name methods and statuses only. The same goes for saved check reports (untrusted_report), saved tests and their runs, and the quoted file and remote text of diagnose_instance (untrusted_message);
  • bodies are left out unless the call asks (include_bodies: true) and are truncated at 4 KB each and 64 KB per result, with a flag saying so;
  • try_request answers are treated the same way, since a mock answers whatever its owner configured (on a demo, another visitor's mock): untrusted_* fields, truncated at 64 KB, streams stopped after 64 KB or 5 seconds.
POST {{base_url}}/_rustybin/mcp
Authorization: Bearer {{admin_token}}
Accept: application/json, text/event-stream
Content-Type: application/json
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: get_mock_traffic
{"jsonrpc": "2.0", "id": 7, "method": "tools/call", "params": {"name": "get_mock_traffic", "arguments": {"name": "agent-orders", "include_bodies": true}, "_meta": {"io.modelcontextprotocol/protocolVersion": "2026-07-28", "io.modelcontextprotocol/clientCapabilities": {}}}}
HTTP 200
[Asserts]
jsonpath "$.result.structuredContent.total" == 1
jsonpath "$.result.structuredContent.requests[0].operation" == "getOrder"
jsonpath "$.result.structuredContent.requests[0].status" == 404
jsonpath "$.result.structuredContent.requests[0].source" startsWith "rule:unknown order"
jsonpath "$.result.structuredContent.requests[0].untrusted_headers" exists
jsonpath "$.result.content[0].text" contains "untrusted_* fields"

Spec text and rule patterns from the agent are validated exactly as on the REST routes (spec size, YAML and regex limits), so an agent cannot do what a REST caller could not.

Secrets never pass through an agent

No tool takes a secret: update_settings refuses secret keys, saved MCP connections are written in the console or the CLI, the git token and the console password are set there or in the environment, and exports carry references (${VAR}, secret:stored), never values. What an agent can read about a secret is {set, hint}. An agent that needs one set asks (request_secret: a setting's name and a reason) and a person types the value in the console or on the command line's stdin; the request's answers carry its state, never the value. The parity test (every_control_route_has_a_management_tool) keeps every control route mapped to a tool, a resource or a written reason, and a second test checks that no tool input is named like a secret.

Audit log and metrics

Every call that changes something, and every refused call, is logged as one line (target rustybin::manage) with the tool, its target, the caller (admin, key:<id>, visit:<fingerprint>, a token caller's credential such as console:<user>, jwt:<sub> or oauth:<sub>, else session:<label>), the agent's id and the outcome. New agents, rights changes, revocations and restores are logged under rustybin::agents. Arguments are never logged, since they may hold secrets or spec bodies.

/_rustybin/metrics counts calls in rustybin_manage_mcp_calls_total{tool, outcome} (outcome ok, denied or error; invalid arguments count as error, and a request refused before it reaches a tool, such as an unknown tool name, is not counted). Tool calls are control-plane requests, so plan limits apply as for the REST routes.

What to ask

  • "Mock openapi/orders.yaml, check it, and give me a Hurl collection pointed at https://gateway.local/orders."
  • "Make GET /orders/{id} answer 404 when the id is 0, then show me that it does."
  • "Secure the orders mock with JWT, issue me a token with orders:read, and try a call with it."
  • "I'm sending a request through the gateway now: tell me what headers arrived."
  • "Why am I getting 429s?"
  • "Export everything as rustybin.yaml so I can commit it."
  • "Build the mocks for the checkout team from this brief and publish them to the portal."
  • "Back this instance up to git@github.com:team/mocks.git."
  • "Run the MCP checks against https://mcp.acme.example/mcp with this bearer token."
  • "What has the claude-code agent been doing, and should it keep admin rights?"

Not in this version

  • Platform operations (creating or deleting instances) and the settings that only the environment sets (ports, TLS, the state directory, the control auth mode): those stay in the deployment. The instance settings are tools.
  • Setting a secret (a provider key, the git token, a saved connection's credential, the console password): the console, the CLI or the environment. An agent may ask for a secret setting to be set; a person types it.
  • Fetching a spec from a URL on the server: the agent reads the file and sends its content.
  • The self-service email step: consent stays in the console.
  • OAuth sign-in for self-service visitors and shared-mode key holders (they send their manage token or API key as a header).

On every surface

The same job from the API, the console, the command line, an agent and the configuration document.

SurfaceWhere
APIPOST /_rustybin/mcp (the server), GET /_rustybin/agents (each agent's owner, ?owner=), GET /_rustybin/agents/events, GET, PATCH /_rustybin/agents/{id} (a role as the ceiling), POST /_rustybin/agents/{id}/revoke | restore, DELETE /_rustybin/agents/{id}/sessions, the OAuth routes under /_rustybin/oauth (the consent request's permissions, grants and approver), GET /_rustybin/secret-requests, GET /_rustybin/secret-requests/{id}, POST /_rustybin/secret-requests/{id}/fulfil | decline (a secret at an agent's request)
ConsoleThe AI agents view (the list with the Owner column and its filter, rights with a role as the ceiling, revoke, the live feed, Connect an agent with the claude mcp add command), #/authorize/<id> for the agent sign-in (the permissions the agent will hold); Management, Secrets an agent asked for (set or decline)
CLIrustybin agents list [--owner U] | get | rights [--ceiling ROLE] | revoke | restore | end-sessions | tail, rustybin mcp-stdio, rustybin login --agent (an agent's own sign-in for mcp-stdio), rustybin settings requests | fulfil | decline (reference)
Management MCPlist_agents (owner), get_agent, set_agent_rights (a role as the ceiling), revoke_agent (never oneself), restore_agent, end_agent_sessions (rights, restore and end sessions never on an agent of the caller's own credential; a user's own agents without agents.read / agents.manage); request_secret, get_secret_request; the prompt onboard_agent
rustybin.yamlagents: (default_ceiling, rules by client name, credential kind, user and role, a role as the ceiling), settings: {agents.default_ceiling_for: [...], agents.secret_requests: true, oauth.client_metadata_documents: true} (the last never from git) (the whole instance as code)
EnvironmentRUSTYBIN_AGENTS_DEFAULT_CEILING, RUSTYBIN_CONTROL_OAUTH, RUSTYBIN_CONTROL_OAUTH_ISSUER, RUSTYBIN_CONTROL_OAUTH_KEY (configuration)