API & MCP

Everything a person can do on Smart Contract Relationship Graph, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Smart Contract Relationship Graph

Draws the relationships around one address: proxy → implementation (and beacon), who can upgrade it (ProxyAdmin, Safe, timelock, EOA), owner() and admin(), who deployed it and whether that deployer is itself a contract (a factory), which token standards it implements (ERC-20 / ERC-721 / ERC-1155), plus any related addresses you add. Paste runtime bytecode and a relationship list for an offline graph.

Inputs of Smart Contract Relationship Graph
FieldTypeDefaultDescription
modeselect (lookup, bytecode)"lookup"What do you have?
chainselect (ethereum, base, arbitrum, optimism, polygon, avalanche, bsc)"ethereum"Chain
addresstext—Contract address
relatedlist—Related addresses (optional). One per line: "0x… label", e.g. a token it holds, a contract it calls or a known multisig.
bytecodetextarea—Runtime bytecode (offline)
relationshipstextarea—Relationship list (offline). One per line: "A -> B : label" — A/B are addresses or names; use "this" for the analysed contract.

Example request

Token behind a minimal proxy, with known relationships (offline)

curl -X POST https://smartcontractrelationshipgraph.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"bytecode","chain":"ethereum","bytecode":"0x363d3d373d3d3d363d730123456789abcdef0123456789abcdef012345675af43d82803e903d91602b57fd5bf3","relationships":"this -> 0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed : owned by\n0xfB6916095ca1df60bB79Ce92cE3Ea74c37c5d359 -> this : deployed\nthis -> 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 : holds USDC\n0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed -> Treasury Safe : member of"}'

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)

{
  "mcpServers": {
    "smart-contract-relationship-graph": { "type": "http", "url": "https://smartcontractrelationshipgraph.usefulweb.site/mcp" }
  }
}