Agent quickstart
Discover MST, inspect available operations, and request the right Testnet authority.
Start with the public MST Testnet. Agents can discover API capabilities without a wallet or secret. They need explicit authorization before taking action on someone's behalf.
1. Discover the service
The site publishes HTML rel="api-catalog" / rel="service-desc" links and an RFC 9727 API Catalog. You can also access its llms.txt file directly.
curl -fsSL https://stellar-testnet.multisig.tools/llms.txt
curl -fsSL https://stellar-testnet.multisig.tools/.well-known/api-catalog
curl -fsSL https://api-testnet.multisig.tools/stellar/operations
curl -fsSL https://api-testnet.multisig.tools/stellar/openapi.jsonThe Catalog links to the Operations Registry and OpenAPI. For an operation, fetch schema.href and resolve schema.pointer in that document. The logical operation defines its exact request body, authorization, successful result and retry rules. Do not select a shared HTTP request-body branch by guessing. For a task's next action, use its operationId and bodyDefaults.
2. Verify network without credentials
curl -fsSL https://api-testnet.multisig.tools/stellar/runtime-configCheck fixedNetwork is testnet. Stop if the network differs from the user's intended network. Do not send credentials to a different origin.
3. Choose who the Agent represents
Signer Agent (msa_*): A human signer explicitly authorizes the Agent. A valid login session alone cannot mint a credential; each grant needs a fresh wallet signature bound to that Agent's name, scope, Testnet network and request ID. The Agent receives a one-time token when the user approves. The credential can be revoked independently and never contains a signing key.
Pair an Agent with a Testnet signer
The Agent calls the public pairing endpoint without prior credentials:
curl -fsS https://api-testnet.multisig.tools/stellar/agent-grants \
-H 'Content-Type: application/json' \
-d '{"action":"request","label":"My Agent","access":"read","network":"testnet"}'The response contains verificationUri, userCode, deviceCode and intervalSeconds. Store deviceCode privately: it is the secret needed to claim the credential. Send only the verification URL and display code to the human. Never add the device code to a URL, prompt log, or browser page.
- The human opens
verificationUriat Testnet Agent access. - The human checks the Agent, Permission, Testnet and Verification code against the Agent's request.
- They connect and confirm their wallet, then select Approve in wallet. A fresh SEP-53 message or a non-submittable Stellar approval XDR explicitly binds the scope to this request. Deny ends the request without granting a credential.
- The Agent polls the endpoint with
{"action":"poll","deviceCode":"<private-device-code>"}at the advised interval.authorization_pendingmeans wait;access_deniedmeans stop. - When approved, one poll returns an
msa_*credential once. Store it in the Agent's secret manager and use it asAuthorization: Bearer msa_...for authorized operations.
The request expires after 10 minutes, and the device code is single-use. Each renewal or different scope requires another approval. The human can revoke access on Agent access.
If credential delivery fails, follow pairing recovery. Browser wallet unavailable? Follow independent signing tool approval.
Manual alternative: A signer can create a named credential directly in the Agent access UI. This uses the same wallet-confirmed grant and shows the secret once for copying into a secure store.
Service Integration (msi_*): An application or automation service creates a Testnet-only Integration Profile using the guided setup or the Testnet API quickstart. The service owns business orchestration; the Treasury's authorized signers retain signer authority. An msi_* key does not act as a signer. Testnet self-service issues this credential directly after the Agent has the user's approval to create the profile. Mainnet provisioning is separate. Inspect the runtime execution capability before choosing semantic payment creation or prepared XDR.
Treasury Audit (mta_*): Issued from Treasury settings for read-only Treasury Activity. It does not allow proposals, signing, or submission.
Never paste credentials into chat, URL parameters, public logs, or frontend scripts. Store secrets in the Agent's secure credential store.
4. Plan the smallest authorized task
- Ask the human what task to perform and which Testnet Treasury or signer it concerns.
- Inspect the Registry's
accessandeffectfields and read the relevant OpenAPI operation schema. - Use public read-only operations first. Before an operation marked
private-state,coordination-state, ornetwork-submit, obtain explicit approval for that action. - Authenticate with only the required credential. A Human signer must review and authorize the exact transaction with their wallet or separately controlled signing tool.
- Inspect canonical Request or Intent status after acting. Treat webhook events as notifications, not canonical transaction state.
For a first end-to-end Service Integration payment, follow Testnet quickstart: create a Testnet Integration Profile, create a scoped Request, give signers the /s#<request-id> review link, then retrieve canonical status. Use actual funded Testnet addresses rather than the example fixtures.
5. Coordinate two Agents
The Service Agent creates the Request using msi_*. The Signer Agent uses msa_* with the signer.inbox.list operation to discover pending Classic and Soroban tasks without receiving a private link. A task with kind: classic_transaction identifies a Request; inspect its exact XDR with GET /request. A task with kind: soroban_contract identifies an Intent; inspect its authorization plan with GET /intent. Obtain the signer's authorization before contributing. The Service Agent reads its own Request to track quorum and the final ledger result. MST-managed Integration Requests may submit automatically at quorum; direct submission by a signer Agent is forbidden.
Monitor a signer's Inbox with Read access
A personal Agent can request a Read credential and check GET /inbox without permission to sign, decline, or change proposals. signature_required_count counts pending signatures on the returned page for the represented signer. Follow nextCursor using GET /inbox?cursor=... until complete is true. The default combined page contains up to 50 Requests and Intents; limit accepts 1–100. All counts apply to the current page. Use each task's signatureRequired flag to identify the Requests and Intents to bring to that person's attention. action_count counts non-waiting tasks with an action available to the current Agent credential; for Read it is zero, even when the signer has pending work. state: waiting does not mean that no signature is needed.
Notify the human through the Agent's own notification channel, with the pending Request summary and a link to the signer's Testnet Inbox. Do not expose credentials or private transaction details outside that person's authorized channel. Deduplicate notifications by task kind and ID. Stop reminding when a fresh task explicitly reports signatureRequired=false. Before clearing a reminder for an absent task, finish a complete enumeration and check the known task directly if its outcome remains uncertain. Each page revalidates live signer access; this is not an atomic ledger snapshot. An incomplete page or failed scan is not proof that work is cleared. Check on demand or at the user's chosen interval; this is not a webhook subscription. The human reviews and signs with their own wallet. Read access is sufficient for this monitoring task; do not request Sign access just to send reminders.
Boundaries
- Discovery is public; acquiring signer authority is not.
- Agent
Signpermission cannot generate Stellar private-key signatures on its own. - Signing and submitting remain separate operations; no automatic Mainnet transition exists.
- The discovery catalog is not a remote MCP server or A2A Agent endpoint. WebMCP is experimental and is not required for this workflow.
If discovery does not supply the information needed for an action, stop and consult the linked documentation or ask the user for permission and context. Do not guess API payloads.