Skip to content

MCP API

The Stablecoin Harness MCP server exposes the platform as a typed catalog of tools, grouped by layer. This page is the reference for every tool: what it does, what it expects, what it returns.

For installation and connection, see Features → MCP Server.

PrefixPurpose
data_get_*Read live state
compute_*Derived calculations
render_*Pre-formatted reports for chat-style UIs
analyze_*Raw JSON for custom dashboards
action_*Mutating operations
telemetry_get_*Local usage stats

Aggregate balance for the calling project.

input: { chain?: string; asset?: string }
output: { totalUSD: string; perAsset: Record<string, string> }

Read a single payment session.

input: { sessionId: string }
output: Session

Pull the most recent treasury snapshot.

input: { id?: string } // defaults to latest
output: TreasurySnapshot

List recent sessions with filters.

input: { status?: SessionStatus; limit?: number; cursor?: string }
output: { sessions: Session[]; nextCursor?: string }

Project yield for a hypothetical position.

input: { amount: string; protocol: string; horizon: "7d" | "30d" | "1y" }
output: { projectedYield: string; apy: string; assumptions: string[] }

Quote the cost of settling a session via a specific route.

input: { sessionId: string; route?: string }
output: { route: string; fees: string; estimatedTime: string }

Human-readable summary of a session — useful for “what happened with order X?” prompts.

Treasury health overview: balances, top yield positions, idle cash, 24h PnL.

Raw JSON PnL breakdown over a range. Same shape as GET /v1/treasury/pnl.

Step-by-step breakdown of a bridge/compose route for debugging.

Mutating tools require an sk_live_* key or a session key with the appropriate scope. Sensitive operations require re-OTP.

Create a payment session.

input: { amount: string; currency: string; chain: string; successUrl: string }
output: { sessionId: string; depositAddress: string }

Move idle stablecoins into a yield position.

input: { fromWallet: string; asset: string; amount: string; protocol: string }
output: { transactionId: string }

Pull funds back from yield. Requires re-OTP.

input: { positionId: string; amount: string; toWallet: string }
output: { transactionId: string }

Rotate a server key. Requires re-OTP.

Local-only stats on tool invocations from this machine. No data leaves your device.

Tool layerJWT (OTP)sk_*Session keyRe-OTP
data_get_*yesyesyesno
compute_*yesyesyesno
render_*yesyesyesno
analyze_*yesyesyesno
action_* (non-sensitive)noyesyesno
action_* (sensitive)noyesyesyes
telemetry_get_*yesyesyesno