Three integration paths
Three ways to drive Boson from an agent. Pick by control vs. convenience.
Decision tree
GOAT SDK plugin
import { bosonProtocolPlugin } from "@bosonprotocol/agentic-commerce"
import { getOnChainTools } from "@goat-sdk/adapter-vercel-ai"
import { viem } from "@goat-sdk/wallet-viem"
const tools = await getOnChainTools({
wallet: viem(walletClient),
plugins: [
bosonProtocolPlugin({
url: "https://mcp-staging.bosonprotocol.io/mcp",
}),
],
})
// tools is now a dict of tool definitions, ready to register with the modelPros: fewest moving parts. Plugin handles MCP transport + signing + broadcasting through your viem wallet.
Cons: opinionated. If you need custom signing (HSM, multisig, session keys), use one of the other paths.
BosonMCPClient (typed TS)
import { BosonMCPClient } from "@bosonprotocol/agentic-commerce/boson"
const mcp = new BosonMCPClient()
await mcp.connectToServer(MCP_URL)
const { unsignedTx } = await mcp.createOffer({ /* … */ })
const signed = await wallet.signTransaction(unsignedTx)
await mcp.sendSignedTransaction({ chainId, signedTx: signed })Pros: full control over signing. Typed responses. Works with any wallet (HSM, MPC, smart account).
Cons: more code than the GOAT plugin. You manage the agent loop yourself.
Raw MCP over HTTP
const res = await fetch(MCP_URL, {
method: "POST",
headers: { "Content-Type": "application/json", Accept: "application/json,text/event-stream" },
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "tools/call",
params: { name: "commit_to_offer", arguments: { /* … */ } },
}),
})Pros: zero dependencies; any language. Useful for non-TS agents or for embedding inside an MCP-compliant client (Claude Desktop, Cline, Cursor).
Cons: no types, no schema validation, no signing helper.
Mixing paths
Production agents often mix: GOAT for the LLM-driven path, BosonMCPClient for background tasks. They share the same MCP server.