Axiom Stack · SDKs
Three packages, three integration paths
SDKs are thin typed wrappers over the public REST API. RFC 7807 errors map to typed exceptions, idempotency keys are first-class, 429s auto-retry once with Retry-After. All three packages at 0.5.0 include x402 + AP2 passthrough + MPP-charge typed exceptions plus the standalone pay() + discover() primitives.
TypeScript / Node
live on npmDual ESM + CJS build, TypeScript types bundled, Node 18.3+ (native fetch), zero runtime deps.
npm install @axiom-stack/sdk5-line quickstart:
import { AxiomClient } from "@axiom-stack/sdk";
const client = new AxiomClient({ apiKey: process.env.AXIOM_API_KEY });
const res = await client.attestInstant({ assetClass: 2, assetId: "AAPL" });
console.log(res.data.price_micros, res.attestation_pda);0.5.0 live on npm — real-API roundtrip verified through the SDK boundary (equity + crypto). Published versions: 0.1.0, 0.3.0, 0.5.0 (0.2.0 skipped per Path A — same capability arrived faster via G6.11).
Python
live on PyPIPython 3.9+, pydantic v2 models, httpx sync + async, CLI axiom query AAPL --class 2.
pip install axiom-stack5-line quickstart:
import os
from axiom_stack import AxiomClient
client = AxiomClient(api_key=os.environ["AXIOM_API_KEY"])
res = client.attest_instant(asset_class=2, asset_id="AAPL")
print(res.data.price_micros, res.attestation_pda)axiom-stack 0.5.0 live on PyPI —pip install axiom-stack. Real-API roundtrip verified through the SDK boundary (equity + crypto). Published versions: 0.3.0, 0.5.0.
MCP server (Claude Desktop, Cline, Cursor, &c.)
live on npmA local stdio Model Context Protocol server — for Cursor, Claude Code, and Claude Desktop. (For claude.ai and other hosted HTTP clients, use the hosted connector at mcp.axiomstack.dev/mcp — see the MCP tools reference.) It exposes five tools to your agent: axiom_health, axiom_list_assets, axiom_attest_instant, axiom_attest_audit, axiom_discover.
Drop into Claude Desktop config:
{
"mcpServers": {
"axiom-stack": {
"command": "npx",
"args": ["-y", "@axiom-stack/mcp-server"],
"env": { "AXIOM_API_KEY": "axm_live_…" }
}
}
}Then ask Claude: “Get me a verifiable attestation for the current price of AAPL.” The MCP server proxies to the public API; same auth, same RFC 7807 error semantics, same on-chain attestation PDA in the response.
Config location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) · %APPDATA%\Claude\claude_desktop_config.json (Windows)
Payment Factory primitives
live · SDK 0.5.0SDK 0.5.0 adds two lower-level primitives for consuming any Payment-Factory-compatible service (not just Axiom). The Themra methods (attestInstant, attestAudit) stay canonical and backwards-compatible — these are additive, not breaking.
client.discover(serviceUrl)— fetches + parses any.well-known/x402manifest.client.pay(opts)— multi-protocol payment primitive (x402 / MPP-charge / AP2). Caller owns the wallet signer; settlement is end-to-end on Solana.
// Pay any service that publishes a .well-known/x402 manifest
const manifest = await client.discover("https://example.com");
const target = manifest.endpoints[0];
await client.pay({
to: target.payTo,
amount_micros: parseInt(target.price_atomic_units),
protocol: "x402",
network: target.network,
asset: target.asset,
resource: target.resource,
signer: yourWalletSigner,
});SDK 0.5.0 is live on npm + PyPI with the pay() + discover() primitives. The canonical Themra methods stay backwards-compatible — these are additive, not breaking.
For end-to-end integration recipes (LangChain tool, AutoGen agent, ElizaOS action), see the Payment Factory integrations guide →
Next
- Getting started — 5-minute agent integration story.
- Themra API reference — attestation endpoints, asset classes, tiers.
- Payment Factory — x402, AP2, MPP, Bearer.