API & MCP
Everything a person can do on Transaction Decoder, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://transactiondecoder.usefulweb.site/api/v1/calculate– run Transaction DecoderGET https://transactiondecoder.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Transaction Decoder
Looks up a transaction on Ethereum, Base, Arbitrum, OP Mainnet, Polygon, Avalanche or BNB Chain straight from a public RPC node and decodes it on our server: the function called (from the verified ABI on Sourcify, a built-in table or the signature database), every event log, ERC-20 token transfers with symbols and decimals, gas fee, status and finality. Works without live lookups for raw calldata too.
| Field | Type | Default | Description |
|---|---|---|---|
mode | select (lookup, calldata) | "lookup" | What do you have? |
chain | select (ethereum, base, arbitrum, optimism, polygon, avalanche, bsc) | "ethereum" | Chain |
txHash | text | — | Transaction hash |
calldata | textarea | — | Calldata (input data) |
signature | text | — | Function signature (optional) |
abi | textarea | — | Contract ABI JSON (optional) |
Example request
Decode an ERC-20 transfer (offline)
curl -X POST https://transactiondecoder.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"calldata","chain":"ethereum","calldata":"0xa9059cbb0000000000000000000000005aaeb6053f3e94c9b9a09f33669435e7ef1beaed00000000000000000000000000000000000000000000000000000000004c4b40"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://transactiondecoder.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
transaction_decoder - Local stdio connector:
node src/mcp-stdio.ts --tool=transaction-decoder
{
"mcpServers": {
"transaction-decoder": { "type": "http", "url": "https://transactiondecoder.usefulweb.site/mcp" }
}
}