MCP Server
The Stablecoin Harness MCP server exposes the platform as a typed catalog of tools for AI agents. Any MCP-compatible client (Claude, Cursor, your own agent) can connect, discover the tool catalog, and run operations on your behalf — payments, treasury, paymaster — using the same authorization model as the REST API.
Why MCP
Section titled “Why MCP”- Discovery. Agents enumerate tools instead of guessing endpoints.
- Typed inputs. Each tool has a JSON Schema for its arguments. No string-prompt parsing.
- Pre-formatted output.
render_*tools return human-readable summaries;analyze_*returns raw JSON for downstream programmatic use. - Local-first. The MCP server runs locally over stdio. Your credentials and tool calls never round-trip through a third party.
Install
Section titled “Install”npx @stablecoinx/mcp installThe installer registers the server at user scope and prompts for which skill packs to enable.
Or clone:
git clone https://github.com/stablecoinx/mcp.gitcd mcp && pnpm install && pnpm build./install.sh # macOS / Linux./install.ps1 # WindowsConnect your client
Section titled “Connect your client”Add this to your client’s MCP config (e.g. ~/.config/claude/mcp.json):
{ "mcpServers": { "stablecoinx": { "command": "npx", "args": ["@stablecoinx/mcp", "serve"], "env": { "STABLECOINX_KEY": "sk_live_..." } } }}Reload your client. stablecoinx appears in the tool picker.
Credential model
Section titled “Credential model”| Credential | How obtained | Tool access |
|---|---|---|
| OTP-derived JWT | One-time login via dashboard | Short-lived, read-only tools |
sk_live_* | Issued in the dashboard | Full tool catalog |
| Session key | Derived from sk_* per agent session | Scoped to one session or tool subset |
Sensitive tools (cash-out, key rotation) require re-OTP regardless of the key in use.
Tool layers
Section titled “Tool layers”| Prefix | Purpose | Examples |
|---|---|---|
data_get_* | Read live state | data_get_balance, data_get_session, data_get_treasury_snapshot |
compute_* | Derived calculations | compute_estimated_yield, compute_settlement_quote |
render_* | Pre-formatted reports | render_session_report, render_treasury_summary |
analyze_* | Raw JSON for custom UI | analyze_pnl, analyze_route |
action_* | Mutating operations | action_create_session, action_put_to_work, action_cash_out |
telemetry_get_* | Local usage stats | telemetry_get_history |
Privacy posture
Section titled “Privacy posture”- The server runs on your machine.
- API credentials are read from your env or your client’s MCP config — never logged.
- Telemetry is local-only by default. Optional opt-in usage stats can be enabled for support cases.
Related
Section titled “Related”- MCP API reference — the full tool catalog with input and output schemas.
- For agents → llms.txt — how to consume these docs as an LLM.