Trusty Squire
UnexploredTrusty Squire signs up / in to websites for you so you don’t have to.
Install
Terminal
$npx -y @trusty-squire/mcp servermcp_config.json
{
"mcpServers": {
"ai-trustysquire-trusty-squire": {
"args": [
"-y",
"@trusty-squire/mcp",
"server"
],
"command": "npx"
}
}
}Documentation
Trusty Squire
Empower agents with auth and payments. MCP tools to automate auth and pay — your keys and card never leave the vault.
Trusty Squire is an MCP server that lets Claude Code, Codex, Cursor, OpenCode, Goose, and other coding agents sign up, provision, and purchase on your behalf. It opens a real browser, works through signup, sign-in, setup, and checkout flows one step at a time, clears the bot-detection and email-verification steps that make operator tools stall, and hands the job back to a person only when one is actually required. That covers wiring up OAuth and API keys for the app you're building as much as it covers paying a checkout, sending a gift, or booking something — the same operator primitives drive all of it.
Provider secrets and payment cards are write-only: the agent's credential tools return references and authenticated results, never stored plaintext. The raw secret never needs to enter the agent's context, so it can't be pasted into a commit, leaked in a log, or read back out over chat. Backend access is a host-scoped, rate-limited, independently revocable grant, so a leaked token is killed without rotating the provider key — and you connect Google or GitHub yourself in a real browser, so the agent never types your password. Full threat model below.
One prompt
Add Google OAuth to this app in one prompt: create the OAuth client, save the client secret, and wire it in without putting the raw key in chat, code, or .env.
Your coding agent plans the job. Trusty Squire operates the website, stores the generated key, and can issue your backend a scoped grant. The backend calls the provider through Trusty Squire, which injects the provider key on the server side.
Other useful asks:
- “Set up Stripe payments for this app and keep the API key out of this conversation.”
- “Create a Render API key for deployment automation and keep it out of this conversation.”
- “Pay this checkout with my saved work card and ask me to approve it on my phone.”
- “Send a gift to my friend without sharing their address with me.”
- “Book this dinner reservation for me.”
- “That app grant leaked. Revoke it without rotating the provider key.”
For supported card checkouts, save a card in the Vault from a passkey-capable
device or let your first operate_pay approval link collect one just in time.
When no card is specified, Trusty Squire uses the only saved card, starts the
add-card ceremony if none exists, or asks you to choose when several exist. The
new card is encrypted in your browser with a passkey-derived key and bound to
that purchase before approval; if you add it but do not approve in time, it
remains saved for a faster retry.
Recognized Visa, Mastercard, Amex, Discover, Diners Club, and JCB cards show
their network mark in the Vault while keeping the full bank/network label. Open
a card row to see its masked number; reveal runs the passkey ceremony in your
browser before showing the number, name, expiry, and billing address. The CVV is
never shown, even after reveal. The Activity page also records card additions
and removals, payments, and app-grant changes without storing a PAN or CVV.
operate_pay requires a non-empty item and reason (calls that omit either
receive a validation error). On a single-page checkout it prefers a machine-read
checkout total, sends you a short-lived approval link, and submits only after you
approve the purchase. A clean visible labeled total wins; when none is readable,
strict schema.org Order/Invoice.totalPaymentDue structured data can supply the
amount and currency. If neither source exposes a total, caller-supplied
amount_cents and currency become the authoritative approval amount; an omitted
merchant name falls back to the checkout URL's hostname. Product and offer prices
never qualify as machine-read checkout totals. An unambiguous ISO currency on the
page remains authoritative. A notation that cannot identify one ISO currency by
itself, such as a shared currency symbol or an FX-preview selector, falls through to
the currency already selected or approved for the purchase instead of refusing the
checkout. Any live amount or currency drift still fails closed; the authoritative
binding contract lives in the security model.
Approval, 3-D Secure, Activity, and notification amounts use the currency's minor-unit
precision (for example, whole yen for JPY and two decimals for USD). The anonymous
approval page shows the merchant, checkout origin, amount and currency, item, and
reason directly from the short-lived server record before one passkey ceremony
authorizes those canonical payment values. You also see the requesting MCP client
(for example, Hermes) and that a saved card will be used before clicking Approve
payment to relay the operator-sealed final authorization. When the pre-submission
checkout can be machine-read, the payment is refused if its merchant, origin, amount,
or currency has changed since approval. If that resume read cannot recover a total,
Trusty Squire reuses the original mandate-bound checkout values. Card entry requires the PAN,
expiry, and CVV fields; cardholder name and other explicitly labeled billing fields
are filled best-effort, so a missing name field does not abort the payment. Sealing
and cleanup touch only those selected payment controls; merchant shipping address and
country controls remain untouched. A submit is reported as payment_submitted only
after the checkout reaches a new merchant order-confirmation URL with a substantive
order or receipt identity. The browser completes 3-D Secure natively, including
out-of-band bank-app challenges — Trusty Squire never manipulates or intercepts the
challenge; it uses read-only checks while polling for that same order-confirmation
signal. A bare click that produces no confirmation and no detected challenge returns
payment_outcome_unknown instead of guessing that the charge succeeded. A detected
challenge that remains unresolved on timeout stays
payment_3ds_required with needs_user.wall: "3ds", handing control back for user
completion. Neither status is success or permits blind resubmission: manually check
the merchant's order state before any retry.
Every payment response includes its session_id. Pass that same ID to every
follow-up operate_pay and canonical operate_payment_status call. Pass
wait_seconds (0-15, default 0) to bound-wait for a change instead of an instant
peek. Omitting session_id remains compatible only while this MCP process has
exactly one session; it never selects a newest or arbitrary checkout.
Some split checkouts collect the card before the final order-confirmation step. On the
card-entry page, operate_pay { phase: "fill_card" } first reads the live total. A
subtotal qualifies as that payable amount only when the same order summary says
shipping is free; recommendation and related-product prices are excluded. If that
page exposes no total, caller-supplied amount_cents and currency take precedence
as the approval amount. If they are omitted, Trusty Squire may use the most recent real
total observed earlier in the same browser session, such as the cart subtotal, only
when the checkout origin still matches. One phone approval
binds that amount and releases the card; Trusty Squire fills the card without
submitting and its role in the purchase ends there. It fills only the merchant's own
HTTPS frames or recognized payment-provider frames. The card stays in the page as
sealed, observation-masked fields while the agent advances to the review step and
places the order. Verify the live final total against the approved
amount_cents/currency yourself before placing the order; Trusty Squire no longer
re-reads the total or submits anything. For click and js_click, a control whose
label looks like pay/place-order may fire only once for that approval. A second
recognized attempt is refused and requires a fresh operate_pay approval in a new
session. Non-charge-labeled clicks, key presses, and oauth_click remain ungated.
After a recognized click dispatches, Trusty Squire best-effort records a secret-free
payment_place_order_attempted Activity event bound to the approval, optional
mandate, approved amount/currency, merchant, and opaque card reference. This records
an attempt, not a verified charge outcome.
operate_pay { phase: "confirm" } just releases the session's pending-fill lock and
reports the approved terms back — it makes no browser or provider call, records no
audit event itself, and never charges. It can be called any time after the fill — it does not
need to happen before you place the order, and it never reads a total or verifies an
amount. If a payment gets stuck or a card is declined, recover with operate_finish
and start a fresh session; operate_pay does not support refilling a different card
mid-session.
Before an initial single-page or fill_card call, Trusty Squire follows the actual
visible card-number field and hands the checkout back when that field is hosted by
PayPal or Braintree. A separate PayPal express button does not block fillable merchant
or Shopify PCI card fields. Trusty Squire does not sign in to PayPal or use vaulted
PayPal credentials. After any submit that has not yet reached a confirmed order,
Trusty Squire waits 180 seconds by default for native completion, including
out-of-band bank-app approval. A linked Telegram chat receives a challenge-specific
nudge when 3-D Secure is detected, or cautious bank-app guidance when no on-page
challenge appeared. Standard cross-processor 3-D Secure signals and recognized
CardinalCommerce or Stripe challenge frames classify the first case only when the
containing frame is visibly rendered. Hidden 3-D Secure Method pre-authentication and
captcha-hosted frames never count as 3-D Secure, and an ordinary Shopify PCI card-field
host alone does not either. It reports a visible decline and hands an unresolved outcome
back on timeout, noting whether the Telegram nudge actually went out.
three_ds_wait_seconds accepts whole seconds from 0 to 600; set it to 0 on
operate_pay to skip the notification and waiting and receive the handoff
immediately.
Connect Telegram under Vault Settings to receive secret-free alerts for credential, card, payment, and app-grant lifecycle changes. Routine credential retrieval and proxy access stay in Activity instead of sending a push for every request.
Install
npx @trusty-squire/mcp connect
connect signs you in with Google or GitHub, detects your coding agent, and merges the squire MCP server into its existing configuration. Restart the agent and ask for the finished website outcome. Trusty Squire is free to start.
To choose a target explicitly:
npx @trusty-squire/mcp connect --target=codex
Supported targets: claude-code, cursor, codex, opencode, goose, cline, continue, and hermes.
The isolated operate_* browser runtime currently requires Linux and a local Chrome connection;
remote CDP, macOS, and Windows operator sessions are not supported in this migration stage.
What happens
- Your coding agent names the website and the outcome it needs: an account, authenticated setup, app publishing, a purchase, a gift, or a booking.
- Trusty Squire works through the service flow one step at a time. Ordinary tasks open an isolated browser profile; tasks that must act as your connected Google identity use the signed-in profile directly and run one at a time.
- If the flow produces an API key or client secret, Trusty Squire captures it into the vault without returning the raw value through its credential tools.
- The agent can make an authenticated request, create a host-scoped app grant, or use a saved card for a supported checkout after you approve the purchase.
- Eligible successful flows can become signed registry skills, so later runs can replay verified steps instead of rediscovering every click.
If a site requires phone verification, a hard CAPTCHA, an unresolved 3-D Secure challenge, an unsupported payment method, or another human decision, the run hands control back and tells you. It does not guess or pretend the task completed.
Supported services
Discovery pages are generated only for services with an active skill in the Trusty Squire registry. The first five detailed pages cover Braintrust, Cerebras, Clerk, DeepInfra, and Zilliz Cloud. Each sample has explicit signup evidence in its active registry record and a provider request checked against official API documentation. The service hub also lists every active registry entry; the remaining detail pages stay unpublished until their workflow and unique content pass review.
Browse the active service catalog. Maintainers can detect registry drift before merging with:
pnpm seo:verify-services
The registry controls which service pages exist. An external list is never used to claim support.
Keep provider keys out of agent context
Ask the agent to create a scoped backend grant:
Grant this backend access to Clerk through Trusty Squire with a limit of 100 requests per hour.
Before minting the grant, make api.clerk.com the credential's primary allowed host in the Vault. The egress proxy refuses every other upstream host. This explicit policy step is required when the signup host and provider API host differ.
The agent calls the real MCP tool with the service and requested limit:
grant_app_access({
service: "clerk",
rate_limit_per_hour: 100
})
Rate limits are opt-in. Omitting rate_limit_per_hour creates an unlimited
grant; host scoping, auditing, and revocation still apply. When a grant reaches
an explicit hourly limit, the proxy returns 429 rate_limited with
scope: "grant", Retry-After, and window/reset metadata.
The result contains a host-scoped egress base_url and a token, not the Clerk secret key. The token is returned once through the MCP result and remains valid until revoked. That means the scoped grant token can enter agent context; it is not the provider key. Move it directly into backend-only deployment secret storage, never browser code, logs, or source control. If you need zero grant-token exposure to the model, use use_credential for agent-initiated requests instead. Trusty Squire removes the grant authorization at the boundary and injects the vaulted provider credential into the upstream request.
Security and threat model
- Provider credentials are encrypted in the vault and are write-only to agent credential tools. Those tools return references or authenticated results, not stored plaintext.
- The raw provider key is injected only into the outbound provider request. It does not need to land in chat, generated code, the consuming app, or the project's
.envfile. - App grants are host-scoped, auditable, rate-limitable, and independently revocable. A leaked grant can be revoked without rotating the provider key.
- You connect Google or GitHub in a real browser. Trusty Squire does not ask the coding agent to type those passwords.
- Saved cards are encrypted in your browser with a passkey-derived key. For a single-page payment, your phone releases the card only after approving the exact purchase details shown on the approval page. On a split checkout, one amount-bound approval releases the card; Trusty Squire's role ends at the fill and the caller places the order and verifies the final total itself. The API temporarily relays only operator-sealed card ciphertext and its signed mandate. Trusty Squire's API and the coding-agent model never receive plaintext PAN or CVV. See the security model for the signed mandate's binding contract.
- Browser screenshots and diagnostics can contain whatever a website visibly rendered. Treat diagnostic artifacts as sensitive and do not ask an agent to re-observe a page after a secret is shown.
- Trusty Squire does not bypass phone verification, hard CAPTCHAs, 3-D Secure, payment authorization, or decisions that belong to a person. It stops for human input.
See the security model for the card and credential trust boundaries, and architecture for the system and data flows.
MCP tools
The default MCP registry exposes 16 tools. The essential operator surface
is operate_start, operate_observe, operate_act, operate_pay,
operate_payment_status, operate_finish, operate_recipe_run, and
operate_recipe_save — every former standalone workflow/lifecycle/login tool
name was dropped and its behavior folded into operate_act as a kind (or into
operate_finish's outcome); no delegating aliases remain. Poll payment status
via operate_payment_status(wait_seconds).
The maintainer-only list_extract_failures → get_extract_failure
DOM-diagnostics pair is excluded from that surface; set
TRUSTY_SQUIRE_DIAGNOSTICS=1 in the MCP server environment to opt into the
18-tool diagnostics profile.
- Rejected tool calls return a JSON
errorenvelope with a stablecodeand message. Malformed and unknown calls fail only that request; they do not stop the shared stdio process or discard its active in-memory operator session.server_unavailableincludesretry.max_attempts: 1: retry once, and never kill or restart the shared operator process. operate_start,operate_observe, andoperate_actopen a website, inspect the current state, and perform one browser action at a time. Ordinary controls inside same- and cross-origin frames are included in observations with aframe_origin; known captcha challenge frames stay behind the dedicated captcha flow. Frame refs and livetext=…/css=…locators preserve that boundary: same-registrable-domain frames are reachable, cross-domain frames must pass the same domain scope asgoto/allow_host, opaque frames are refused, andtype_secretnever targets any cross-domain frame. Frame refs currently supportclick,js_click,type,type_secret, andselect;upload,oauth_click, andoauth_loginfail closed. If a visible control has no observed ref, the four locator-capable actions (click,js_click,type, andtype_secret) can use a live locator; that one-off fallback is not replayable. In a live operator session, in-page XHR/fetch calls to merchant API sibling subdomains are automatically
Sourced from the repository README.
More in Browser & Web
- browser-useControl a real Chrome browser to complete any task: fill forms, extract data, book flights.110,346
- Puppeteer MCP ServerEnables headless browser automation for scraping dynamic JS pages, taking full-page screenshots, clicking elements, and filling web forms.9,800
- strataMCP server for progressive tool usage at any scale (see https://klavis.ai)5,794
- exaFast, intelligent web search and web crawling. New mcp tool: Exa-code is a context tool for coding 4,920
- apify-mcp-serverExtract data from any website with thousands of scrapers, crawlers, and automations on Apify Store ⚡4,798
- browserbasehq-mcp-browserbaseProvides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…3,409