Record an operator's approval of an MCP server
approve_mcp_serverStores an operator approval for the exact reviewed tool definitions and launch identity so later vetting treats them as approved and reports changes as drift; WARDEN gates still apply.
Instructions
Store an operator approval for exactly the tool definitions and launch identity the operator reviewed, so later vet_mcp_server calls treat them as approved and report any change as drift. The server must still pass every WARDEN gate; an approval cannot override a block.
When to use: after a human reviewed the output of status_mcp_server and agreed. Pass back the currentToolsHash, currentIdentityHash and previousRevision it returned; if the payload or the stored approval changed in the meantime, the call is refused and the review must be repeated.
When NOT to use: on your own initiative or to make a blocked server pass (the gates run again and the call fails); to remove an approval (revoke_mcp_server); to look at the stored state (status_mcp_server).
Behaviour: writes one file in the local state directory and replaces any earlier approval for this server id. Refused unless the operator started this process with WARDEN_ALLOW_PIN_CHANGES=1. No network; never starts the target server. Repeating the same call is refused because the revision it names is no longer current.
Returns { approved: true, pin }. Example: approve_mcp_server({ server, tools, reviewed_tools_hash: "", reviewed_identity_hash: "", previous_pin_revision: null }).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tools | Yes | The exact tools/list payload the operator reviewed. Its hash must equal reviewed_tools_hash. | |
| server | Yes | Identity of the MCP server being vetted — the host's McpServerRef, not a live connection. WARDEN never launches this command or fetches this URL. | |
| server_info | No | Optional: the serverInfo object from the server's initialize result, unmodified ({ name, version }). Shown next to the review as the version the server reports, and stored with an approval; it is the server's own word, so it is never hashed or trusted. | |
| reviewed_tools_hash | Yes | currentToolsHash from the status_mcp_server call the operator reviewed. | |
| previous_pin_revision | Yes | The previousRevision value status_mcp_server returned when you reviewed this server (null when it reported no stored approval). The write is refused if the stored approval changed since then, so two reviewers cannot overwrite each other. | |
| reviewed_identity_hash | Yes | currentIdentityHash from the same status_mcp_server call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pin | Yes | The approval as stored, with approvalMode "operator". | |
| approved | Yes | Always true; any refusal is returned as an error instead. |