Choosing an Integration
Two doorways into the same guard. Same policy firewall, same signing, same on-chain anchor — the only difference is how your agent talks.
Which should I use?
- MCP — your agent runs in an LLM framework that discovers and calls “tools” (Claude Code, LangChain, CrewAI). You add a config entry, not code. Start at
Connect Claude Code. - SDK (REST) — you write your own TypeScript backend and want typed function calls with results you handle explicitly. Synchronous by default. Install
@agops-labs/sdk. - SDK (guarded fetch) — your agent mostly calls paid HTTP services and you want the 402 handshake handled for you. One
fetch-shaped function; same package.
If you are not writing agent code at all — you just want to fund, cap, and audit agents someone else runs — you need neither. The console covers that on its own.
NOTE
The
@agops-labs/sdk package ships both clients. Choosing one is not lock-in — you can mix them in the same project.Side by side
| MCP | SDK (REST) | |
|---|---|---|
| Protocol | JSON-RPC 2.0 tools | Typed REST methods |
| Best for | LLM agent frameworks | TypeScript / backend code |
| Call shape | callTool('casper_guard_authorize_payment', …) | client.authorize(…) |
| Sync / async | tool-call response | sync by default; async opt-in |
| Auth | sk_ / ag_ keys | sk_ / ag_ keys |
MCP client usage
ts
import { createAgentOpsMcpClient } from '@agops-labs/sdk';
const mcp = createAgentOpsMcpClient({
url: 'https://<your-agentops-host>/v1/casper-guard/mcp',
apiKey: 'ag_live_...',
});
const tools = await mcp.listTools();
const result = await mcp.callTool('casper_guard_authorize_payment', {
agent_id: agent.id,
idempotency_key: 'idem_1',
payment_required: rawPaymentRequiredBody,
});Operator-scoped tools — casper_guard_create_agent, casper_guard_attach_trading_flow, casper_guard_revoke_agent — require an sk_ key. Construct the MCP client with the right credential for the tool you call.
They converge
Whichever door you pick, the request lands in the same pipeline: policy firewall → atomic spend-cap reservation → sign → Postgres record → on-chain GuardRegistry anchor. MCP did not replace REST, and REST did not replace MCP.
