Connect your agent
Give Claude Code, Codex, Cursor, or any shell-capable agent the Starkscan CLI and one API key.
Connect your agent
Agents use the same surfaces as people: the Agent CLI for shell tools and the REST API for HTTP tools. Both take one API key. Get a key first with Get your first API key.
Shared environment
export STARKSCAN_CHAIN="SN_MAIN"
export STARKSCAN_API_KEY="<your key>"
# Optional: only set this for preview or self-hosted hosts.
# export STARKSCAN_BASE_URL="https://preview.example.com/api"The CLI uses https://api.starkscan.co when STARKSCAN_BASE_URL is unset and reads STARKSCAN_API_KEY from the environment — never put the key in a file you commit.
Give your agent the CLI
Claude Code, Codex, Cursor, and other agents with a shell tool can run the CLI directly:
npx -y @starkscan/cli init --agent --output-format json
npx -y @starkscan/cli doctor
npx -y @starkscan/cli status --output-format jsoninit --agent prints the active base URL, chain, auth placeholder, and next commands without writing secrets to disk. Pin the exact CLI version resolved from npm for unattended agents.
Agent discovery
Agents can bootstrap from machine-readable context:
| Artifact | URL | Auth |
|---|---|---|
| Agent memory | /.well-known/starkscan-agent.json | Public |
| llms.txt / llms-full.txt | /llms.txt, /llms-full.txt | Public |
| Agent context | /v1/meta/agent-context | API key |
| Capabilities | /v1/meta/capabilities | API key |
| Chains | /v1/meta/chains | API key |
These advertise the auth header, the /v1 API-host base, the default chain, and the recommended first calls.