Any serious app needs data a general-purpose API can’t serve, and shouldn’t have to. This is the layer underneath, so you can shape it yourself.
The docs ship as a skill. Install it once and your harness knows every command; you describe the table, it does the setup. No account. One token from secondlayer init.
One script. Picked up on the next session.
curl -fsSL https://secondlayer.tools/skill.sh | bashcodex mcp add secondlayer --env SL_API_URL=http://127.0.0.1:3800 --env INSTANCE_TOKEN=$INSTANCE_TOKEN -- bunx @secondlayer/mcp{
"mcpServers": {
"secondlayer": {
"command": "bunx",
"args": [
"@secondlayer/mcp"
],
"env": {
"SL_API_URL": "http://127.0.0.1:3800",
"INSTANCE_TOKEN": "<from secondlayer init>"
}
}
}
}/secondlayer index sBTC deposits and withdrawals into a table called sbtc-flowscurl http://127.0.0.1:3800/v1/subgraphs/sbtc-flows?limit=3One container beside your node. Every row lands in Postgres you operate, checkable against the signed archive.