PerformanceBlog
Tempo MCP serverGive agents search and read tools for Tempo docs
Skip to content
LogoLogo

Indexer

Run read-only SQL queries against Tempo's indexed data.

Query indexed chain data

GET/v1/indexer/query

Runs a read-only SQL-style query against Tempo’s indexed chain data, with optional live streaming as new blocks arrive.

Query Parameters

sqlRequired
string

Read-only SQL query to run against Tempo’s indexed chain data. Use SELECT statements only.

ExampleSELECT num, hash, timestamp FROM blocks ORDER BY num DESC LIMIT 10
chainIdRequired
integer·min 1

Which Tempo network to query. Use the alias mainnet or testnet, or a numeric chain id (mainnet is 4217).

Example4217
signature
string[]

ABI event signature to expose as a named SQL CTE, so you can query decoded event fields directly. Repeat this parameter to add multiple signatures.

ExampleTransfer(address indexed from, address indexed to, uint256 value)
engine
string

Choose the indexer engine yourself. By default the indexer routes automatically; clickhouse cannot be used with live=true.

Values
postgresclickhouse
Examplepostgres
live
boolean·default false

Stream results as Server-Sent Events and re-run the query on every new block. This cannot be combined with engine=clickhouse.

Examplefalse
limit
integer·min 1·max 10000·default 10000

Maximum number of rows to return. The server clamps this to the range 1 through 10,000.

Example10
timeout_ms
integer·min 100·max 30000·default 5000

Per-query timeout in milliseconds. The server clamps this to the range 100 through 30,000.

Example5000

Responses