Docs
insertMCP consists of one MCP server (the siftmcp CLI over stdio, or Streamable HTTP at https://siftmcp.xyz/mcp) and one HTTP gateway at https://siftmcp.xyz/v1. Each offers the identical set of nine tools. Billed tools are paid in HYPE on Elysium Chain, chain id 4663. All responses carry both an Ed25519 and an ML-DSA-65 (NIST FIPS 204) signature.
Install
Aim a client at the Streamable HTTP endpoint https://siftmcp.xyz/mcp, or install the siftmcp CLI, which the gateway hosts on its own. All snippets below already point at this gateway’s address. The CLI needs Node.js 22.12 or later.
npx -y https://siftmcp.xyz/dl/siftmcp-0.2.0.tgz --help# this gateway over Streamable HTTP: five free calls a day, then x402 quotes claude mcp add --transport http sift https://siftmcp.xyz/mcp # or the CLI, paying each quote in HYPE from the agent's own wallet claude mcp add sift \ -e SIFT_API_URL=https://siftmcp.xyz \ -e SIFT_WALLET_KEY=0x<agent wallet private key> \ -- npx -y https://siftmcp.xyz/dl/siftmcp-0.2.0.tgz
Fund the agent with a wallet containing only the amount it is allowed to spend: every payment is limited by SIFT_MAX_PAYMENT_USDG (0.01 HYPE by default) and gas is paid in HYPE on chain 4663. If SIFT_API_URL is unset, the CLI executes every tool locally on your machine for free.
CLI options: --transport stdio|http, --port, --remote https://siftmcp.xyz to route calls to this gateway rather than running them locally, SIFT_WALLET_KEY to settle 402 quotes automatically, SIFT_MAX_PAYMENT_USDG to cap each payment, and SIFT_SESSION for a hold-gate session.
Tools & schemas
Input schemas follow JSON Schema 2020-12 and match precisely what MCP clients get from tools/list. Over HTTP, pass the same object as the JSON body.
sift_sec_filings
POST /v1/sec/filings0.002 HYPEPull a 10-K, 10-Q or 8-K directly from SEC EDGAR and receive tidy Markdown for the sections you request (Item 1A Risk Factors, Item 7 MD&A, 8-K Item 2.02 plus the EX-99 earnings release, …) along with a list of recent filings. Raw HTML/iXBRL shrinks by roughly 85-99%.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ticker": {
"type": "string",
"minLength": 1,
"maxLength": 10,
"pattern": "^[A-Za-z][A-Za-z0-9.-]{0,9}$",
"description": "US stock ticker, e.g. NVDA, TSLA, PLTR"
},
"form": {
"default": "10-K",
"description": "Form type: 10-K, 10-Q, 8-K (amendments like 10-K/A also work)",
"type": "string",
"pattern": "^[0-9A-Z/ -]{1,12}$"
},
"sections": {
"description": "Sections to extract: risk_factors, mdna, business, legal_proceedings, results (8-K 2.02), item keys like \"1A\", \"7\", \"P2-1A\", \"2.02\", or \"*\" for all. Defaults: 10-K → 1A+7, 10-Q → MD&A + risk factors, 8-K → all items",
"maxItems": 12,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 40
}
},
"accessionNumber": {
"description": "Specific filing; defaults to the most recent filing of `form`",
"type": "string",
"pattern": "^\\d{10}-\\d{2}-\\d{6}$"
},
"maxCharsPerSection": {
"description": "Per-section character cap (default 24,000)",
"type": "integer",
"minimum": 1000,
"maximum": 400000
},
"includeExhibits": {
"description": "8-K only: also sift EX-99 press-release exhibits (default true)",
"type": "boolean"
},
"listLimit": {
"description": "How many recent filings of this form to list (default 10)",
"type": "integer",
"minimum": 0,
"maximum": 40
}
},
"required": [
"ticker"
]
}sift_sec_financials
POST /v1/sec/financials0.002 HYPENormalised quarterly figures from SEC XBRL companyfacts: revenue, gross profit, operating income, net income, diluted EPS, operating cash flow, capex, free cash flow, cash and debt, with YoY / QoQ %. Numbers are taken from filed facts (quarters computed from YTD totals are marked).
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ticker": {
"type": "string",
"minLength": 1,
"maxLength": 10,
"pattern": "^[A-Za-z][A-Za-z0-9.-]{0,9}$",
"description": "US stock ticker, e.g. NVDA, TSLA, PLTR"
},
"quarters": {
"default": 8,
"description": "Number of most recent fiscal quarters (default 8)",
"type": "integer",
"minimum": 1,
"maximum": 12
}
},
"required": [
"ticker"
]
}sift_insider_trades
POST /v1/sec/insiders0.001 HYPERead the newest SEC Form 4 filings: who bought or sold on the open market as opposed to option exercises, grants, tax withholding and gifts, along with share counts, average prices, 10b5-1 plans and a 30-day cluster-buy indicator.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ticker": {
"type": "string",
"minLength": 1,
"maxLength": 10,
"pattern": "^[A-Za-z][A-Za-z0-9.-]{0,9}$",
"description": "US stock ticker, e.g. NVDA, TSLA, PLTR"
},
"limit": {
"default": 15,
"description": "Most recent Form 4 filings to parse (max 40)",
"type": "integer",
"minimum": 1,
"maximum": 40
},
"days": {
"description": "Only filings from the last N days",
"type": "integer",
"minimum": 1,
"maximum": 365
}
},
"required": [
"ticker"
]
}sift_rh_stock_parity
GET /v1/rh/parity/:ticker0.001 HYPEFetch the live Uniswap v3 pool prices and liquidity for an Elysium Chain (4663) stock token, correct for its ERC-8056 multiplier, set it against the newest US market price and session (REGULAR / PRE / POST / OVERNIGHT / CLOSED_WEEKEND / CLOSED_HOLIDAY), and output the on-chain premium or discount in % and bps.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ticker": {
"type": "string",
"minLength": 1,
"maxLength": 10,
"pattern": "^[A-Za-z][A-Za-z0-9.-]{0,9}$",
"description": "Ticker of a Elysium Chain stock token, e.g. NVDA, TSLA, SPY, QQQ"
}
},
"required": [
"ticker"
]
}sift_web_page
POST /v1/web/sift0.003 HYPELoad a public web page (static, or rendered with JavaScript inside an isolated, SSRF-protected Chromium) and get back readable Markdown, JSON tables and absolute links. Targets on private or internal networks are denied.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"url": {
"type": "string",
"maxLength": 2048,
"format": "uri",
"description": "Public http(s) URL (private/internal addresses are blocked)"
},
"render": {
"default": "auto",
"description": "auto: static first, isolated Chromium for JavaScript apps; static; browser",
"type": "string",
"enum": [
"auto",
"static",
"browser"
]
},
"maxChars": {
"description": "Markdown character cap (default 40,000)",
"type": "integer",
"minimum": 1000,
"maximum": 200000
},
"includeLinks": {
"type": "boolean"
},
"includeTables": {
"type": "boolean"
}
},
"required": [
"url"
]
}sift_filing_diff
POST /v1/sec/diff0.004 HYPELine up one section from two back-to-back filings (by default the newest versus the prior 10-Q Risk Factors) sentence by sentence: newly added risk wording, dropped guidance, and altered sentences shown with word-level inline diffs.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ticker": {
"type": "string",
"minLength": 1,
"maxLength": 10,
"pattern": "^[A-Za-z][A-Za-z0-9.-]{0,9}$",
"description": "US stock ticker, e.g. NVDA, TSLA, PLTR"
},
"form": {
"default": "10-Q",
"type": "string",
"enum": [
"10-Q",
"10-K"
]
},
"section": {
"default": "risk_factors",
"description": "Section alias or key: risk_factors, mdna, 1A, 7, P2-1A …",
"type": "string",
"minLength": 1,
"maxLength": 40
},
"baseAccession": {
"description": "Older filing (default: second most recent)",
"type": "string",
"pattern": "^\\d{10}-\\d{2}-\\d{6}$"
},
"compareAccession": {
"description": "Newer filing (default: most recent)",
"type": "string",
"pattern": "^\\d{10}-\\d{2}-\\d{6}$"
},
"maxItems": {
"default": 40,
"description": "Max added/removed/modified sentences returned per list",
"type": "integer",
"minimum": 1,
"maximum": 200
}
},
"required": [
"ticker"
]
}sift_pqc_readiness
POST /v1/sec/pqc0.003 HYPESearch the most recent 10-K (Item 1 Business, 1A Risk Factors, 1C Cybersecurity, and the EX-13 annual report if incorporated by reference), the newest 10-Q and recent 8-Ks on SEC EDGAR for post-quantum and quantum-computing language (post-quantum, ML-KEM, ML-DSA, Kyber, Dilithium, Shor, qubits, quantum-safe, crypto-agility, harvest-now-decrypt-later). Yields exact excerpts with form, filing date, section and URL, plus a posture derived solely from that evidence: quantum_builder, pqc_migrating, risk_acknowledged or undisclosed.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"ticker": {
"type": "string",
"minLength": 1,
"maxLength": 10,
"pattern": "^[A-Za-z][A-Za-z0-9.-]{0,9}$",
"description": "US stock ticker, e.g. NVDA, TSLA, PLTR"
},
"maxExcerpts": {
"default": 25,
"description": "Most verbatim excerpts to return (default 25)",
"type": "integer",
"minimum": 1,
"maximum": 60
}
},
"required": [
"ticker"
]
}sift_qday_exposure
POST /v1/chain/qday0.001 HYPECheck whether an address on Elysium Chain (4663) has exposed its secp256k1 public key: an account with nonce 0 has only published a hash of it, while any signed transaction makes the full key recoverable (and, with a large enough quantum computer, the private key). Recovers the key from a real outgoing transaction, reports the account type (EOA, EIP-7702, contract, ERC-4337), the live USD value at stake (HYPE, HYPE and Elysium stock tokens at pool or reference prices) and factual remediation.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"address": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{40}$",
"description": "Address on Elysium Chain (4663), e.g. 0xBf2D994a6B9e4b45e1463387A9adfc66A6FB2E36"
}
},
"required": [
"address"
]
}sift_verify_receipt
POST /v1/receipts/verifyfreeVerify an insertMCP receipt on your own: the Ed25519 signature and the ML-DSA-65 (NIST FIPS 204) post-quantum signature, each reported separately, plus an optional check that the output/target hashes correspond to the data you have and that the signers are the keys you expect. Free of charge.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"receipt": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "The `receipt` object (or decoded X-Sift-Receipt header) to verify"
},
"output": {
"description": "The `data` the receipt covers; when given, its sha256 must match outputHash"
},
"target": {
"description": "The request target; when given, its sha256 must match targetHash"
},
"expectedPubKey": {
"description": "Require this Ed25519 signer, e.g. signerPubKey from GET /v1/pubkey",
"type": "string",
"pattern": "^ed25519:[0-9a-f]{64}$"
},
"pqPubKey": {
"description": "ML-DSA-65 public key to check pqSignature against (pqSignerPubKey from GET /v1/pubkey). Defaults to this gateway key when pqKeyId matches",
"type": "string",
"pattern": "^ml-dsa-65:[A-Za-z0-9_-]{2600,2610}$"
},
"requirePq": {
"description": "Fail unless the ML-DSA-65 signature is present and valid",
"type": "boolean"
}
},
"required": [
"receipt"
]
}Response and receipt
Each successful call comes back in the same envelope. meta states what was retrieved and how much was trimmed; receipt signs sha256 hashes of the request (targetHash) and of data (outputHash) two times: once using the gateway’s Ed25519 key and once using its ML-DSA-65 key, a lattice-based scheme standardised as NIST FIPS 204 that no known quantum machine can defeat. You can fetch both public keys at GET /v1/pubkey.
{
"data": {
"…": "tool output"
},
"meta": {
"sourceUrl": "https://www.sec.gov/Archives/edgar/data/1045810/…/nvda-20260726.htm",
"sourceUrls": [
"…"
],
"rawBytes": 2684322,
"siftedBytes": 31801,
"rawTokensEst": 671081,
"siftedTokensEst": 7951,
"tokenSavingsPct": 98.8,
"latencyMs": 2878
},
"receipt": {
"v": 1,
"id": "rcpt_…",
"chainId": 4663,
"tool": "sift_filing_diff",
"targetHash": "sha256:…",
"outputHash": "sha256:…",
"timestamp": 1796491370,
"signerPubKey": "ed25519:…",
"signature": "0x… (64 bytes, Ed25519)",
"pqAlgorithm": "ml-dsa-65",
"pqKeyId": "16 hex: first 8 bytes of sha256(ML-DSA-65 public key)",
"pqSignature": "… (3,309 bytes, base64url, ML-DSA-65)"
}
}The message that gets signed is the UTF-8 string sift-receipt-v1\n then the canonical JSON of the eight v1 fields (v, id, chainId, tool, targetHash, outputHash, timestamp, signerPubKey): keys sorted, no whitespace, undefined fields omitted. Ed25519 and ML-DSA-65 (pure mode, empty context) sign these very bytes, so a verifier that understands only Ed25519 continues to work. Hashes are computed over the same canonical JSON.
The PQ fields lie outside the Ed25519 signature, so an intermediary could remove them and still leave a valid Ed25519-only receipt. To get the post-quantum guarantee, pin the ML-DSA-65 key and insist on its signature (requirePq: true on the verify tool). The X-Sift-Receipt header holds just pqKeyId and pqSigHash; the signature itself sits in the body.
{
"signerPubKey": "ed25519:<64 hex>",
"algorithm": "ed25519",
"domain": "sift-receipt-v1",
"pqAlgorithm": "ml-dsa-65",
"pqStandard": "NIST FIPS 204",
"pqKeyId": "<16 hex>",
"pqSignerPubKey": "ml-dsa-65:<1,952 bytes, base64url>",
"pqPublicKeyBytes": 1952,
"pqSignatureBytes": 3309
}Validate a receipt
Drop a response in here to validate both signatures in two ways: locally in your browser using @noble/ed25519 and @noble/post-quantum, and through this gateway’s free verify tool. Each pins the keys to GET /v1/pubkey and gives separate Ed25519 and ML-DSA-65 results.
The same validation in your own code:
import * as ed from '@noble/ed25519';
import { ml_dsa65 } from '@noble/post-quantum/ml-dsa.js';
import { sha256 } from '@noble/hashes/sha2.js';
import { bytesToHex, hexToBytes, utf8ToBytes } from '@noble/hashes/utils.js';
// Sorted keys, no whitespace, undefined dropped: the same bytes the gateway hashed.
function canonical(v: unknown): string {
if (Array.isArray(v)) return `[${v.map((x) => (x === undefined ? 'null' : canonical(x))).join(',')}]`;
if (v && typeof v === 'object') {
const o = v as Record<string, unknown>;
const keys = Object.keys(o).filter((k) => o[k] !== undefined).sort();
return `{${keys.map((k) => `${JSON.stringify(k)}:${canonical(o[k])}`).join(',')}}`;
}
return JSON.stringify(v ?? null);
}
const b64url = (s: string): Uint8Array =>
Uint8Array.from(atob(s.replace(/-/g, '+').replace(/_/g, '/') + '='.repeat((4 - (s.length % 4)) % 4)), (c) => c.charCodeAt(0));
// keys = await (await fetch(ORIGIN + '/v1/pubkey')).json(): pin both, once.
export async function verifySift(
res: { data: unknown; receipt: Record<string, any> },
keys: { signerPubKey: string; pqSignerPubKey: string },
) {
const r = res.receipt;
const fields = { v: r.v, id: r.id, chainId: r.chainId, tool: r.tool, targetHash: r.targetHash,
outputHash: r.outputHash, timestamp: r.timestamp, signerPubKey: r.signerPubKey };
const message = utf8ToBytes(`sift-receipt-v1\n${canonical(fields)}`); // both algorithms sign these bytes
const ed25519 = await ed.verifyAsync(hexToBytes(r.signature.slice(2)), message, hexToBytes(r.signerPubKey.slice(8)));
const mlDsa65 = typeof r.pqSignature === 'string' &&
ml_dsa65.verify(b64url(r.pqSignature), message, b64url(keys.pqSignerPubKey.slice('ml-dsa-65:'.length)));
const output = r.outputHash === `sha256:${bytesToHex(sha256(utf8ToBytes(canonical(res.data))))}`;
return { ed25519, mlDsa65, output, signer: r.signerPubKey === keys.signerPubKey };
}import base64
import hashlib
import json
from nacl.exceptions import BadSignatureError
from nacl.signing import VerifyKey # pip install pynacl
from dilithium_py.ml_dsa import ML_DSA_65 # pip install dilithium-py (FIPS 204)
def canonical(v) -> str:
return json.dumps(v, sort_keys=True, separators=(",", ":"), ensure_ascii=False)
def b64url(s: str) -> bytes:
return base64.urlsafe_b64decode(s + "=" * (-len(s) % 4))
def verify_sift(res: dict, keys: dict) -> dict:
"""keys = requests.get(ORIGIN + "/v1/pubkey").json(): pin both, once."""
r = res["receipt"]
fields = {k: r[k] for k in ("v", "id", "chainId", "tool", "targetHash",
"outputHash", "timestamp", "signerPubKey")}
message = ("sift-receipt-v1\n" + canonical(fields)).encode() # both algorithms sign these bytes
try:
VerifyKey(bytes.fromhex(r["signerPubKey"].removeprefix("ed25519:"))).verify(
message, bytes.fromhex(r["signature"][2:]))
ed25519 = True
except BadSignatureError:
ed25519 = False
ml_dsa_65 = "pqSignature" in r and ML_DSA_65.verify(
b64url(keys["pqSignerPubKey"].removeprefix("ml-dsa-65:")), message, b64url(r["pqSignature"]))
output = r["outputHash"] == "sha256:" + hashlib.sha256(canonical(res["data"]).encode()).hexdigest()
return {"ed25519": ed25519, "ml_dsa_65": ml_dsa_65, "output": output,
"signer": r["signerPubKey"] == keys["signerPubKey"]}Python’s json.dumps and JavaScript’s JSON.stringify produce the same output for strings and ordinary decimals; only numbers in exponent notation (1e-7) need normalising before hashing. Any FIPS 204 library can handle the ML-DSA-65 half (liboqs, BoringSSL, Bouncy Castle); choose the pure variant with an empty context string.
Payment via x402
A billed call made without paying is answered with HTTP 402 and a quote. Transfer the quoted amount to recipient on chain 4663, then resend the same request together with the transaction hash. The gateway reads the transfer over RPC (token, recipient, amount, confirmation and age) and saves the hash, so one transfer covers one call.
{
"x402Version": 1,
"error": "payment_required",
"tool": "sift_insider_trades",
"resource": "/v1/sec/insiders",
"chainId": 4663,
"network": "robinhood-mainnet",
"recipient": "0x… treasury",
"quoteId": "q_…",
"expiresAt": 1796500300,
"priceUsd": "0.001",
"accepts": [
{
"symbol": "HYPE",
"token": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
"amount": "1000",
"decimals": 6,
"amountFormatted": "0.001"
},
{
"symbol": "SIFT",
"token": "0x…",
"amount": "…",
"decimals": 18,
"amountFormatted": "…",
"discountPct": 30
}
],
"tab": {
"minDepositUsdg": "0.10"
},
"freeAlternatives": {
"playgroundRemaining": 0,
"holdGateHint": "Sign wallet ownership holding >= 500,000 SIFT for 200 free daily calls"
},
"paymentsEnabled": true
}Request headers
- X-Payment
- Hash of the HYPE (or $SIFT) transfer sent to the quoted recipient. A bare hash, JSON {"txHash"} or base64 JSON are all valid.
- X-402-TxHash
- Equivalent to X-Payment, supplied as a plain 0x hash.
- X-Sift-Wallet
- Wallet whose usage tab or Sift Credit covers this call.
- X-Sift-Wallet-Sig
- EIP-191 signature over the tab debit message below (EOA, ERC-1271 or ERC-6492).
- X-Sift-Nonce
- One-time nonce embedded in the signed message.
- X-Sift-Issued-At
- Unix time in seconds inside the signed message; valid within a 300 s window.
- X-Sift-Session
- Hold-gate session obtained from POST /v1/hold/verify.
Response headers
- X-Sift-Receipt
- base64url JSON of the compact receipt: body.receipt minus pqSignature, plus pqSigHash (sha256 of the raw ML-DSA-65 signature). It proves only the Ed25519 half.
- X-Sift-Paid-Via
- x402, tab, sift-credit, hold-gate, trial, free or open.
- X-Payment-Response
- base64 JSON {success, txHash, payer, chainId} returned following an x402 payment.
- X-402-Version
- 1, included in every 402 quote.
Payment methods are attempted in this sequence: X-Sift-Session (hold-gate), X-Sift-Wallet-Sig (Sift Credit first, then the tab), X-Payment or X-402-TxHash. Should the tool fail after payment was taken, the amount is returned to the payer’s tab.
Usage tab
Waiting for a block on each call is sluggish for an agent firing off fifty consecutively. Pay above the price just once (or POST the deposit to /v1/tab/deposit) and whatever exceeds it is added to your wallet’s tab, which becomes active when deposits hit 0.10 HYPE. From then on every call includes a signed debit in place of a transfer:
insertMCP metered tab debit wallet: <your address, lowercase> tool: sift_sec_filings nonce: <8-128 url-safe chars, single use> issuedAt: <unix seconds, within 300 s of the server clock> chainId: 4663
See the balance and the 20 most recent ledger entries at GET /v1/tab/:wallet. A nonce is consumed the first time it appears; reusing it yields a 409.
Hold-gate
Wallets with at least 500,000 $SIFT receive 200 free calls per day. POST /v1/hold/challenge with {"wallet"} responds with a sign-in message; sign it and POST /v1/hold/verify with {"nonce", "signature"} to get a session token. Pass it as X-Sift-Session. Balances are re-checked on chain for as long as the session is active. The hold-gate activates when $SIFT goes live; until then the challenge endpoint replies hold_gate_disabled.
Clients for TypeScript and Python
Each client settles a 402 quote one time, waits for the transfer to be confirmed, then repeats the request with X-402-TxHash. Quotes for a different chain, lacking a recipient, or exceeding your configured limit are rejected.
import { createWalletClient, defineChain, http, parseAbi, publicActions } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
const ORIGIN = 'https://siftmcp.xyz';
const robinhood = defineChain({
id: 4663,
name: 'Elysium Chain',
nativeCurrency: { name: 'Ether', symbol: 'HYPE', decimals: 18 },
rpcUrls: { default: { http: ['https://rpc.mainnet.chain.robinhood.com'] } },
});
const wallet = createWalletClient({
account: privateKeyToAccount(process.env.SIFT_WALLET_KEY as `0x${string}`),
chain: robinhood,
transport: http(),
}).extend(publicActions);
const erc20 = parseAbi(['function transfer(address to, uint256 amount) returns (bool)']);
const MAX_ATOMIC = 10_000n; // 0.01 HYPE at 6 decimals: refuse anything above
export async function sift(path: string, body: unknown) {
const call = (headers: Record<string, string> = {}) =>
fetch(ORIGIN + path, {
method: 'POST',
headers: { 'content-type': 'application/json', ...headers },
body: JSON.stringify(body),
});
let res = await call();
if (res.status === 402) {
const quote = await res.json();
const usdg = quote.accepts.find((a: { symbol: string }) => a.symbol === 'HYPE');
if (quote.chainId !== 4663 || !quote.recipient || BigInt(usdg.amount) > MAX_ATOMIC) {
throw new Error('quote refused');
}
const hash = await wallet.writeContract({
address: usdg.token,
abi: erc20,
functionName: 'transfer',
args: [quote.recipient, BigInt(usdg.amount)],
});
await wallet.waitForTransactionReceipt({ hash });
res = await call({ 'X-402-TxHash': hash });
}
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
return res.json(); // { data, meta, receipt }
}
const nvda = await sift('/v1/sec/insiders', { ticker: 'NVDA', limit: 10 });import os
import requests
from eth_account import Account
from web3 import Web3
ORIGIN = "https://siftmcp.xyz"
w3 = Web3(Web3.HTTPProvider("https://rpc.mainnet.chain.robinhood.com"))
acct = Account.from_key(os.environ["SIFT_WALLET_KEY"])
ERC20 = [{"name": "transfer", "type": "function", "stateMutability": "nonpayable",
"inputs": [{"name": "to", "type": "address"}, {"name": "amount", "type": "uint256"}],
"outputs": [{"name": "", "type": "bool"}]}]
MAX_ATOMIC = 10_000 # 0.01 HYPE at 6 decimals
def sift(path: str, body: dict) -> dict:
r = requests.post(ORIGIN + path, json=body, timeout=90)
if r.status_code == 402:
q = r.json()
usdg = next(a for a in q["accepts"] if a["symbol"] == "HYPE")
if q["chainId"] != 4663 or not q["recipient"] or int(usdg["amount"]) > MAX_ATOMIC:
raise RuntimeError("quote refused")
token = w3.eth.contract(address=Web3.to_checksum_address(usdg["token"]), abi=ERC20)
tx = token.functions.transfer(
Web3.to_checksum_address(q["recipient"]), int(usdg["amount"])
).build_transaction({
"from": acct.address,
"nonce": w3.eth.get_transaction_count(acct.address),
"chainId": 4663,
})
tx_hash = w3.eth.send_raw_transaction(acct.sign_transaction(tx).raw_transaction)
w3.eth.wait_for_transaction_receipt(tx_hash)
r = requests.post(ORIGIN + path, json=body, timeout=90,
headers={"X-402-TxHash": Web3.to_hex(tx_hash)})
r.raise_for_status()
return r.json() # {"data", "meta", "receipt"}
tsla = sift("/v1/sec/financials", {"ticker": "TSLA", "quarters": 8})Upoch checkpoints
Checking a receipt takes only the gateway’s public keys, so it can be carried unchanged inside an agent checkpoint: roughly 5 KB including the ML-DSA-65 signature, or a few hundred bytes in the compact header form when the Ed25519 half suffices. Keep receipt alongside the data it covers (or just its outputHash when the data is big). Anyone restoring the checkpoint later recalculates the hash and performs the verification above with the keys from GET /v1/pubkey, without needing to contact insertMCP again.
insertMCP never writes to Upoch on its own. Visit upoch.tech to learn how its checkpoints are produced and read.