MCP or REST: choose the connection that fits
Two ways to reach Transfer, with different jobs in your workflow.
Tools for an agent
The MCP endpoint gives a compatible agent tools to check its wallet, read transactions, and simulate purchases. It is useful when the model needs to decide when to call a tool as part of a broader task. Each connection uses a credential scoped to a particular agent.
Resources for your application
The REST API provides read-only access to the authenticated agent and its linked wallet resources. Use it when your application needs a direct HTTP request for a balance or a spending-limit display. It does not provide a general-purpose real-money payment endpoint.
Use the same boundaries
Both interfaces use the agent’s private bearer key. Choosing a different interface does not expand the credential’s permissions. Keep keys on the server or in private client configuration, and use the documentation for the exact resource and tool contracts.
Compare the same task through both interfaces
Imagine an internal screen that displays an agent’s remaining allowance. Your application already knows when to refresh the data, so a REST request is a natural fit. Now imagine asking an agent to inspect its wallet and decide whether a simulated purchase fits the task. MCP gives that agent named tools it can call during the conversation. The distinction is about who orchestrates the interaction, not which interface sounds more capable. A product can use both: REST for a predictable display and MCP for agent-driven tool use, with the same scoped identity behind each request.
Keep credentials outside browser code
A developer may first test a request in a terminal, then move the same example into an application. That transition needs care. A bearer key included in frontend code becomes available to the browser and should not be treated as a private secret. Put authenticated requests behind a server-side boundary when building an application. For an MCP client, use the private configuration location supported by that client. Keep real keys out of shared snippets and screenshots. The interface you choose does not remove the need to handle the underlying credential deliberately.
Handle errors as part of the integration
Build the failure path alongside the successful response. A revoked or expired credential should lead to a clear connection problem, not a misleading zero balance. An unavailable service should not be presented as a successful simulated purchase. For MCP, inspect tool results before telling the user an operation completed. For REST, check the HTTP response and the documented error shape before reading resource data. Transfer’s REST endpoints are read-only, so do not infer a purchase capability from a wallet response. Use the documented tool or endpoint for the exact operation you need.
Keep the tool result distinct from the conversation
MCP makes tools available during a model-driven interaction, but the conversation itself is not a ledger. An agent may describe an intention to make a simulated purchase before any tool call has completed. Your application or user should distinguish that intention from the actual tool result.
When designing a workflow, require the agent to inspect the returned outcome before claiming success. If a tool request fails, preserve that distinction in the explanation. The same principle applies to REST: preparing a request is not the same as receiving a successful response. This is particularly useful when debugging an integration, because it separates model behavior from transport errors and server-side validation. Start with a small read request, then inspect the exact supported operation that follows. Avoid treating a plausible-sounding answer as evidence that an API request occurred.
Choose a narrow first integration
It can be tempting to connect every available tool before trying the first task. A narrower integration is easier to evaluate. Start with wallet and agent information, confirm that the client is connected to the expected identity, and only then test the simulated spending workflow you intend to support.
Write down which information your application actually needs. A balance display may only need a resource read, while an agent conversation may need transaction history as context. Choosing the appropriate interface keeps the request flow easier to understand. It also helps you give useful feedback when something fails: a missing balance response and a declined simulated purchase are different events. Consult the current Transfer documentation for exact fields, error responses, and supported tool names instead of inferring a larger API from a small example.
Frequently asked questions
Can the REST API simulate a purchase?
The documented agent REST endpoints are read-only. Use the supported MCP simulation tool for simulated purchases. Reading a wallet resource does not grant a separate payment capability.
Do MCP and REST use different credentials?
Both use the private bearer key associated with an agent. The endpoint and interaction style differ, but switching interfaces does not broaden the agent’s permissions or give it owner-level access.
Should I put the key in frontend JavaScript?
No. Keep private keys in server-side code or a supported private client configuration. A key delivered to a browser bundle is available to that browser and should not be treated as a server secret.
Which interface should I use for a balance display?
Use the read-only REST API when your server needs a predictable resource request for wallet or agent information. MCP is useful when an agent needs named tools during a conversation.
Does adding an MCP server prove authentication works?
No. Saving a server configuration is different from successfully authenticating. Test a supported read operation and confirm the returned agent identity before attempting a simulated purchase.
What should my integration do when the key is revoked?
Present a clear authentication or connection problem and configure a valid replacement if access is still needed. Do not display a fabricated zero balance or report a successful operation.
Ready to start with Transfer?
Start with test money. Every purchase is a simulation.