Agents
Use Starkscan with coding agents through the CLI and hosted MCP transport.
Use Starkscan with coding agents through the CLI and hosted MCP transport.
Use the Agents lane when a human or model is operating Starkscan through tools instead of raw REST requests.
Starkscan currently exposes three agent-facing paths:
For most agent users, the shortest path is:
mezcal/api basemezcal mcp serve --transport remoteShared environment:
export MEZCAL_BASE_URL="https://<your-mezcal-host>/api"
export MEZCAL_API_KEY="mzk_live_your_key_here"
export MEZCAL_CHAIN="SN_MAIN"
If your agent client wants a JSON config instead of a one-shot command, this is the minimum useful shape:
{
"mcpServers": {
"mezcal": {
"command": "mezcal",
"args": ["mcp", "serve", "--transport", "remote"],
"env": {
"MEZCAL_BASE_URL": "https://<your-mezcal-host>/api",
"MEZCAL_API_KEY": "${MEZCAL_API_KEY}",
"MEZCAL_CHAIN": "SN_MAIN"
}
}
}
}
That is the practical parent-page answer for Claude Code, Codex-adjacent setups, Cursor-like MCP clients, and other tool-calling environments.
When you are replacing lightweight chain reads with an agent, start with:
statusblock_detailblock_transactionstoken_total_supplytoken_balance_oftoken_transfersThose give the agent a narrow, typed Starkscan surface before it starts guessing at raw chain structure. For direct HTTP agents, the broader block route set is GET /v1/{chain}/block/{number_or_hash} for canonical block detail and GET /v1/{chain}/block/{number}/txs for the ordered block transaction list after you resolve a numeric block number. The {number_or_hash} placeholder here means block number or block hash. If you need the current head block, fetch GET /v1/{chain}/status first and then call /block/{number_or_hash} with the returned block number or block hash.
They solve different problems:
That separation is intentional. It keeps direct HTTP agents on a bounded contract, keeps the local developer flow fast, and gives remote tool-calling clients a safer, more explicit auth and policy boundary.