sentinelHow it worksPricingBlogSign in

Start

IntroductionQuickstartAuthentication

Guides

Monitor a contractAdmin changesLarge outflowssBTC and PoX-5Slack and webhooks

Concepts

Watches & alertsBilling

Reference

CLIMCP serverSDKAPI reference
Powered bysecondlayer
Start / Introduction
NextQuickstart →

On this page

Sentinel

Security monitoring for Stacks and Clarity contracts. Sentinel reads your contract's code, watches who acts and what moves, and alerts your team once it lands onchain.

What Sentinel watches

Most losses on Stacks start with a stolen key, a rogue admin or a malicious proposal, not a clever bug. So the watches are about behavior:

WatchFires when
OutflowOne transfer of a token leaves the contract above your threshold, in token units
Outflow windowThe sum leaving within N blocks passes a threshold
Who actsA new caller, a first-ever call, or a role change on a privileged function
Caller allowlistAnyone outside the list calls a watched function
Value to a new actorFunds reach an address the contract never paid before
Governance and upgradesA proposal or an implementation swap lands

Why it reads your code

A generic chain alert doesn't know your contract. Sentinel reads the code first: which functions move value, who can call them, which powers someone holds by design. That read is the menu of what is watchable, and each entry says what the code lets someone do.

It is not a safety verdict. An empty menu never means "safe".

A plan says what the code can do, nothing more. It never says a contract is safe, and an alert is a correlation, never a confirmed attack.

How it goes

  1. Describe. Paste a contract id. Sentinel returns what is watchable, read from the code, free and in seconds. Choose what to watch.
  2. Watch. Sign in and add the watches you chose. On Builder or Team they are live at once; on Free a mainnet watch is saved and waits, and test-alert sends its newest real past match.
  3. Alert. An alert reaches email, Slack or a signed webhook once the block holding the event is made. It says what happened and what to check first. Your team responds.

How long that takes is measured, not promised: block-to-alert p50 and p95 over 24 hours and 7 days are public at GET /v1/status (sentinel status).

Sentinel never acts onchain, never signs and never discloses on its own. A person decides.

Read only

Sentinel only reads. Nothing it does sends a transaction, and nothing from a repo you paste is ever run.

Install

shell
npm i -g @secondlayer/sentinel
$ sentinel login
$ npx skills add https://runsentinel.app
$ claude mcp add --transport http sentinel https://api.runsentinel.app/mcp

The CLI and the sign-in, then the agent skill (it installs into the project), then the hosted MCP server. Take the ones you use.

Pick your surface

Sign-in, billing and API keys stay on the account page (/account). Everything after that works from a terminal, an agent or code. The same step on each surface:

sentinel on w_example

Next: Monitor a Stacks contract, then the Quickstart.